package password

import (
	"context"

	"github.com/tidbcloud/tidb-management-service/nextgen-global-service/domain/entity"
	"github.com/tidbcloud/tidb-management-service/utilities/bizerr"
)

//go:generate go run go.uber.org/mock/mockgen@latest -source=$GOFILE -package=mock_$GOPACKAGE -destination=./mock_$GOPACKAGE/mock_$GOFILE
type Repo interface {
	SetEncryptedPassword(
		ctx context.Context,
		resourcePoolId uint64,
		clusterId string,
		user entity.ClusterUser,
		encryptedPassword string,
	) bizerr.BizError
	GetEncryptedPassword(ctx context.Context, resourcePoolId uint64, clusterId string, user entity.ClusterUser) (string, bizerr.BizError)
	DeleteEncryptedPassword(ctx context.Context, resourcePoolId uint64, clusterId string, user entity.ClusterUser) bizerr.BizError
}
