Add new frontend pages for the multi-tenant OCDP platform: - Charts page (/charts): Browse Harbor OCI registries to list Helm chart repositories and versions, with deploy modal to launch charts on selected clusters - Monitoring page (/monitoring): Display cluster metrics (CPU/Memory/GPU usage) and per-node details with resource utilization bars - Chart References page (/chart-references): CRUD for chart metadata references - Values Templates page (/templates): CRUD for Helm values templates with version history and rollback support - Sidebar: Add Charts navigation, update Storage and Templates links - api.ts: Add all API client functions (clusterApi, registryApi, instanceApi, monitoringApi, storageApi, chartReferenceApi, valuesTemplateApi, workspaceApi, userApi) with full TypeScript types Note: deploy flow and values template rollback not yet end-to-end tested.
27 lines
758 B
Go
27 lines
758 B
Go
package repository
|
|
|
|
import (
|
|
"context"
|
|
"github.com/ocdp/cluster-service/internal/domain/entity"
|
|
)
|
|
|
|
// WorkspaceRepository Workspace 仓储接口
|
|
type WorkspaceRepository interface {
|
|
// Create 创建 Workspace
|
|
Create(ctx context.Context, workspace *entity.Workspace) error
|
|
|
|
// GetByID 根据 ID 获取 Workspace
|
|
GetByID(ctx context.Context, id string) (*entity.Workspace, error)
|
|
|
|
// GetByName 根据名称获取 Workspace
|
|
GetByName(ctx context.Context, name string) (*entity.Workspace, error)
|
|
|
|
// Update 更新 Workspace
|
|
Update(ctx context.Context, workspace *entity.Workspace) error
|
|
|
|
// Delete 删除 Workspace
|
|
Delete(ctx context.Context, id string) error
|
|
|
|
// List 列出所有 Workspace
|
|
List(ctx context.Context) ([]*entity.Workspace, error)
|
|
} |