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.
3048 lines
104 KiB
Go
3048 lines
104 KiB
Go
// Package docs Code generated by swaggo/swag. DO NOT EDIT
|
||
package docs
|
||
|
||
import "github.com/swaggo/swag"
|
||
|
||
const docTemplate = `{
|
||
"schemes": {{ marshal .Schemes }},
|
||
"swagger": "2.0",
|
||
"info": {
|
||
"description": "{{escape .Description}}",
|
||
"title": "{{.Title}}",
|
||
"contact": {
|
||
"name": "API Support",
|
||
"email": "support@ocdp.io"
|
||
},
|
||
"license": {
|
||
"name": "Apache 2.0",
|
||
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
||
},
|
||
"version": "{{.Version}}"
|
||
},
|
||
"host": "{{.Host}}",
|
||
"basePath": "{{.BasePath}}",
|
||
"paths": {
|
||
"/admin/users": {
|
||
"get": {
|
||
"description": "获取所有用户列表(Admin 专用),可按 workspace_id 筛选",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"admin"
|
||
],
|
||
"summary": "列出用户",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "工作空间 ID",
|
||
"name": "workspace_id",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.UserListResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"description": "创建新用户(Admin 专用)",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"admin"
|
||
],
|
||
"summary": "创建用户",
|
||
"parameters": [
|
||
{
|
||
"description": "创建用户请求",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.CreateUserRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.UserResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/admin/users/{user_id}": {
|
||
"get": {
|
||
"description": "获取指定用户信息(Admin 专用)",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"admin"
|
||
],
|
||
"summary": "获取用户",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "用户 ID",
|
||
"name": "user_id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.UserResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"put": {
|
||
"description": "更新用户信息(Admin 专用)",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"admin"
|
||
],
|
||
"summary": "更新用户",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "用户 ID",
|
||
"name": "user_id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "更新用户请求",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.UpdateUserRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.UserResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"description": "删除指定用户(Admin 专用)",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"admin"
|
||
],
|
||
"summary": "删除用户",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "用户 ID",
|
||
"name": "user_id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/admin/users/{user_id}/active": {
|
||
"put": {
|
||
"description": "设置用户是否启用(Admin 专用)",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"admin"
|
||
],
|
||
"summary": "启用/禁用用户",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "用户 ID",
|
||
"name": "user_id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "启用状态",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.SetUserActiveRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/admin/users/{user_id}/password": {
|
||
"put": {
|
||
"description": "重置指定用户的密码(Admin 专用)",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"admin"
|
||
],
|
||
"summary": "重置用户密码",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "用户 ID",
|
||
"name": "user_id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "重置密码请求",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ResetPasswordRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/admin/users/{user_id}/workspace": {
|
||
"put": {
|
||
"description": "将用户分配到指定工作空间(Admin 专用)",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"admin"
|
||
],
|
||
"summary": "分配用户到工作空间",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "用户 ID",
|
||
"name": "user_id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "工作空间分配请求",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ChangeUserWorkspaceRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/auth/login": {
|
||
"post": {
|
||
"description": "使用用户名和密码获取访问令牌",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"Auth"
|
||
],
|
||
"summary": "用户登录",
|
||
"parameters": [
|
||
{
|
||
"description": "登录信息",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.LoginRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.AuthResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/auth/refresh": {
|
||
"post": {
|
||
"description": "使用刷新令牌获取新的访问令牌",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"Auth"
|
||
],
|
||
"summary": "刷新访问令牌",
|
||
"parameters": [
|
||
{
|
||
"description": "刷新令牌",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.RefreshTokenRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.AuthResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/auth/register": {
|
||
"post": {
|
||
"description": "创建一个新的后台用户",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"Auth"
|
||
],
|
||
"summary": "用户注册",
|
||
"parameters": [
|
||
{
|
||
"description": "注册信息",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.RegisterRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "Created",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.UserResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/clusters": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"Clusters"
|
||
],
|
||
"summary": "列出所有集群",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ClusterResponse"
|
||
}
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "创建一个新的 Kubernetes 集群配置",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"Clusters"
|
||
],
|
||
"summary": "创建集群",
|
||
"parameters": [
|
||
{
|
||
"description": "集群信息",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.CreateClusterRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "Created",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ClusterResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/clusters/{cluster_id}": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"Clusters"
|
||
],
|
||
"summary": "获取集群详情",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "集群 ID",
|
||
"name": "cluster_id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ClusterResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"Clusters"
|
||
],
|
||
"summary": "更新集群",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "集群 ID",
|
||
"name": "cluster_id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "更新内容",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.UpdateClusterRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ClusterResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"Clusters"
|
||
],
|
||
"summary": "删除集群",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "集群 ID",
|
||
"name": "cluster_id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"204": {
|
||
"description": "No Content",
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/clusters/{cluster_id}/health": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"Clusters"
|
||
],
|
||
"summary": "获取集群健康状态",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "集群 ID",
|
||
"name": "cluster_id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ClusterHealthResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/clusters/{cluster_id}/instances": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"Instances"
|
||
],
|
||
"summary": "列出实例",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "集群 ID",
|
||
"name": "cluster_id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.InstanceListResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "在指定集群上部署一个 artifact",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"Instances"
|
||
],
|
||
"summary": "创建实例",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "集群 ID",
|
||
"name": "cluster_id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "实例配置",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.CreateInstanceRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "Created",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.InstanceResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/clusters/{cluster_id}/instances/{instance_id}": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"Instances"
|
||
],
|
||
"summary": "获取实例详情",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "集群 ID",
|
||
"name": "cluster_id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "实例 ID",
|
||
"name": "instance_id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.InstanceResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"Instances"
|
||
],
|
||
"summary": "更新实例",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "集群 ID",
|
||
"name": "cluster_id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "实例 ID",
|
||
"name": "instance_id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "更新内容",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.UpdateInstanceRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.InstanceResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"Instances"
|
||
],
|
||
"summary": "删除实例",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "集群 ID",
|
||
"name": "cluster_id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "实例 ID",
|
||
"name": "instance_id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"204": {
|
||
"description": "No Content",
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/clusters/{cluster_id}/instances/{instance_id}/entries": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"Instances"
|
||
],
|
||
"summary": "获取实例 Service/Ingress 入口",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "集群 ID",
|
||
"name": "cluster_id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "实例 ID",
|
||
"name": "instance_id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.InstanceEntryResponse"
|
||
}
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/monitoring/clusters": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"Monitoring"
|
||
],
|
||
"summary": "列出集群监控",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ClusterMetricsResponse"
|
||
}
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/monitoring/clusters/{cluster_id}": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"Monitoring"
|
||
],
|
||
"summary": "获取集群监控",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "集群 ID",
|
||
"name": "cluster_id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ClusterMetricsResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/monitoring/clusters/{cluster_id}/nodes": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"Monitoring"
|
||
],
|
||
"summary": "获取节点指标",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "集群 ID",
|
||
"name": "cluster_id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.NodeMetricsResponse"
|
||
}
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/monitoring/summary": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"Monitoring"
|
||
],
|
||
"summary": "获取监控汇总",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.MonitoringSummaryResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/registries": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"Registries"
|
||
],
|
||
"summary": "列出所有 Registries",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.RegistryResponse"
|
||
}
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "新增 OCI Registry 配置",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"Registries"
|
||
],
|
||
"summary": "创建 Registry",
|
||
"parameters": [
|
||
{
|
||
"description": "Registry 信息",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.CreateRegistryRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "Created",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.RegistryResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/registries/{registry_id}": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"Registries"
|
||
],
|
||
"summary": "获取 Registry",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Registry ID",
|
||
"name": "registry_id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.RegistryResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"Registries"
|
||
],
|
||
"summary": "更新 Registry",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Registry ID",
|
||
"name": "registry_id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "更新内容",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.UpdateRegistryRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.RegistryResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"Registries"
|
||
],
|
||
"summary": "删除 Registry",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Registry ID",
|
||
"name": "registry_id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"204": {
|
||
"description": "No Content",
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/registries/{registry_id}/health": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"Registries"
|
||
],
|
||
"summary": "检查 Registry 健康",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Registry ID",
|
||
"name": "registry_id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.RegistryHealthResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/registries/{registry_id}/repositories": {
|
||
"get": {
|
||
"description": "列出指定 Registry 中的所有 Repository",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"Artifacts"
|
||
],
|
||
"summary": "列出 Registry 中的所有 Repositories",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Registry ID",
|
||
"name": "registry_id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.RepositoryListResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/registries/{registry_id}/repositories/{repository_name}/artifacts": {
|
||
"get": {
|
||
"description": "列出指定 Repository 中的所有 Artifact,支持按类型过滤",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"Artifacts"
|
||
],
|
||
"summary": "列出 Repository 中的所有 Artifacts",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Registry ID",
|
||
"name": "registry_id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "Repository Name (URL encoded, e.g. charts%2Fnginx)",
|
||
"name": "repository_name",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"default": "all",
|
||
"description": "过滤 Artifact 类型 (all, chart, image, other)",
|
||
"name": "media_type",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.TagResponse"
|
||
}
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/registries/{registry_id}/repositories/{repository_name}/artifacts/{reference}": {
|
||
"get": {
|
||
"description": "获取指定 Artifact 的详细信息",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"Artifacts"
|
||
],
|
||
"summary": "获取 Artifact 详情",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Registry ID",
|
||
"name": "registry_id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "Repository Name (URL encoded)",
|
||
"name": "repository_name",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "Artifact Reference (tag or digest)",
|
||
"name": "reference",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ArtifactResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/registries/{registry_id}/repositories/{repository_name}/artifacts/{reference}/values": {
|
||
"get": {
|
||
"description": "获取 Helm Chart 的 values.yaml 文件内容 (仅支持 Chart 类型)",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"Artifacts"
|
||
],
|
||
"summary": "获取 Helm Chart Values",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Registry ID",
|
||
"name": "registry_id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "Repository Name (URL encoded)",
|
||
"name": "repository_name",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "Artifact Reference (tag or digest)",
|
||
"name": "reference",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ValuesResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/registries/{registry_id}/repositories/{repository_name}/artifacts/{reference}/values-schema": {
|
||
"get": {
|
||
"description": "获取 Helm Chart 的 values.schema.json (仅支持 Chart 类型)",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"Artifacts"
|
||
],
|
||
"summary": "获取 Helm Chart Values Schema",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Registry ID",
|
||
"name": "registry_id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "Repository Name (URL encoded)",
|
||
"name": "repository_name",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "Artifact Reference (tag or digest)",
|
||
"name": "reference",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ValuesSchemaResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/users/me": {
|
||
"get": {
|
||
"description": "获取当前登录用户的基本信息",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"user"
|
||
],
|
||
"summary": "获取当前用户信息",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.UserResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/users/me/password": {
|
||
"put": {
|
||
"description": "修改当前登录用户的密码",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"user"
|
||
],
|
||
"summary": "修改当前用户密码",
|
||
"parameters": [
|
||
{
|
||
"description": "修改密码请求",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ChangePasswordRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/users/me/workspace": {
|
||
"get": {
|
||
"description": "获取当前用户所属工作空间的详细信息和配额",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"user"
|
||
],
|
||
"summary": "获取当前用户所属工作空间",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.WorkspaceResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/workspaces": {
|
||
"get": {
|
||
"description": "获取所有工作空间列表(Admin 专用)",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"workspace"
|
||
],
|
||
"summary": "列出所有工作空间",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.WorkspaceListResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"description": "创建新的工作空间(Admin 专用)",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"workspace"
|
||
],
|
||
"summary": "创建工作空间",
|
||
"parameters": [
|
||
{
|
||
"description": "创建工作空间请求",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.CreateWorkspaceRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.WorkspaceDTO"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/workspaces/{workspace_id}": {
|
||
"get": {
|
||
"description": "获取指定工作空间的详细信息和配额",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"workspace"
|
||
],
|
||
"summary": "获取工作空间",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "工作空间 ID",
|
||
"name": "workspace_id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.WorkspaceResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"put": {
|
||
"description": "更新工作空间信息(Admin 专用)",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"workspace"
|
||
],
|
||
"summary": "更新工作空间",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "工作空间 ID",
|
||
"name": "workspace_id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "更新工作空间请求",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.UpdateWorkspaceRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.WorkspaceDTO"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"description": "删除指定工作空间(Admin 专用)",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"workspace"
|
||
],
|
||
"summary": "删除工作空间",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "工作空间 ID",
|
||
"name": "workspace_id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/workspaces/{workspace_id}/quotas": {
|
||
"get": {
|
||
"description": "获取指定工作空间的资源配额",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"workspace"
|
||
],
|
||
"summary": "获取工作空间配额",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "工作空间 ID",
|
||
"name": "workspace_id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.QuotaDTO"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"put": {
|
||
"description": "设置指定工作空间的 CPU/GPU/GPU Memory 配额(Admin 专用)",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"workspace"
|
||
],
|
||
"summary": "设置工作空间配额",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "工作空间 ID",
|
||
"name": "workspace_id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "配额设置请求",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.SetQuotasRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.QuotaDTO"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"definitions": {
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ArtifactResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"createdAt": {
|
||
"type": "string"
|
||
},
|
||
"digest": {
|
||
"type": "string"
|
||
},
|
||
"repositoryName": {
|
||
"type": "string"
|
||
},
|
||
"size": {
|
||
"type": "integer"
|
||
},
|
||
"tag": {
|
||
"type": "string"
|
||
},
|
||
"type": {
|
||
"description": "chart | image | other",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.AuthResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"accessToken": {
|
||
"type": "string"
|
||
},
|
||
"refreshToken": {
|
||
"type": "string"
|
||
},
|
||
"userId": {
|
||
"type": "string"
|
||
},
|
||
"username": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ChangePasswordRequest": {
|
||
"type": "object",
|
||
"required": [
|
||
"new_password",
|
||
"old_password"
|
||
],
|
||
"properties": {
|
||
"new_password": {
|
||
"type": "string",
|
||
"minLength": 6
|
||
},
|
||
"old_password": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ChangeUserWorkspaceRequest": {
|
||
"type": "object",
|
||
"required": [
|
||
"workspace_id"
|
||
],
|
||
"properties": {
|
||
"workspace_id": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ClusterHealthResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"healthy": {
|
||
"type": "boolean"
|
||
},
|
||
"message": {
|
||
"type": "string"
|
||
},
|
||
"version": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ClusterMetricsResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"clusterId": {
|
||
"type": "string"
|
||
},
|
||
"clusterName": {
|
||
"type": "string"
|
||
},
|
||
"cpuUsage": {
|
||
"type": "number"
|
||
},
|
||
"gpuUsage": {
|
||
"type": "number"
|
||
},
|
||
"lastCheck": {
|
||
"type": "string"
|
||
},
|
||
"maxNodeCpu": {
|
||
"type": "string"
|
||
},
|
||
"maxNodeCpuUsage": {
|
||
"type": "number"
|
||
},
|
||
"maxNodeGpu": {
|
||
"type": "integer"
|
||
},
|
||
"maxNodeGpuUsage": {
|
||
"type": "number"
|
||
},
|
||
"maxNodeMemUsage": {
|
||
"type": "number"
|
||
},
|
||
"maxNodeMemory": {
|
||
"type": "string"
|
||
},
|
||
"memoryUsage": {
|
||
"type": "number"
|
||
},
|
||
"nodeCount": {
|
||
"type": "integer"
|
||
},
|
||
"nodes": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.NodeMetricsResponse"
|
||
}
|
||
},
|
||
"podCount": {
|
||
"type": "integer"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"totalCpu": {
|
||
"type": "string"
|
||
},
|
||
"totalGpu": {
|
||
"type": "integer"
|
||
},
|
||
"totalMemory": {
|
||
"type": "string"
|
||
},
|
||
"uptime": {
|
||
"type": "string"
|
||
},
|
||
"usedCpu": {
|
||
"type": "string"
|
||
},
|
||
"usedGpu": {
|
||
"type": "integer"
|
||
},
|
||
"usedMemory": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ClusterResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"caData": {
|
||
"description": "脱敏数据(仅用于前端显示,实际值为掩码)",
|
||
"type": "string"
|
||
},
|
||
"certData": {
|
||
"description": "脱敏显示(••••••••)",
|
||
"type": "string"
|
||
},
|
||
"createdAt": {
|
||
"type": "string"
|
||
},
|
||
"defaultNamespace": {
|
||
"description": "默认 namespace 前缀",
|
||
"type": "string"
|
||
},
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"hasCaData": {
|
||
"description": "认证配置状态(不返回实际证书数据,仅返回是否已配置)",
|
||
"type": "boolean"
|
||
},
|
||
"hasCertData": {
|
||
"type": "boolean"
|
||
},
|
||
"hasKeyData": {
|
||
"type": "boolean"
|
||
},
|
||
"hasToken": {
|
||
"type": "boolean"
|
||
},
|
||
"host": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"isShared": {
|
||
"description": "是否为共享集群",
|
||
"type": "boolean"
|
||
},
|
||
"isolationMode": {
|
||
"description": "'namespace' | 'cluster'",
|
||
"type": "string"
|
||
},
|
||
"keyData": {
|
||
"description": "脱敏显示(••••••••)",
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"ownerId": {
|
||
"type": "string"
|
||
},
|
||
"token": {
|
||
"description": "脱敏显示(••••••••)",
|
||
"type": "string"
|
||
},
|
||
"updatedAt": {
|
||
"type": "string"
|
||
},
|
||
"workspaceId": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.CreateClusterRequest": {
|
||
"type": "object",
|
||
"required": [
|
||
"host",
|
||
"name"
|
||
],
|
||
"properties": {
|
||
"caData": {
|
||
"type": "string"
|
||
},
|
||
"ca_data": {
|
||
"type": "string"
|
||
},
|
||
"certData": {
|
||
"type": "string"
|
||
},
|
||
"cert_data": {
|
||
"type": "string"
|
||
},
|
||
"defaultNamespace": {
|
||
"description": "默认 namespace 前缀",
|
||
"type": "string"
|
||
},
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"host": {
|
||
"type": "string"
|
||
},
|
||
"isShared": {
|
||
"description": "是否为共享集群",
|
||
"type": "boolean"
|
||
},
|
||
"isolationMode": {
|
||
"description": "'namespace' | 'cluster'",
|
||
"type": "string"
|
||
},
|
||
"keyData": {
|
||
"type": "string"
|
||
},
|
||
"key_data": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"token": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.CreateInstanceRequest": {
|
||
"type": "object",
|
||
"required": [
|
||
"name",
|
||
"namespace",
|
||
"registryId",
|
||
"repository",
|
||
"tag"
|
||
],
|
||
"properties": {
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"namespace": {
|
||
"type": "string"
|
||
},
|
||
"registryId": {
|
||
"type": "string"
|
||
},
|
||
"registry_id": {
|
||
"type": "string"
|
||
},
|
||
"repository": {
|
||
"type": "string"
|
||
},
|
||
"tag": {
|
||
"type": "string"
|
||
},
|
||
"values": {
|
||
"type": "object",
|
||
"additionalProperties": true
|
||
},
|
||
"valuesYaml": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.CreateRegistryRequest": {
|
||
"type": "object",
|
||
"required": [
|
||
"name",
|
||
"url"
|
||
],
|
||
"properties": {
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"insecure": {
|
||
"type": "boolean"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"password": {
|
||
"type": "string"
|
||
},
|
||
"url": {
|
||
"type": "string"
|
||
},
|
||
"username": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.CreateUserRequest": {
|
||
"type": "object",
|
||
"required": [
|
||
"password",
|
||
"role",
|
||
"username"
|
||
],
|
||
"properties": {
|
||
"email": {
|
||
"type": "string"
|
||
},
|
||
"password": {
|
||
"type": "string",
|
||
"minLength": 6
|
||
},
|
||
"role": {
|
||
"type": "string",
|
||
"enum": [
|
||
"admin",
|
||
"user"
|
||
]
|
||
},
|
||
"username": {
|
||
"type": "string"
|
||
},
|
||
"workspace_id": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.CreateWorkspaceRequest": {
|
||
"type": "object",
|
||
"required": [
|
||
"name"
|
||
],
|
||
"properties": {
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ErrorResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"code": {
|
||
"type": "integer"
|
||
},
|
||
"error": {
|
||
"type": "string"
|
||
},
|
||
"message": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.InstanceEntryHostResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"host": {
|
||
"type": "string"
|
||
},
|
||
"paths": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.InstanceEntryPathResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.InstanceEntryPathResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"path": {
|
||
"type": "string"
|
||
},
|
||
"serviceName": {
|
||
"type": "string"
|
||
},
|
||
"servicePort": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.InstanceEntryPortResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"nodePort": {
|
||
"type": "integer"
|
||
},
|
||
"port": {
|
||
"type": "integer"
|
||
},
|
||
"protocol": {
|
||
"type": "string"
|
||
},
|
||
"targetPort": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.InstanceEntryResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"clusterIP": {
|
||
"type": "string"
|
||
},
|
||
"externalIPs": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"hosts": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.InstanceEntryHostResponse"
|
||
}
|
||
},
|
||
"kind": {
|
||
"type": "string"
|
||
},
|
||
"loadBalancerIngress": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"namespace": {
|
||
"type": "string"
|
||
},
|
||
"ports": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.InstanceEntryPortResponse"
|
||
}
|
||
},
|
||
"tls": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.InstanceEntryTLSResponse"
|
||
}
|
||
},
|
||
"type": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.InstanceEntryTLSResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"hosts": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"secretName": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.InstanceListResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"instances": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.InstanceResponse"
|
||
}
|
||
},
|
||
"total": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.InstanceResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"chart": {
|
||
"type": "string"
|
||
},
|
||
"clusterId": {
|
||
"type": "string"
|
||
},
|
||
"createdAt": {
|
||
"type": "string"
|
||
},
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"lastError": {
|
||
"type": "string"
|
||
},
|
||
"lastOperation": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"namespace": {
|
||
"type": "string"
|
||
},
|
||
"registryId": {
|
||
"type": "string"
|
||
},
|
||
"repository": {
|
||
"type": "string"
|
||
},
|
||
"revision": {
|
||
"type": "integer"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"statusReason": {
|
||
"type": "string"
|
||
},
|
||
"updatedAt": {
|
||
"type": "string"
|
||
},
|
||
"values": {
|
||
"type": "object",
|
||
"additionalProperties": true
|
||
},
|
||
"version": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.LoginRequest": {
|
||
"type": "object",
|
||
"required": [
|
||
"password",
|
||
"username"
|
||
],
|
||
"properties": {
|
||
"password": {
|
||
"type": "string"
|
||
},
|
||
"username": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.MonitoringSummaryResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"errorClusters": {
|
||
"type": "integer"
|
||
},
|
||
"healthyClusters": {
|
||
"type": "integer"
|
||
},
|
||
"lastUpdate": {
|
||
"type": "string"
|
||
},
|
||
"totalClusters": {
|
||
"type": "integer"
|
||
},
|
||
"totalNodes": {
|
||
"type": "integer"
|
||
},
|
||
"totalPods": {
|
||
"type": "integer"
|
||
},
|
||
"warningClusters": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.NodeMetricsResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"age": {
|
||
"type": "string"
|
||
},
|
||
"containerRuntime": {
|
||
"type": "string"
|
||
},
|
||
"cpuAllocatable": {
|
||
"type": "string"
|
||
},
|
||
"cpuCapacity": {
|
||
"type": "string"
|
||
},
|
||
"cpuPercent": {
|
||
"type": "number"
|
||
},
|
||
"cpuUsage": {
|
||
"type": "string"
|
||
},
|
||
"gpuCapacity": {
|
||
"type": "integer"
|
||
},
|
||
"gpuPercent": {
|
||
"type": "number"
|
||
},
|
||
"gpuType": {
|
||
"type": "string"
|
||
},
|
||
"gpuUsage": {
|
||
"type": "integer"
|
||
},
|
||
"kernelVersion": {
|
||
"type": "string"
|
||
},
|
||
"kubeletVersion": {
|
||
"type": "string"
|
||
},
|
||
"memoryAllocatable": {
|
||
"type": "string"
|
||
},
|
||
"memoryCapacity": {
|
||
"type": "string"
|
||
},
|
||
"memoryPercent": {
|
||
"type": "number"
|
||
},
|
||
"memoryUsage": {
|
||
"type": "string"
|
||
},
|
||
"nodeName": {
|
||
"type": "string"
|
||
},
|
||
"osImage": {
|
||
"type": "string"
|
||
},
|
||
"podCount": {
|
||
"type": "integer"
|
||
},
|
||
"role": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.QuotaDTO": {
|
||
"type": "object",
|
||
"properties": {
|
||
"hard_limit": {
|
||
"type": "number"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"resource_type": {
|
||
"type": "string"
|
||
},
|
||
"soft_limit": {
|
||
"type": "number"
|
||
},
|
||
"used": {
|
||
"type": "number"
|
||
},
|
||
"workspace_id": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.QuotaValue": {
|
||
"type": "object",
|
||
"properties": {
|
||
"hard_limit": {
|
||
"type": "number"
|
||
},
|
||
"soft_limit": {
|
||
"type": "number"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.RefreshTokenRequest": {
|
||
"type": "object",
|
||
"required": [
|
||
"refreshToken"
|
||
],
|
||
"properties": {
|
||
"refreshToken": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.RegisterRequest": {
|
||
"type": "object",
|
||
"required": [
|
||
"password",
|
||
"username"
|
||
],
|
||
"properties": {
|
||
"password": {
|
||
"type": "string",
|
||
"minLength": 6
|
||
},
|
||
"username": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.RegistryHealthResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"healthy": {
|
||
"type": "boolean"
|
||
},
|
||
"message": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.RegistryResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"createdAt": {
|
||
"type": "string"
|
||
},
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"hasPassword": {
|
||
"description": "是否已设置密码",
|
||
"type": "boolean"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"insecure": {
|
||
"type": "boolean"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"password": {
|
||
"description": "脱敏显示(••••••••)",
|
||
"type": "string"
|
||
},
|
||
"updatedAt": {
|
||
"type": "string"
|
||
},
|
||
"url": {
|
||
"type": "string"
|
||
},
|
||
"username": {
|
||
"description": "明文返回用户名(不敏感)",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.RepositoryListResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"catalogSupported": {
|
||
"description": "Whether _catalog API is supported",
|
||
"type": "boolean"
|
||
},
|
||
"message": {
|
||
"description": "User-friendly message",
|
||
"type": "string"
|
||
},
|
||
"registryId": {
|
||
"type": "string"
|
||
},
|
||
"registryUrl": {
|
||
"type": "string"
|
||
},
|
||
"repositories": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"source": {
|
||
"description": "Data source: \"catalog\" | \"preconfigured\" | \"unavailable\"",
|
||
"type": "string"
|
||
},
|
||
"total": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ResetPasswordRequest": {
|
||
"type": "object",
|
||
"required": [
|
||
"new_password"
|
||
],
|
||
"properties": {
|
||
"new_password": {
|
||
"type": "string",
|
||
"minLength": 6
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.SetQuotasRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"cpu": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.QuotaValue"
|
||
},
|
||
"gpu": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.QuotaValue"
|
||
},
|
||
"gpu_memory": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.QuotaValue"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.SetUserActiveRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"is_active": {
|
||
"type": "boolean"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.TagResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"mediaType": {
|
||
"type": "string"
|
||
},
|
||
"repositoryName": {
|
||
"description": "Repository name",
|
||
"type": "string"
|
||
},
|
||
"size": {
|
||
"description": "Artifact size (bytes)",
|
||
"type": "integer"
|
||
},
|
||
"tag": {
|
||
"description": "Tag name (e.g. \"1.0.0\", \"latest\")",
|
||
"type": "string"
|
||
},
|
||
"type": {
|
||
"description": "Artifact type: chart, image, other",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.UpdateClusterRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"caData": {
|
||
"type": "string"
|
||
},
|
||
"ca_data": {
|
||
"type": "string"
|
||
},
|
||
"certData": {
|
||
"type": "string"
|
||
},
|
||
"cert_data": {
|
||
"type": "string"
|
||
},
|
||
"defaultNamespace": {
|
||
"type": "string"
|
||
},
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"host": {
|
||
"type": "string"
|
||
},
|
||
"isShared": {
|
||
"type": "boolean"
|
||
},
|
||
"isolationMode": {
|
||
"type": "string"
|
||
},
|
||
"keyData": {
|
||
"type": "string"
|
||
},
|
||
"key_data": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"token": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.UpdateInstanceRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"values": {
|
||
"type": "object",
|
||
"additionalProperties": true
|
||
},
|
||
"valuesYaml": {
|
||
"type": "string"
|
||
},
|
||
"version": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.UpdateRegistryRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"insecure": {
|
||
"type": "boolean"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"password": {
|
||
"type": "string"
|
||
},
|
||
"url": {
|
||
"type": "string"
|
||
},
|
||
"username": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.UpdateUserRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"email": {
|
||
"type": "string"
|
||
},
|
||
"is_active": {
|
||
"type": "boolean"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.UpdateWorkspaceRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.UserDTO": {
|
||
"type": "object",
|
||
"properties": {
|
||
"created_at": {
|
||
"type": "string"
|
||
},
|
||
"email": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"is_active": {
|
||
"type": "boolean"
|
||
},
|
||
"must_change_password": {
|
||
"type": "boolean"
|
||
},
|
||
"role": {
|
||
"type": "string"
|
||
},
|
||
"updated_at": {
|
||
"type": "string"
|
||
},
|
||
"username": {
|
||
"type": "string"
|
||
},
|
||
"workspace_id": {
|
||
"type": "string"
|
||
},
|
||
"workspace_name": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.UserListResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"total": {
|
||
"type": "integer"
|
||
},
|
||
"users": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.UserDTO"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.UserResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"createdAt": {
|
||
"type": "string"
|
||
},
|
||
"email": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"updatedAt": {
|
||
"type": "string"
|
||
},
|
||
"username": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ValuesResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"values": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.ValuesSchemaResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.WorkspaceDTO": {
|
||
"type": "object",
|
||
"properties": {
|
||
"created_at": {
|
||
"type": "string"
|
||
},
|
||
"created_by": {
|
||
"type": "string"
|
||
},
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"updated_at": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.WorkspaceListResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"total": {
|
||
"type": "integer"
|
||
},
|
||
"workspaces": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.WorkspaceDTO"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"github_com_ocdp_cluster-service_internal_adapter_input_http_dto.WorkspaceResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"quotas": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.QuotaDTO"
|
||
}
|
||
},
|
||
"workspace": {
|
||
"$ref": "#/definitions/github_com_ocdp_cluster-service_internal_adapter_input_http_dto.WorkspaceDTO"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"securityDefinitions": {
|
||
"BearerAuth": {
|
||
"description": "Type \"Bearer\" followed by a space and JWT token.",
|
||
"type": "apiKey",
|
||
"name": "Authorization",
|
||
"in": "header"
|
||
}
|
||
}
|
||
}`
|
||
|
||
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
||
var SwaggerInfo = &swag.Spec{
|
||
Version: "1.0",
|
||
Host: "localhost:8080",
|
||
BasePath: "/api/v1",
|
||
Schemes: []string{"http", "https"},
|
||
Title: "OCDP Backend API",
|
||
Description: "OCDP (Open Cloud Development Platform) Backend API\n\nRESTful API for managing Kubernetes clusters, OCI registries, and Helm deployments.",
|
||
InfoInstanceName: "swagger",
|
||
SwaggerTemplate: docTemplate,
|
||
LeftDelim: "{{",
|
||
RightDelim: "}}",
|
||
}
|
||
|
||
func init() {
|
||
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
|
||
}
|