feat: complete MVP epics E7-E10 (provisioning, console proxy, audit, frontend)

This commit is contained in:
Philipp
2026-06-12 10:45:13 +02:00
parent 137c13fa98
commit ac30a19960
33 changed files with 3625 additions and 263 deletions
+11
View File
@@ -12,11 +12,16 @@ import (
type Repository interface {
ListProjectVMs(ctx context.Context, profileID string, projectID string) ([]VM, bool, error)
GetVM(ctx context.Context, profileID string, vmID string) (VM, bool, error)
GetProjectInfo(ctx context.Context, profileID string, projectID string) (ProjectInfo, bool, error)
CheckQuota(ctx context.Context, projectID string) (QuotaInfo, error)
ReserveNextVMID(ctx context.Context, clusterID string) (int, error)
InsertVM(ctx context.Context, vm InsertVMRecord) (VM, error)
}
type Handler struct {
repository Repository
power PowerDependencies
provision ProvisionDependencies
}
type Option func(*Handler)
@@ -27,6 +32,12 @@ func WithPower(dependencies PowerDependencies) Option {
}
}
func WithProvision(dependencies ProvisionDependencies) Option {
return func(h *Handler) {
h.provision = dependencies
}
}
func NewHandler(repository Repository, opts ...Option) Handler {
handler := Handler{repository: repository}
for _, opt := range opts {