package clusterencryptionbinding

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 {
	Upsert(ctx context.Context, binding *entity.ClusterEncryptionBinding) bizerr.BizError
	LoadByClusterId(ctx context.Context, clusterId uint64) (*entity.ClusterEncryptionBinding, bizerr.BizError)
	UpdateState(ctx context.Context, clusterId uint64, state entity.ClusterEncryptionBindingState, message string) bizerr.BizError
	Delete(ctx context.Context, clusterId uint64) bizerr.BizError
	IsModifying(ctx context.Context, clusterId uint64) (bool, bizerr.BizError)
}
