package repo

import (
	"context"

	"github.com/tidbcloud/cluster-service-ng/domain/entity"
)

type AutoscaleRuntimeGuardFilter struct {
	ScopeType     entity.AutoscaleRuntimeGuardScopeType
	ScopeID       string
	GuardType     entity.AutoscaleRuntimeGuardType
	ComponentType entity.ComponentType
	ActiveOnly    bool
}

type AutoscaleRuntimeGuardRepo interface {
	UpsertGuard(ctx context.Context, guard *entity.AutoscaleRuntimeGuard) (*entity.AutoscaleRuntimeGuard, error)
	DeleteGuard(
		ctx context.Context,
		scopeType entity.AutoscaleRuntimeGuardScopeType,
		scopeID string,
		guardType entity.AutoscaleRuntimeGuardType,
		componentType entity.ComponentType,
	) error
	ListGuards(ctx context.Context, filter AutoscaleRuntimeGuardFilter) ([]*entity.AutoscaleRuntimeGuard, error)
}
