package repository

import (
	"context"
	"time"

	"github.com/ocdp/cluster-service/internal/domain/entity"
)

// TenantKubeClient provisions namespace-scoped Kubernetes access for tenants.
type TenantKubeClient interface {
	EnsureTenant(ctx context.Context, cluster *entity.Cluster, binding entity.TenantBinding) error
	IssueKubeconfig(ctx context.Context, cluster *entity.Cluster, binding entity.TenantBinding, ttl time.Duration) (*entity.TenantKubeconfig, error)
	GetResourceQuotaUsage(ctx context.Context, cluster *entity.Cluster, binding entity.TenantBinding) (*ResourceQuotaUsage, error)
	SuspendTenant(ctx context.Context, cluster *entity.Cluster, binding entity.TenantBinding) error
	DeleteTenant(ctx context.Context, cluster *entity.Cluster, binding entity.TenantBinding) error
}

type ResourceQuotaUsage struct {
	Hard ResourceVector
	Used ResourceVector
}
