- Add Workspace domain (entity, repository, service, handler, DTO) - Add multi-tenant K8s client with tenant binding and quota management - Add K8s diagnostics client (instance diagnostics) - Add authorization middleware (authz package) - Restructure frontend to feature-based architecture (features/) - Add User Management page in configuration - Add AccessDenied page and route guards - Refactor shared components (form inputs, layout, UI) - Update Tailwind config for new design system - Add comprehensive documentation (docs/, tasks/, plans) - Improve cluster service with better kubeconfig handling - Add tests for crypto, config, helm client, tenant binding
52 lines
2.0 KiB
Go
52 lines
2.0 KiB
Go
package dto
|
|
|
|
// CreateRegistryRequest 创建 Registry 请求
|
|
type CreateRegistryRequest struct {
|
|
Name string `json:"name" binding:"required"`
|
|
URL string `json:"url" binding:"required"`
|
|
Username string `json:"username"`
|
|
Password string `json:"password"`
|
|
Description string `json:"description"`
|
|
Insecure bool `json:"insecure"`
|
|
Visibility string `json:"visibility"`
|
|
GlobalShared bool `json:"globalShared"`
|
|
GlobalSharedAlt bool `json:"global_shared"`
|
|
}
|
|
|
|
// UpdateRegistryRequest 更新 Registry 请求
|
|
type UpdateRegistryRequest struct {
|
|
Name string `json:"name"`
|
|
URL string `json:"url"`
|
|
Username string `json:"username"`
|
|
Password string `json:"password"`
|
|
Description string `json:"description"`
|
|
Insecure bool `json:"insecure"`
|
|
Visibility string `json:"visibility"`
|
|
GlobalShared bool `json:"globalShared"`
|
|
GlobalSharedAlt bool `json:"global_shared"`
|
|
}
|
|
|
|
// RegistryResponse Registry 响应(敏感数据已脱敏)
|
|
type RegistryResponse struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
URL string `json:"url"`
|
|
Description string `json:"description"`
|
|
WorkspaceID string `json:"workspaceId"`
|
|
OwnerID string `json:"ownerId"`
|
|
Visibility string `json:"visibility"`
|
|
AllowedActions []string `json:"allowedActions,omitempty"`
|
|
Username string `json:"username,omitempty"` // 明文返回用户名(不敏感)
|
|
Password string `json:"password,omitempty"` // 脱敏显示(••••••••)
|
|
HasPassword bool `json:"hasPassword"` // 是否已设置密码
|
|
Insecure bool `json:"insecure"`
|
|
CreatedAt string `json:"createdAt"`
|
|
UpdatedAt string `json:"updatedAt"`
|
|
}
|
|
|
|
// RegistryHealthResponse Registry 健康状态响应
|
|
type RegistryHealthResponse struct {
|
|
Healthy bool `json:"healthy"`
|
|
Message string `json:"message,omitempty"`
|
|
}
|