controller

package
v0.0.0-...-96b04c8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2023 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RegistryAlreadyExistsErr = errors.New("REGISTRY_ALREADY_EXISTS")
)

Functions

func HealthController

func HealthController(ctx context.Context)

Types

type BackupAccountController

type BackupAccountController struct {
	Ctx                  context.Context
	BackupAccountService service.BackupAccountService
}

func NewBackupAccountController

func NewBackupAccountController() *BackupAccountController

func (BackupAccountController) DeleteBy

func (b BackupAccountController) DeleteBy(name string) error

Delete BackupAccount @Tags backupAccounts @Summary Delete a backupAccount @Description 删除备份账号 @Accept json @Produce json @Param name path string true "备份账号名称" @Security ApiKeyAuth @Router /backupAccounts/{name}/ [delete]

func (BackupAccountController) Get

func (b BackupAccountController) Get() (*page.Page, error)

List BackupAccount @Tags backupAccounts @Summary Show all backupAccounts @Description 获取备份账号列表 @Accept json @Produce json @Success 200 {object} page.Page @Security ApiKeyAuth @Router /backupaccounts/ [get]

func (BackupAccountController) GetBy

Get Host @Tags backupaccounts @Summary Show a backupaccounts @Description show a backupaccounts by name @Accept json @Produce json @Success 200 {object} dto.BackupAccount @Security ApiKeyAuth @Router /backupaccounts/{name}/ [get]

func (BackupAccountController) PatchBy

Update BackupAccount @Tags backupAccounts @Summary Update a backupAccount @Description 更新备份账号 @Accept json @Produce json @Param request body dto.BackupAccountUpdate true "request" @Success 200 {object} dto.BackupAccount @Security ApiKeyAuth @Router /backupAccounts/{name}/ [patch]

func (BackupAccountController) Post

Create BackupAccount @Tags backupAccounts @Summary Create a backupAccount @Description 创建备份账号 @Accept json @Produce json @Param request body dto.BackupAccountRequest true "request" @Success 200 {object} dto.BackupAccount @Security ApiKeyAuth @Router /backupaccounts/ [post]

func (BackupAccountController) PostBatch

func (b BackupAccountController) PostBatch() error

func (BackupAccountController) PostBuckets

func (b BackupAccountController) PostBuckets() ([]interface{}, error)

func (BackupAccountController) PostSearch

func (b BackupAccountController) PostSearch() (*page.Page, error)

Search BackupAccount @Tags backupAccounts @Summary Search backupAccount @Description 过滤备份账号 @Accept json @Produce json @Param conditions body condition.Conditions true "conditions" @Success 200 {object} page.Page @Security ApiKeyAuth @Router /backupaccounts/search [post]

type BackupFileController

type BackupFileController struct {
	Ctx                      context.Context
	ClusterBackupFileService service.CLusterBackupFileService
}

func NewClusterBackupFileController

func NewClusterBackupFileController() *BackupFileController

func (BackupFileController) DeleteBy

func (b BackupFileController) DeleteBy(name string) error

Delete BackupFile @Tags backupFiles @Summary Delete a BackupFile @Description delete a BackupFile by name @Accept json @Produce json @Security ApiKeyAuth @Router /cluster/backup/files/{name}/ [delete]

func (BackupFileController) Get

func (b BackupFileController) Get() (*page.Page, error)

List BackupFile @Tags backupFiles @Summary Show all backupFiles @Description Show backupFiles @Accept json @Produce json @Success 200 {object} page.Page @Security ApiKeyAuth @Router /cluster/backup/files/ [get]

func (BackupFileController) PostBackup

func (b BackupFileController) PostBackup() error

CLuster Backup @Tags backupFiles @Summary Backup CLuster @Description Backup CLuster @Accept json @Produce json @Param request body dto.ClusterBackupFileCreate true "request" @Success 200 @Security ApiKeyAuth @Router /cluster/backup/files/backup/ [post]

func (BackupFileController) PostBatch

func (b BackupFileController) PostBatch() error

func (BackupFileController) PostRestore

func (b BackupFileController) PostRestore() error

CLuster Restore @Tags backupFiles @Summary Restore CLuster @Description Restore CLuster @Accept json @Produce json @Param request body dto.ClusterBackupFileRestore true "request" @Success 200 @Security ApiKeyAuth @Router /cluster/backup/files/restore/ [post]

func (BackupFileController) PostRestoreLocal

func (b BackupFileController) PostRestoreLocal() error

type ClusterBackupStrategyController

type ClusterBackupStrategyController struct {
	Ctx                          context.Context
	CLusterBackupStrategyService service.CLusterBackupStrategyService
}

func NewClusterBackupStrategyController

func NewClusterBackupStrategyController() *ClusterBackupStrategyController

func (ClusterBackupStrategyController) GetStrategyBy

func (c ClusterBackupStrategyController) GetStrategyBy(clusterName string) (*dto.ClusterBackupStrategy, error)

Get Cluster Backup Strategy By ClusterName @Tags backupStrategy @Summary Get Cluster Backup Strategy @Description Get Cluster Backup Strategy @Accept json @Produce json @Success 200 {object} dto.ClusterBackupStrategy @Security ApiKeyAuth @Router /cluster/backup/strategy/{clusterName}/ [get]

func (ClusterBackupStrategyController) PostStrategy

Create/Update Cluster Backup Strategy @Tags backupStrategy @Summary Create a Backup Strategy @Description create a Backup Strategy @Accept json @Produce json @Param request body dto.ClusterBackupStrategyRequest true "request" @Success 200 {object} dto.ClusterBackupStrategy @Security ApiKeyAuth @Router /cluster/backup/strategy/ [post]

type ClusterController

type ClusterController struct {
	Ctx                   context.Context
	ClusterService        service.ClusterService
	ClusterInitService    service.ClusterInitService
	ClusterNodeService    service.ClusterNodeService
	ClusterImportService  service.ClusterImportService
	CisService            service.CisService
	ClusterUpgradeService service.ClusterUpgradeService
	ClusterHealthService  service.ClusterHealthService
	BackupAccountService  service.BackupAccountService
}

func NewClusterController

func NewClusterController() *ClusterController

func (ClusterController) DeleteBy

func (c ClusterController) DeleteBy(name string) error

Delete Cluster @Tags clusters @Summary Delete a cluster @Description delete a cluster by name @Param force query string true "是否强制(true, false)" @Param uninstall query string true "是否卸载(true, false)" @Accept json @Produce json @Security ApiKeyAuth @Router /clusters/{name}/ [delete]

func (ClusterController) DeleteCisBy

func (c ClusterController) DeleteCisBy(clusterName string, id string) error

func (ClusterController) Get

func (c ClusterController) Get() (*dto.ClusterPage, error)

List Cluster @Tags clusters @Summary Show all clusters @Description Show clusters @Accept json @Produce json @Success 200 {object} page.Page @Security ApiKeyAuth @Router /clusters/ [get]

func (*ClusterController) GetBackupaccountsBy

func (c *ClusterController) GetBackupaccountsBy(name string) ([]dto.BackupAccount, error)

func (ClusterController) GetBy

func (c ClusterController) GetBy(name string) (*dto.Cluster, error)

Get Cluster @Tags clusters @Summary Show a cluster @Description Show a cluster @Accept json @Produce json @Success 200 {object} dto.Cluster @Security ApiKeyAuth @Router /clusters/{name}/ [get]

func (ClusterController) GetCisBy

func (c ClusterController) GetCisBy(clusterName string) (*page.Page, error)

func (ClusterController) GetCisdetailBy

func (c ClusterController) GetCisdetailBy(clusterName string, id string) (*dto.CisTaskDetail, error)

func (ClusterController) GetCisreportBy

func (c ClusterController) GetCisreportBy(clusterName, id string) error

func (ClusterController) GetExistenceBy

func (c ClusterController) GetExistenceBy(name string) *dto.IsClusterNameExist

func (*ClusterController) GetHealthBy

func (c *ClusterController) GetHealthBy(clusterName string) (*dto.ClusterHealth, error)

func (ClusterController) GetNameBy

func (c ClusterController) GetNameBy(projectNames string) ([]dto.ClusterInfo, error)

Get Cluster Name By Projects @Tags clusters @Summary Show cluster names of projects @Description Show a cluster names of projects @Accept json @Produce json @Success 200 {object} dto.Cluster @Security ApiKeyAuth @Router /clusters/name/{projectNames} [get]

func (ClusterController) GetNodeBy

func (c ClusterController) GetNodeBy(clusterName string) (*dto.NodePage, error)

Get Cluster Nodes @Tags clusters @Summary Get cluster nodes @Description Get cluster nodes @Accept json @Produce json @Security ApiKeyAuth @Router /clusters/node/{clusterName} [get]

func (ClusterController) GetNodeDetailBy

func (c ClusterController) GetNodeDetailBy(clusterName string, nodeName string) (*dto.Node, error)

Get Cluster Details @Tags clusters @Summary Get cluster node details @Description Get cluster node details @Accept json @Produce json @Security ApiKeyAuth @Success 200 {object} dto.Node @Router /clusters/node/{clusterName}/{nodeName} [get]

func (ClusterController) GetSecretBy

func (c ClusterController) GetSecretBy(clusterName string) (*dto.ClusterSecret, error)

func (ClusterController) GetStatusBy

func (c ClusterController) GetStatusBy(name string) (*dto.TaskLog, error)

func (ClusterController) GetWebkubectlBy

func (c ClusterController) GetWebkubectlBy(clusterName string) (*dto.WebkubectlToken, error)

func (ClusterController) Post

func (c ClusterController) Post() (*dto.Cluster, error)

Create Cluster @Tags clusters @Summary Create a cluster @Description Create a cluster @Param request body dto.ClusterCreate true "request" @Accept json @Produce json @Success 200 {object} dto.Cluster @Security ApiKeyAuth @Router /clusters/ [post]

func (ClusterController) PostCisBy

func (c ClusterController) PostCisBy(clusterName string) (*dto.CisTask, error)

func (ClusterController) PostImport

func (c ClusterController) PostImport() error

Import Cluster @Tags clusters @Summary Import a cluster @Description import a cluster @Param request body dto.ClusterImport true "request" @Accept json @Produce json @Security ApiKeyAuth @Router /clusters/import/ [post]

func (ClusterController) PostInitBy

func (c ClusterController) PostInitBy(name string) error

func (ClusterController) PostLoad

func (c ClusterController) PostLoad() (dto.ClusterLoadInfo, error)

Load Cluster Info for import @Tags clusters @Summary Load cluster info @Description Upgrade a cluster @Param request body dto.ClusterLoad true "request" @Accept json @Produce json @Success 200 {object} dto.ClusterLoadInfo @Security ApiKeyAuth @Router /clusters/load [post]

func (ClusterController) PostNodeBatchBy

func (c ClusterController) PostNodeBatchBy(clusterName string) error

Batch Delete Or Create Cluster Node @Tags clusters @Summary Batch delete or create cluster node @Description Batch delete or create cluster node @Accept json @Produce json @Param request body dto.NodeBatch true "request" @Success 200 @Security ApiKeyAuth @Router /clusters/node/batch/{clusterName} [post]

func (ClusterController) PostNodeRecreateBy

func (c ClusterController) PostNodeRecreateBy(clusterName string) error

Recreate Cluster Node @Tags clusters @Summary Recreate cluster node @Description Recreate cluster node @Accept json @Produce json @Param request body dto.NodeBatch true "request" @Security ApiKeyAuth @Success 200 @Router /clusters/node/recreate/{clusterName} [post]

func (*ClusterController) PostRecoverBy

func (c *ClusterController) PostRecoverBy(clusterName string) ([]dto.ClusterRecoverItem, error)

func (ClusterController) PostSearch

func (c ClusterController) PostSearch() (*dto.ClusterPage, error)

Search Cluster @Tags clusters @Summary Search cluster @Description 过滤集群 @Accept json @Produce json @Param conditions body condition.Conditions true "conditions" @Success 200 {object} page.Page @Security ApiKeyAuth @Router /clusters/search [post]

func (ClusterController) PostUpgrade

func (c ClusterController) PostUpgrade() error

Upgrade Cluster @Tags clusters @Summary Upgrade a cluster @Description Upgrade a cluster @Param request body dto.ClusterUpgrade true "request" @Accept json @Produce json @Success 200 @Security ApiKeyAuth @Router /clusters/upgrade [post]

type ClusterMemberController

type ClusterMemberController struct {
	Ctx                  context.Context
	ClusterMemberService service.ClusterMemberService
}

func NewClusterMemberController

func NewClusterMemberController() *ClusterMemberController

func (ClusterMemberController) DeleteBy

func (c ClusterMemberController) DeleteBy(name string) error

Delete CLusterMember @Tags clusterMembers @Summary Delete cLusterMember @Description 取消集群人员授权 @Accept json @Produce json @Param project path string true "项目名称" @Param cluster path string true "集群名称" @Param name path string true "人员名称" @Security ApiKeyAuth @Router /projects/{project}/clusters/{cluster}/members/{name} [delete]

func (ClusterMemberController) Get

func (c ClusterMemberController) Get() (*page.Page, error)

List clusterMember @Tags clusterMembers @Summary Show all clusterMembers @Description 获取集群成员列表 @Accept json @Produce json @Param project path string true "项目名称" @Param cluster path string true "集群名称" @Success 200 {object} page.Page @Security ApiKeyAuth @Router /projects/{project}/clusters/{cluster}/members [get]

func (ClusterMemberController) GetSearch

func (ClusterMemberController) GetUsers

func (ClusterMemberController) Post

Create CLusterMember @Tags clusterMembers @Summary Create a cLusterMember @Description 授权成员到集群 @Accept json @Produce json @Param request body dto.ClusterMemberCreate true "request" @Param project path string true "项目名称" @Param cluster path string true "集群名称" @Success 200 {Array} []dto.CLusterMember @Security ApiKeyAuth @Router /projects/{project}/clusters/{cluster}/members [post]

type ClusterResourceController

type ClusterResourceController struct {
	Ctx                    context.Context
	ClusterResourceService service.ClusterResourceService
}

func NewClusterResourceController

func NewClusterResourceController() *ClusterResourceController

func (ClusterResourceController) DeleteBy

func (c ClusterResourceController) DeleteBy(name string) error

Delete ClusterResource @Tags clusterResources @Summary Delete clusterResource @Description 取消集群资源授权 @Accept json @Produce json @Param resourceType query string true "资源类型(HOST,PLAN,BACKUP_ACCOUNT)" @Param project path string true "项目名称" @Param cluster path string true "集群名称" @Param name path string true "资源名称" @Security ApiKeyAuth @Router /projects/{project}/clusters/{cluster}/resources/{name} [delete]

func (ClusterResourceController) Get

List clusterResource @Tags clusterResources @Summary Show all clusterResources @Description 获取集群资源列表 @Accept json @Produce json @Param project path string true "项目名称" @Param cluster path string true "集群名称" @Success 200 {object} page.Page @Security ApiKeyAuth @Router /projects/{project}/clusters/{cluster}/resources [get]

func (ClusterResourceController) GetList

func (c ClusterResourceController) GetList() (interface{}, error)

func (ClusterResourceController) Post

Create ClusterResource @Tags clusterResources @Summary Create a clusterResource @Description 授权资源到集群 @Accept json @Produce json @Param request body dto.ClusterResourceCreate true "request" @Param project path string true "项目名称" @Param cluster path string true "集群名称" @Success 200 {Array} []dto.ClusterResource @Security ApiKeyAuth @Router /projects/{project}/clusters/{cluster}/resources [post]

type ClusterToolController

type ClusterToolController struct {
	Ctx                context.Context
	ClusterToolService service.ClusterToolService
}

func NewClusterToolController

func NewClusterToolController() *ClusterToolController

func (ClusterToolController) GetBy

func (c ClusterToolController) GetBy(clusterName string) ([]dto.ClusterTool, error)

func (ClusterToolController) GetFlexBy

func (c ClusterToolController) GetFlexBy(clusterName string) (string, error)

func (ClusterToolController) GetPortBy

func (c ClusterToolController) GetPortBy(clusterName, toolName string) (string, error)

func (ClusterToolController) PostDisableBy

func (c ClusterToolController) PostDisableBy(clusterName string) (*dto.ClusterTool, error)

func (ClusterToolController) PostEnableBy

func (c ClusterToolController) PostEnableBy(clusterName string) (*dto.ClusterTool, error)

func (ClusterToolController) PostFlexDisableBy

func (c ClusterToolController) PostFlexDisableBy(clusterName string) error

func (ClusterToolController) PostFlexEnableBy

func (c ClusterToolController) PostFlexEnableBy(clusterName string) error

func (ClusterToolController) PostSyncBy

func (c ClusterToolController) PostSyncBy(clusterName string) (*[]dto.ClusterTool, error)

func (ClusterToolController) PostUpgradeBy

func (c ClusterToolController) PostUpgradeBy(clusterName string) (*dto.ClusterTool, error)

type ClusterVeleroBackupController

type ClusterVeleroBackupController struct {
	Ctx                 context.Context
	VeleroBackupService service.VeleroBackupService
}

func NewClusterVeleroBackupController

func NewClusterVeleroBackupController() *ClusterVeleroBackupController

func (ClusterVeleroBackupController) DeleteDel

func (c ClusterVeleroBackupController) DeleteDel() (string, error)

func (ClusterVeleroBackupController) DeleteUninstall

func (c ClusterVeleroBackupController) DeleteUninstall() error

func (ClusterVeleroBackupController) Get

func (c ClusterVeleroBackupController) Get() (interface{}, error)

func (ClusterVeleroBackupController) GetDescribe

func (c ClusterVeleroBackupController) GetDescribe() (string, error)

func (ClusterVeleroBackupController) GetInstallConfig

func (c ClusterVeleroBackupController) GetInstallConfig() (dto.VeleroInstall, error)

func (ClusterVeleroBackupController) GetLogs

func (ClusterVeleroBackupController) PostCreate

func (c ClusterVeleroBackupController) PostCreate() (string, error)

func (ClusterVeleroBackupController) PostInstallConfig

func (c ClusterVeleroBackupController) PostInstallConfig() (string, error)

type ComponentController

type ComponentController struct {
	Ctx              context.Context
	ComponentService service.ComponentService
}

func NewComponentController

func NewComponentController() *ComponentController

func (ComponentController) DeleteBy

func (c ComponentController) DeleteBy(cluster, name string) error

Delete Component @Tags components @Summary Delete a component @Description 删除一个集群组件 @Accept json @Produce json @Param cluster path string true "集群名称" @Param name path string true "组件名称" @Success 200 @Security ApiKeyAuth @Router /components/{cluster}/{name} [delete]

func (ComponentController) Get

func (c ComponentController) Get() ([]dto.Component, error)

List Component @Tags clusters @Summary Show all components @Description Show components @Accept json @Produce json @Param cluster path string true "集群名称" @Success 200 {object} []dto.Component @Security ApiKeyAuth @Router /components/ [get]

func (ComponentController) Post

func (c ComponentController) Post() error

Create Component @Tags components @Summary Create a component @Description 添加一个集群组件 @Accept json @Produce json @Param request body dto.ComponentCreate true "request" @Success 200 @Security ApiKeyAuth @Router /components/ [post]

func (ComponentController) PostSync

func (c ComponentController) PostSync() error

Sync Component @Tags components @Summary Sync components @Description 同步集群组件 @Accept json @Produce json @Param request body dto.ComponentSync true "request" @Success 200 @Security ApiKeyAuth @Router /components/sync [post]

type CredentialController

type CredentialController struct {
	Ctx               context.Context
	CredentialService service.CredentialService
}

func NewCredentialController

func NewCredentialController() *CredentialController

func (CredentialController) DeleteBy

func (c CredentialController) DeleteBy(name string) error

Delete Credential @Tags credentials @Summary Delete a credential @Description 通过名称删除单个凭据 @Accept json @Produce json @Security ApiKeyAuth @Router /credentials/{name}/ [delete]

func (CredentialController) Get

func (c CredentialController) Get() (*page.Page, error)

List Credential @Tags credentials @Summary Show all credentials @Description Show credentials @Accept json @Produce json @Success 200 {object} page.Page @Security ApiKeyAuth @Router /credentials/ [get]

func (CredentialController) GetBy

func (c CredentialController) GetBy(name string) (dto.Credential, error)

func (CredentialController) PatchBy

func (c CredentialController) PatchBy(name string) (*dto.Credential, error)

Update Credential @Tags credentials @Summary Update a credential @Description 更新单个凭据 @Accept json @Produce json @Param request body dto.CredentialUpdate true "request" @Success 200 {object} dto.Credential @Security ApiKeyAuth @Router /credentials/ [patch]

func (CredentialController) Post

Create Credential @Tags credentials @Summary Create a credential @Description 创建一个凭据 @Accept json @Produce json @Param request body dto.CredentialCreate true "request" @Success 200 {object} dto.Credential @Security ApiKeyAuth @Router /credentials/ [post]

func (CredentialController) PostBatch

func (c CredentialController) PostBatch() error

func (CredentialController) PostSearch

func (c CredentialController) PostSearch() (*page.Page, error)

Search Credential @Tags credentials @Summary Search credential @Description 过滤凭据 @Accept json @Produce json @Param conditions body condition.Conditions true "conditions" @Success 200 {object} page.Page @Security ApiKeyAuth @Router /credentials/search [post]

type ForgotPasswordController

type ForgotPasswordController struct {
	Ctx         context.Context
	UserService service.UserService
}

func NewForgotPasswordController

func NewForgotPasswordController() *ForgotPasswordController

func (ForgotPasswordController) PostForgotPassword

func (u ForgotPasswordController) PostForgotPassword() error

type GradeController

type GradeController struct {
	Ctx          context.Context
	GradeService service.GradeService
}

func NewGradeController

func NewGradeController() *GradeController

func (GradeController) GetBy

func (g GradeController) GetBy(clusterName string) (*dto.ClusterGrade, error)

type HostController

type HostController struct {
	Ctx                  context.Context
	HostService          service.HostService
	SystemSettingService service.SystemSettingService
}

func NewHostController

func NewHostController() *HostController

func (*HostController) DeleteBy

func (h *HostController) DeleteBy(name string) error

Delete Host @Tags hosts @Summary Delete a host @Description delete a host by name @Accept json @Produce json @Security ApiKeyAuth @Router /hosts/{name}/ [delete]

func (*HostController) Get

func (h *HostController) Get() (*page.Page, error)

List Host @Tags hosts @Summary Show all hosts @Description Show hosts @Accept json @Produce json @Success 200 {object} page.Page @Security ApiKeyAuth @Router /hosts/ [get]

func (*HostController) GetBy

func (h *HostController) GetBy(name string) (*dto.Host, error)

Get Host @Tags hosts @Summary Show a host @Description show a host by name @Accept json @Produce json @Success 200 {object} dto.Host @Security ApiKeyAuth @Router /hosts/{name}/ [get]

func (*HostController) GetTemplate

func (h *HostController) GetTemplate() error

Download Host Template File @Tags hosts @Summary Download Host Template File @Description download template file for import hosts @Accept json @Produce json @Security ApiKeyAuth @Router /hosts/template/ [get]

func (*HostController) Patch

func (h *HostController) Patch() (*dto.Host, error)

Update Host @Tags hosts @Summary Update a host @Description 更新主机信息 @Accept json @Produce json @Param request body dto.HostUptate true "request" @Success 200 {object} dto.Host @Security ApiKeyAuth @Router /host [patch]

func (*HostController) Post

func (h *HostController) Post() (*dto.Host, error)

Create Host @Tags hosts @Summary Create a host @Description create a host @Accept json @Produce json @Param request body dto.HostCreate true "request" @Success 200 {object} dto.Host @Security ApiKeyAuth @Router /hosts/ [post]

func (*HostController) PostBatch

func (h *HostController) PostBatch() error

func (*HostController) PostSearch

func (h *HostController) PostSearch() (*page.Page, error)

Search Host @Tags hosts @Summary Search Host @Description 过滤主机 @Accept json @Produce json @Param conditions body condition.Conditions true "conditions" @Success 200 {object} page.Page @Security ApiKeyAuth @Router /host/search [post]

func (*HostController) PostSync

func (h *HostController) PostSync() error

Sync Host @Tags hosts @Summary Sync hosts @Description 同步主机状态 @Accept json @Produce json @Param request body dto.HostSync true "request" @Success 200 @Security ApiKeyAuth @Router /hosts/sync [post]

func (*HostController) PostUpload

func (h *HostController) PostUpload() error

Upload File for import @Tags hosts @Summary Upload File for import @Description Upload File for import hosts @Accept mpfd @Produce json @Security ApiKeyAuth @Router /hosts/upload/ [post]

type Info

type Info struct {
	Status string `json:"status"`
	Msg    string `json:"message"`
}

type IpController

type IpController struct {
	Ctx       context.Context
	IpService service.IpService
}

func NewIpController

func NewIpController() *IpController

func (IpController) DeleteBy

func (i IpController) DeleteBy(address string) error

Delete Ip @Tags ips @Summary Delete a Ip @Description 删除IP @Accept json @Produce json @Param name path string true "IP池名称" @Security ApiKeyAuth @Router /ippools/{name}/ips/{address} [delete]

func (IpController) Get

func (i IpController) Get() (*page.Page, error)

List IP @Tags ips @Summary Show ips by ipPoolName @Description 获取IP池下的IP列表 @Accept json @Produce json @Param name path string true "IP池名称" @Success 200 {object} page.Page @Security ApiKeyAuth @Router /ippools/{name}/ips [get]

func (IpController) PatchBy

func (i IpController) PatchBy(name string) (*dto.Ip, error)

Update Ip @Tags ips @Summary Update a Ip @Description 更新 Ip @Accept json @Produce json @Param request body dto.IpUpdate true "request" @Param name path string true "IP池名称" @Success 200 {object} dto.Ip @Security ApiKeyAuth @Router /ippools/{ipPoolName}/ips/{name} [patch]

func (IpController) PatchSync

func (i IpController) PatchSync() error

func (IpController) Post

func (i IpController) Post() error

Create Ip @Tags ips @Summary Create a Ip @Description 新增 Ip @Accept json @Produce json @Param request body dto.IpCreate true "request" @Param name path string true "IP池名称" @Success 200 {object} dto.Ip @Security ApiKeyAuth @Router /ippools/{name}/ips [post]

func (IpController) PostBatch

func (i IpController) PostBatch() error

func (IpController) PostSearch

func (i IpController) PostSearch() (*page.Page, error)

Search Ip @Tags ips @Summary Search Ip @Description 过滤IP @Accept json @Produce json @Param conditions body condition.Conditions true "conditions" @Param name path string true "IP池名称" @Success 200 {object} page.Page @Security ApiKeyAuth @Router /ippools/{name}/search [post]

type IpPoolController

type IpPoolController struct {
	Ctx           context.Context
	IpPoolService service.IpPoolService
}

func NewIpPoolController

func NewIpPoolController() *IpPoolController

func (IpPoolController) DeleteBy

func (i IpPoolController) DeleteBy(name string) error

Delete IpPool @Tags ippools @Summary Delete a IpPool @Description 删除IP池 @Accept json @Produce json @Param name path string true "IP池名称" @Security ApiKeyAuth @Router /ippools/{name} [delete]

func (IpPoolController) Get

func (i IpPoolController) Get() (*page.Page, error)

List IpPool @Tags ippools @Summary Show all ippools @Description 获取IP池列表 @Accept json @Produce json @Success 200 {object} page.Page @Security ApiKeyAuth @Router /ippools [get]

func (IpPoolController) GetBy

func (i IpPoolController) GetBy(name string) (dto.IpPool, error)

Get IpPool @Tags ippools @Summary Get IpPool @Description 获取单个IP池 @Accept json @Produce json @Param name path string true "IP池名称" @Success 200 {object} dto.IpPool @Security ApiKeyAuth @Router /ippools/{name} [get]

func (IpPoolController) Post

func (i IpPoolController) Post() (*dto.IpPool, error)

Create IpPool @Tags ippools @Summary Create a IpPool @Description 创建IP池 @Accept json @Produce json @Param request body dto.IpPoolCreate true "request" @Success 200 {object} dto.IpPool @Security ApiKeyAuth @Router /ippools [post]

func (IpPoolController) PostBatch

func (i IpPoolController) PostBatch() error

func (IpPoolController) PostSearch

func (i IpPoolController) PostSearch() (*page.Page, error)

Search IpPool @Tags ippools @Summary Search IpPool @Description 过滤IP池 @Accept json @Produce json @Param conditions body condition.Conditions true "conditions" @Success 200 {object} page.Page @Security ApiKeyAuth @Router /ippools/search [post]

type KubePiController

type KubePiController struct {
	Ctx            context.Context
	KubePiService  service.KubepiService
	ClusterService service.ClusterService
	// contains filtered or unexported fields
}

func NewKubePiController

func NewKubePiController() *KubePiController

func (*KubePiController) GetJumpBy

func (p *KubePiController) GetJumpBy(project string, clusterName string) (*dto.Dashboard, error)

func (*KubePiController) GetUser

func (u *KubePiController) GetUser() (interface{}, error)

func (*KubePiController) PostBind

func (p *KubePiController) PostBind() error

func (*KubePiController) PostCheckConn

func (p *KubePiController) PostCheckConn() error

func (*KubePiController) PostSearch

func (p *KubePiController) PostSearch() (*dto.BindResponse, error)

type KubernetesController

type KubernetesController struct {
	Ctx               context.Context
	KubernetesService service.KubernetesService
}

func NewKubernetesController

func NewKubernetesController() *KubernetesController

func (KubernetesController) PostCordon

func (k KubernetesController) PostCordon() error

func (KubernetesController) PostCreateSc

func (k KubernetesController) PostCreateSc() error

func (KubernetesController) PostCreateSecret

func (k KubernetesController) PostCreateSecret() error

func (KubernetesController) PostDelete

func (k KubernetesController) PostDelete() error

func (KubernetesController) PostEvict

func (k KubernetesController) PostEvict() error

func (KubernetesController) PostSearch

func (k KubernetesController) PostSearch() (interface{}, error)

func (KubernetesController) PostSearchMetricBy

func (k KubernetesController) PostSearchMetricBy(cluster string) (interface{}, error)

type LdapController

type LdapController struct {
	Ctx         context.Context
	LdapService service.LdapService
}

func NewLdapController

func NewLdapController() *LdapController

func (*LdapController) GetSync

func (l *LdapController) GetSync() ([]dto.LdapUser, error)

func (LdapController) Post

func (l LdapController) Post() ([]dto.SystemSetting, error)

func (*LdapController) PostImportUsers

func (l *LdapController) PostImportUsers() error

func (*LdapController) PostTestConnect

func (l *LdapController) PostTestConnect() (*dto.LdapResult, error)

func (*LdapController) PostTestLogin

func (l *LdapController) PostTestLogin() error

type LicenseController

type LicenseController struct {
	Ctx            context.Context
	LicenseService service.LicenseService
}

func NewLicenseController

func NewLicenseController() *LicenseController

func (*LicenseController) Get

func (l *LicenseController) Get() (*dto.License, error)

func (*LicenseController) Post

func (l *LicenseController) Post() (*dto.License, error)

type ManifestController

type ManifestController struct {
	Ctx             context.Context
	ManifestService service.ClusterManifestService
}

func NewManifestController

func NewManifestController() *ManifestController

func (*ManifestController) Get

func (*ManifestController) GetActive

func (m *ManifestController) GetActive() ([]dto.ClusterManifest, error)

func (*ManifestController) GetGroup

func (m *ManifestController) GetGroup() ([]dto.ClusterManifestGroup, error)

List Manifest @Tags manifest @Summary Show all manifest @Description 获取Kubernetes版本列表 @Accept json @Produce json @Success 200 {object} []dto.ClusterManifestGroup @Security ApiKeyAuth @Router /manifest [get]

func (ManifestController) PatchBy

Update Manifest @Tags manifest @Summary Update a manifest @Description 更新 Kubernetes 版本状态 @Accept json @Produce json @Param request body dto.ClusterManifestUpdate true "request" @Param name path string true "Kubernetes 版本" @Success 200 {object} dto.ClusterManifestUpdate @Security ApiKeyAuth @Router /manifest/{name} [patch]

type MessageAccountController

type MessageAccountController struct {
	Ctx        context.Context
	MsgService service.MsgAccountService
}

func NewMessageAccountController

func NewMessageAccountController() *MessageAccountController

func (MessageAccountController) GetBy

func (MessageAccountController) Post

func (MessageAccountController) PostVerify

func (m MessageAccountController) PostVerify() error

type MessageSubscribeController

type MessageSubscribeController struct {
	Ctx                 context.Context
	MsgSubscribeService service.MsgSubscribeService
}

func NewMessageSubscribeController

func NewMessageSubscribeController() *MessageSubscribeController

func (MessageSubscribeController) GetUsers

func (MessageSubscribeController) PostDeleteUser

func (m MessageSubscribeController) PostDeleteUser() error

func (MessageSubscribeController) PostSearch

func (m MessageSubscribeController) PostSearch() (page.Page, error)

func (MessageSubscribeController) PostUpdate

func (m MessageSubscribeController) PostUpdate() error

func (MessageSubscribeController) PostUser

func (m MessageSubscribeController) PostUser() error

func (MessageSubscribeController) PostUsers

func (m MessageSubscribeController) PostUsers() (page.Page, error)

type MonitorController

type MonitorController struct {
	Ctx                context.Context
	ClusterToolService service.ClusterToolService
}

func NewMonitorController

func NewMonitorController() *MonitorController

func (MonitorController) PostSearchBy

func (m MonitorController) PostSearchBy(clusterName string) ([]dto.Metric, error)

type NtpServerController

type NtpServerController struct {
	Ctx              context.Context
	NtpServerService service.NtpServerService
}

func NewNtpServerController

func NewNtpServerController() *NtpServerController

func (NtpServerController) DeleteBy

func (s NtpServerController) DeleteBy(name string) error

Delete Registry @Tags NtpServer @Summary Delete a Registry @Description delete a Registry by name @Param name path string true "CPU 架构" @Accept json @Produce json @Security ApiKeyAuth @Router /ntp/{name}/ [delete]

func (*NtpServerController) Get

func (u *NtpServerController) Get() (*page.Page, error)

List NtpServer @Tags ntpServer @Summary Show ntpServer @Description 获取用户列表 @Accept json @Produce json @Success 200 {object} page.Page @Security ApiKeyAuth @Router /ntpServer [get]

func (NtpServerController) PatchBy

func (s NtpServerController) PatchBy(name string) (*dto.NtpServer, error)

Update Registry @Tags NtpServer @Summary Update a Registry @Description 更新NtpServer @Accept json @Produce json @Param request body dto.NtpServerUpdate true "request" @Param name path string true "名称" @Success 200 {object} dto.NtpServer @Security ApiKeyAuth @Router /ntp/{name} [patch]

func (NtpServerController) Post

func (s NtpServerController) Post() (*dto.NtpServer, error)

Create NtpServers @Tags NtpServer @Summary Create a NtpServer @Description 创建ntpServer @Accept json @Produce json @Param request body dto.NtpServerCreate true "request" @Success 200 {object} dto.NtpServer @Security ApiKeyAuth @Router /ntp [post]

type PlanController

type PlanController struct {
	Ctx         context.Context
	PlanService service.PlanService
}

func NewPlanController

func NewPlanController() *PlanController

func (PlanController) DeleteBy

func (p PlanController) DeleteBy(name string) error

Delete Plan @Tags plans @Summary Delete a plan @Description 删除部署计划 @Accept json @Produce json @Security ApiKeyAuth @Router /plans/{name} [delete]

func (PlanController) Get

func (p PlanController) Get() (*page.Page, error)

List Plan @Tags plans @Summary Show all plans @Description 获取部署计划列表 @Accept json @Produce json @Success 200 {object} page.Page @Security ApiKeyAuth @Router /plans [get]

func (PlanController) GetBy

func (p PlanController) GetBy(name string) (*dto.Plan, error)

Get Plan @Tags plans @Summary Show a Plan @Description 获取单个部署计划 @Accept json @Produce json @Param name path string true "部署计划名称" @Success 200 {object} dto.Plan @Security ApiKeyAuth @Router /plans/{name} [get]

func (PlanController) GetConfigsBy

func (p PlanController) GetConfigsBy(regionName string) ([]dto.PlanVmConfig, error)

Get Config @Tags plans @Summary Get vmConfigs @Description 获取虚拟机配置 @Accept json @Produce json @Param name path string true "区域名称" @Success 200 {Array} []dto.PlanVmConfig @Security ApiKeyAuth @Router /configs/{regionName} [get]

func (PlanController) PatchBy

func (p PlanController) PatchBy(name string) (*dto.Plan, error)

Update Plan @Tags plans @Summary Update a plan @Description 更新部署计划 @Accept json @Produce json @Param request body dto.PlanUpdate true "request" @Param name path string true "部署计划名称" @Success 200 {object} dto.Plan @Security ApiKeyAuth @Router /plans/{name} [patch]

func (PlanController) Post

func (p PlanController) Post() (*dto.Plan, error)

Create Plan @Tags plans @Summary Create a plan @Description 创建部署计划 @Accept json @Produce json @Param request body dto.PlanCreate true "request" @Success 200 {object} dto.Plan @Security ApiKeyAuth @Router /plans [post]

func (PlanController) PostBatch

func (p PlanController) PostBatch() error

func (PlanController) PostSearch

func (p PlanController) PostSearch() (*page.Page, error)

Search Plan @Tags plans @Summary Search plans @Description 过滤部署计划 @Accept json @Produce json @Param conditions body condition.Conditions true "conditions" @Success 200 {object} page.Page @Security ApiKeyAuth @Router /plans/search [post]

type ProjectController

type ProjectController struct {
	Ctx            context.Context
	ProjectService service.ProjectService
}

func NewProjectController

func NewProjectController() *ProjectController

func (ProjectController) DeleteBy

func (p ProjectController) DeleteBy(name string) error

Delete Project @Tags projects @Summary Delete a project @Description 删除项目 @Accept json @Produce json @Param name path string true "项目名称" @Success 200 @Security ApiKeyAuth @Router /projects/{name} [delete]

func (ProjectController) Get

func (p ProjectController) Get() (*page.Page, error)

List Project @Tags projects @Summary Show all projects @Description 获取项目列表 @Accept json @Produce json @Success 200 {object} page.Page @Security ApiKeyAuth @Router /projects [get]

func (ProjectController) GetBy

func (p ProjectController) GetBy(name string) (*dto.Project, error)

Get Project @Tags projects @Summary Show a project @Description 获取单个项目 @Accept json @Produce json @Param name path string true "项目名称" @Success 200 {object} dto.Project @Security ApiKeyAuth @Router /projects/{name} [get]

func (ProjectController) GetClusters

func (p ProjectController) GetClusters() ([]dto.Project, error)

func (ProjectController) GetTree

func (ProjectController) PatchBy

func (p ProjectController) PatchBy(name string) (*dto.Project, error)

Update Project @Tags projects @Summary Update a project @Description 更新项目 @Accept json @Produce json @Param request body dto.ProjectUpdate true "request" @Param name path string true "项目名称" @Success 200 {object} dto.Project @Security ApiKeyAuth @Router /projects/{name} [patch]

func (ProjectController) Post

func (p ProjectController) Post() (*dto.Project, error)

Create Project @Tags projects @Summary Create a project @Description 创建项目 @Accept json @Produce json @Param request body dto.ProjectCreate true "request" @Success 200 {object} dto.Project @Security ApiKeyAuth @Router /projects [post]

func (ProjectController) PostBatch

func (p ProjectController) PostBatch() error

func (ProjectController) PostSearch

func (p ProjectController) PostSearch() (*page.Page, error)

type ProjectMemberController

type ProjectMemberController struct {
	Ctx                  context.Context
	ProjectMemberService service.ProjectMemberService
}

func NewProjectMemberController

func NewProjectMemberController() *ProjectMemberController

func (ProjectMemberController) DeleteBy

func (p ProjectMemberController) DeleteBy(name string) error

Delete Project Member @Tags projectMembers @Summary Delete projectMember @Description 取消项目人员授权 @Accept json @Produce json @Param project path string true "项目名称" @Param name path string true "人员名称" @Security ApiKeyAuth @Router /projects/{project}/members/{name} [delete]

func (ProjectMemberController) Get

func (p ProjectMemberController) Get() (*page.Page, error)

List ProjectMember By ProjectName @Tags projectMembers @Summary Show projectMembers by projectName @Description 获取项目成员列表 @Accept json @Produce json @Param project path string true "项目名称" @Success 200 {object} page.Page @Security ApiKeyAuth @Router /projects/{project}/members [get]

func (ProjectMemberController) GetBy

func (ProjectMemberController) GetUsers

func (ProjectMemberController) Post

@Description 授权成员到项目 @Accept json @Produce json @Param request body dto.ProjectMemberCreate true "request" @Param project path string true "项目名称" @Success 200 {object} dto.ProjectMember @Security ApiKeyAuth @Router /projects/{project}/members [post]

func (ProjectMemberController) PostBatch

func (p ProjectMemberController) PostBatch() error

type ProjectResourceController

type ProjectResourceController struct {
	Ctx                    context.Context
	ProjectResourceService service.ProjectResourceService
}

func NewProjectResourceController

func NewProjectResourceController() *ProjectResourceController

func (ProjectResourceController) DeleteBy

func (p ProjectResourceController) DeleteBy(name string) error

Delete Project Resource @Tags projectResources @Summary Delete projectResource @Description 取消项目资源授权 @Accept json @Produce json @Param project path string true "项目名称" @Param name path string true "资源名称" @Security ApiKeyAuth @Router /projects/{project}/resources/{name} [delete]

func (ProjectResourceController) Get

List ProjectResource By ResourceType @Tags projectResources @Summary Show projectResources by resourceType @Description 分页获取项目资源列表 @Accept json @Produce json @Param resourceType query string true "资源类型(HOST,PLAN,BACKUP_ACCOUNT)" @Param project path string true "项目名称" @Success 200 {object} page.Page @Security ApiKeyAuth @Router /projects/{project}/resources [get]

func (ProjectResourceController) GetList

func (p ProjectResourceController) GetList() (interface{}, error)

Get Project Resources @Tags projectResources @Summary Get projectResources @Description 获取能添加到项目的资源 @Accept json @Produce json @Param project path string true "项目名称" @Success 200 {object} interface{} @Security ApiKeyAuth @Router /projects/{project}/resources/list [get]

func (ProjectResourceController) Post

Create ProjectResource @Tags projectResources @Summary Create a projectResource @Description 授权资源到项目 @Accept json @Produce json @Param request body dto.ProjectResourceCreate true "request" @Param project path string true "项目名称" @Success 200 {object} dto.ProjectResource @Security ApiKeyAuth @Router /projects/{project}/resources [post]

type ProvisionerController

type ProvisionerController struct {
	Ctx                              context.Context
	ClusterStorageProvisionerService service.ClusterStorageProvisionerService
}

func NewProvisionerController

func NewProvisionerController() *ProvisionerController

func (ProvisionerController) GetBy

func (ProvisionerController) PostBy

func (c ProvisionerController) PostBy(name string) error

func (ProvisionerController) PostDeleteBy

func (c ProvisionerController) PostDeleteBy(clusterName string) error

func (ProvisionerController) PostSyncBy

func (c ProvisionerController) PostSyncBy(name string) error

type RegionController

type RegionController struct {
	Ctx           context.Context
	RegionService service.RegionService
}

func NewRegionController

func NewRegionController() *RegionController

func (RegionController) DeleteBy

func (r RegionController) DeleteBy(name string) error

Delete Region @Tags regions @Summary Delete a region @Description 删除区域 @Accept json @Produce json @Param name path string true "区域名称" @Security ApiKeyAuth @Router /regions/{name} [delete]

func (RegionController) Get

func (r RegionController) Get() (*page.Page, error)

List Region @Tags regions @Summary Show all regions @Description 获取区域列表 @Accept json @Produce json @Success 200 {object} page.Page @Security ApiKeyAuth @Router /regions [get]

func (RegionController) GetBy

func (r RegionController) GetBy(name string) (dto.Region, error)

Get Region @Tags regions @Summary Show a region @Description 获取单个区域 @Accept json @Produce json @Param name path string true "区域名称" @Success 200 {object} dto.Region @Security ApiKeyAuth @Router /regions/{name} [get]

func (RegionController) PatchBy

func (r RegionController) PatchBy(name string) (*dto.Region, error)

Update Region @Tags regions @Summary Update a region @Description 更新区域 @Accept json @Produce json @Param request body dto.RegionUpdate true "request" @Param name path string true "区域名称" @Success 200 {object} dto.Region @Security ApiKeyAuth @Router /regions/{name} [patch]

func (RegionController) Post

func (r RegionController) Post() (*dto.Region, error)

Create Region @Tags regions @Summary Create a region @Description 创建区域 @Accept json @Produce json @Param request body dto.RegionCreate true "request" @Success 200 {object} dto.Region @Security ApiKeyAuth @Router /regions [post]

func (RegionController) PostBatch

func (r RegionController) PostBatch() error

func (RegionController) PostDatacenter

func (r RegionController) PostDatacenter() (*dto.CloudRegionResponse, error)

Get Datacenter List @Tags regions @Summary Get datacenter list @Description 获取数据中心 @Accept json @Produce json @Param request body dto.RegionDatacenterRequest true "request" @Success 200 {object} dto.CloudRegionResponse @Security ApiKeyAuth @Router /regions/datacenter [post]

func (RegionController) PostSearch

func (r RegionController) PostSearch() (*page.Page, error)

Search Region @Tags regions @Summary Search regions @Description 过滤部署计划 @Accept json @Produce json @Param conditions body condition.Conditions true "conditions" @Success 200 {object} page.Page @Security ApiKeyAuth @Router /regions/search [post]

type SessionController

type SessionController struct {
	Ctx         context.Context
	UserService service.UserService
}

func NewSessionController

func NewSessionController() *SessionController

func (*SessionController) Delete

func (s *SessionController) Delete() error

Logout @Tags auth @Summary Logout @Description Logout @Accept json @Produce json @Router /auth/session/ [delete]

func (*SessionController) Get

func (s *SessionController) Get() (*dto.Profile, error)

func (*SessionController) GetStatus

func (s *SessionController) GetStatus() (*dto.SessionStatus, error)

func (*SessionController) Post

func (s *SessionController) Post() (*dto.Profile, error)

Login @Tags auth @Summary Login @Description Login @Param request body dto.LoginCredential true "request" @Accept json @Produce json @Success 200 {object} dto.Profile @Router /auth/session/ [post]

type SystemLogController

type SystemLogController struct {
	Ctx              context.Context
	SystemLogService service.SystemLogService
}

func NewSystemLogController

func NewSystemLogController() *SystemLogController

func (SystemLogController) Post

func (u SystemLogController) Post() (*page.Page, error)

Search SystemLog @Tags system_logs @Summary Search user @Description 过滤系统日志 @Accept json @Produce json @Param conditions body condition.Conditions true "conditions" @Success 200 {object} page.Page @Security ApiKeyAuth @Router /logs/ [post]

type SystemSettingController

type SystemSettingController struct {
	Ctx                  context.Context
	SystemSettingService service.SystemSettingService
}

func NewSystemSettingController

func NewSystemSettingController() *SystemSettingController

func (SystemSettingController) DeleteRegistryBy

func (s SystemSettingController) DeleteRegistryBy(id string) error

Delete Registry @Tags SystemSetting @Summary Delete a Registry @Description delete a Registry by arch @Param arch path string true "CPU 架构" @Accept json @Produce json @Security ApiKeyAuth @Router /settings/registry/{arch}/ [delete]

func (SystemSettingController) Get

func (s SystemSettingController) Get() (interface{}, error)

List SystemSettings @Tags SystemSetting @Summary Show all SystemSettings @Description 获取所有系统配置信息 @Accept json @Produce json @Success 200 {object} dto.SystemSettingResult @Security ApiKeyAuth @Router /settings [get]

func (SystemSettingController) GetBy

func (s SystemSettingController) GetBy(name string) (interface{}, error)

Get SystemSettings @Tags SystemSetting @Summary Show a SystemSettings @Description 获取单个应用配置的配置信息 @Accept json @Produce json @Param name path string true "应用名称" @Success 200 {object} dto.SystemSettingResult @Security ApiKeyAuth @Router /settings/{name} [get]

func (SystemSettingController) GetRegistry

func (s SystemSettingController) GetRegistry() (*page.Page, error)

List Registry @Tags SystemSetting @Summary Show all Registry @Description 获取所有仓库信息 @Accept json @Produce json @Success 200 {object} page.Page @Security ApiKeyAuth @Router /settings/registry [get]

func (SystemSettingController) GetRegistryBy

func (s SystemSettingController) GetRegistryBy(id string) (interface{}, error)

Get Registry @Tags SystemSetting @Summary Show a Registry @Description 根据 ID 获取仓库信息 @Accept json @Produce json @Param id path string true "ID" @Success 200 {object} dto.SystemRegistry @Security ApiKeyAuth @Router /settings/registry/{id} [get]

func (SystemSettingController) PatchRegistryBy

func (s SystemSettingController) PatchRegistryBy(arch string) (*dto.SystemRegistry, error)

Update Registry @Tags SystemSetting @Summary Update a Registry @Description 更新仓库配置 @Accept json @Produce json @Param request body dto.SystemRegistryUpdate true "request" @Param arch path string true "CPU 架构" @Success 200 {object} dto.SystemRegistry @Security ApiKeyAuth @Router /settings/registry/{arch} [patch]

func (SystemSettingController) Post

Create SystemSettings @Tags SystemSetting @Summary Create a SystemSetting @Description 创建一项配置 @Accept json @Produce json @Param request body dto.SystemSettingCreate true "request" @Success 200 {object} []dto.SystemSetting @Security ApiKeyAuth @Router /settings [post]

func (SystemSettingController) PostCheckBy

func (s SystemSettingController) PostCheckBy(typeName string) error

Check SystemSetting @Tags SystemSetting @Summary Check a SystemSetting @Description 检查配置是否可用 @Accept json @Produce json @Param request body dto.SystemSettingCreate true "request" @Param name path string true "应用名称" @Success 200 {object} []dto.SystemSetting @Security ApiKeyAuth @Router /settings/check/{name} [post]

func (SystemSettingController) PostRegistry

func (s SystemSettingController) PostRegistry() (*dto.SystemRegistry, error)

Create Registry @Tags SystemSetting @Summary Create a Registry @Description 创建仓库配置 @Accept json @Produce json @Param request body dto.SystemSettingCreate true "request" @Success 200 {object} dto.SystemRegistry @Security ApiKeyAuth @Router /settings/registry [post]

func (SystemSettingController) PostRegistryBatch

func (s SystemSettingController) PostRegistryBatch() error

func (*SystemSettingController) PostRegistryChangePassword

func (s *SystemSettingController) PostRegistryChangePassword() error

Change Nexus Password @Tags SystemSetting @Summary Change user password @Description 更新 Nexus 密码 @Accept json @Produce json @Param request body dto.RepoChangePassword true "request" @Success 200 @Security ApiKeyAuth @Router /settings/registry/change/password [post]

func (SystemSettingController) PostRegistryCheckConn

func (s SystemSettingController) PostRegistryCheckConn() error

func (SystemSettingController) PostRegistrySearch

func (s SystemSettingController) PostRegistrySearch() (*page.Page, error)

Search Registry @Tags SystemSetting @Summary Search Registry @Description 过滤仓库 @Accept json @Produce json @Param conditions body condition.Conditions true "conditions" @Success 200 {object} page.Page @Security ApiKeyAuth @Router /settings/registry/search [post]

type TaskLogController

type TaskLogController struct {
	Ctx            context.Context
	TaskLogService service.TaskLogService
}

func NewTaskLogController

func NewTaskLogController() *TaskLogController

func (TaskLogController) GetBackupLogsBy

func (c TaskLogController) GetBackupLogsBy(clusterName string) (*page.Page, error)

func (TaskLogController) GetDetailBy

func (c TaskLogController) GetDetailBy(id string) (*dto.TaskLog, error)

func (TaskLogController) GetLog1By

func (c TaskLogController) GetLog1By(clusterId, logId string) (*dto.Logs, error)

func (TaskLogController) GetLog2By

func (c TaskLogController) GetLog2By(clusterName, logId string) (*dto.Logs, error)

func (TaskLogController) Post

func (c TaskLogController) Post() (*page.Page, error)

Search TaskLog @Tags task_logs @Summary Search tasklog @Description 过滤任务日志 @Accept json @Produce json @Param conditions body condition.Conditions true "conditions" @Success 200 {object} page.Page @Security ApiKeyAuth @Router /tasklog/ [post]

type TemplateConfigController

type TemplateConfigController struct {
	Ctx                   context.Context
	TemplateConfigService service.TemplateConfigService
}

func NewTemplateConfigController

func NewTemplateConfigController() *TemplateConfigController

func (TemplateConfigController) DeleteBy

func (t TemplateConfigController) DeleteBy(name string) error

Delete TemplateConfig @Tags templateConfigs @Summary Delete a templateConfig @Description 删除模版配置 @Accept json @Produce json @Param name path string true "模版名称" @Security ApiKeyAuth @Router /templates/{name} [delete]

func (TemplateConfigController) Get

func (TemplateConfigController) GetBy

Get TemplateConfig @Tags templateConfigs @Summary Show a TemplateConfig @Description 获取单个模版配置 @Accept json @Produce json @Param name path string true "模版名称" @Success 200 {object} dto.TemplateConfig @Security ApiKeyAuth @Router /templates/{name} [get]

func (TemplateConfigController) PatchBy

Update TemplateConfig @Tags templateConfigs @Summary Update a TemplateConfig @Description 更新模板配置 @Accept json @Produce json @Param request body dto.TemplateConfig true "request" @Param name path string true "模板配置名称" @Success 200 {object} dto.TemplateConfig @Security ApiKeyAuth @Router /templates/{name} [patch]

func (TemplateConfigController) PostCreate

func (t TemplateConfigController) PostCreate() (*dto.TemplateConfig, error)

func (TemplateConfigController) PostSearch

func (t TemplateConfigController) PostSearch() (*page.Page, error)

List TemplateConfigs @Tags templateConfigs @Summary Show all TemplateConfigs @Description 获取所有的模板配置 @Accept json @Produce json @Success 200 {object} []dto.TemplateConfig @Security ApiKeyAuth @Router /templates/search [post]

type ThemeController

type ThemeController struct {
	Ctx          context.Context
	ThemeService service.ThemeService
}

func NewThemeController

func NewThemeController() *ThemeController

func (*ThemeController) Get

func (l *ThemeController) Get() (*dto.Theme, error)

type UserController

type UserController struct {
	Ctx         context.Context
	UserService service.UserService
}

func NewUserController

func NewUserController() *UserController

func (*UserController) DeleteBy

func (u *UserController) DeleteBy(name string) error

Delete User @Tags users @Summary Delete a user @Description 删除用户 @Accept json @Produce json @Param name path string true "用户名" @Security ApiKeyAuth @Router /users/{name} [delete]

func (*UserController) Get

func (u *UserController) Get() (*page.Page, error)

List User @Tags users @Summary Show users @Description 获取用户列表 @Accept json @Produce json @Success 200 {object} page.Page @Security ApiKeyAuth @Router /users [get]

func (*UserController) GetBy

func (u *UserController) GetBy(name string) (*dto.User, error)

Get User @Tags users @Summary Show a user @Description 获取单个用户 @Accept json @Produce json @Success 200 {object} dto.User @Security ApiKeyAuth @Router /users/{name} [get]

func (*UserController) PatchBy

func (u *UserController) PatchBy(name string) (*dto.User, error)

Update User @Tags users @Summary Update a user @Description 更新用户 @Accept json @Produce json @Param request body dto.UserUpdate true "request" @Param name path string true "用户名" @Success 200 {object} dto.User @Security ApiKeyAuth @Router /users/{name} [patch]

func (*UserController) Post

func (u *UserController) Post() (*dto.User, error)

Create User @Tags users @Summary Create a user @Description 创建用户 @Accept json @Produce json @Param request body dto.UserCreate true "request" @Success 200 {object} dto.User @Security ApiKeyAuth @Router /users [post]

func (*UserController) PostBatch

func (u *UserController) PostBatch() error

func (*UserController) PostChangePassword

func (u *UserController) PostChangePassword() error

Change User Password @Tags users @Summary Change user password @Description 更新用户密码 @Accept json @Produce json @Param request body dto.UserChangePassword true "request" @Success 200 {object} dto.User @Security ApiKeyAuth @Router /users/change/password [post]

func (*UserController) PostSearch

func (u *UserController) PostSearch() (*page.Page, error)

Search User @Tags users @Summary Search user @Description 过滤用户 @Accept json @Produce json @Param conditions body condition.Conditions true "conditions" @Success 200 {object} page.Page @Security ApiKeyAuth @Router /users/search [post]

type UserMsgController

type UserMsgController struct {
	Ctx            context.Context
	UserMsgService service.UserMsgService
}

func NewUserMsgController

func NewUserMsgController() *UserMsgController

func (*UserMsgController) Get

func (*UserMsgController) PostReadAll

func (u *UserMsgController) PostReadAll() error

func (*UserMsgController) PostReadBy

func (u *UserMsgController) PostReadBy(msgID string) error

type UserSettingController

type UserSettingController struct {
	Ctx                context.Context
	UserSettingService service.UserSettingService
}

func NewUserSettingController

func NewUserSettingController() *UserSettingController

func (*UserSettingController) GetBy

func (u *UserSettingController) GetBy(username string) (dto.UserSettingDTO, error)

func (*UserSettingController) PostUpdate

func (u *UserSettingController) PostUpdate() (dto.UserSettingDTO, error)

type VmConfigController

type VmConfigController struct {
	Ctx             context.Context
	VmConfigService service.VmConfigService
}

func NewVmConfigController

func NewVmConfigController() *VmConfigController

func (VmConfigController) DeleteBy

func (v VmConfigController) DeleteBy(name string) error

Delete VmConfig @Tags vmConfigs @Summary Delete a vmConfig @Description 删除虚拟机配置 @Accept json @Produce json @Param name path string true "虚拟机配置名称" @Security ApiKeyAuth @Router /vmconfigs/{name} [delete]

func (VmConfigController) Get

func (v VmConfigController) Get() (*page.Page, error)

List VmConfigs @Tags vmConfigs @Summary Show all vmConfigs @Description 获取虚拟机配置列表 @Accept json @Produce json @Success 200 {object} page.Page @Security ApiKeyAuth @Router /vmconfigs [get]

func (VmConfigController) GetBy

func (v VmConfigController) GetBy(name string) (*dto.VmConfig, error)

Get VmConfig @Tags vmConfigs @Summary Get a vmConfig @Description 获取单个虚拟机配置 @Accept json @Produce json @Param name path string true "虚拟机配置名称" @Success 200 {object} dto.VmConfig @Security ApiKeyAuth @Router /vmconfigs/{name} [get]

func (VmConfigController) PatchBy

func (v VmConfigController) PatchBy(name string) (*dto.VmConfig, error)

Update VmConfig @Tags vmConfigs @Summary Update a vmConfig @Description 更新虚拟机配置 @Accept json @Produce json @Param request body dto.VmConfigUpdate true "request" @Param name path string true "虚拟机配置名称" @Success 200 {object} dto.VmConfig @Security ApiKeyAuth @Router /vmconfigs/{name} [patch]

func (VmConfigController) Post

func (v VmConfigController) Post() (*dto.VmConfig, error)

Create VmConfig @Tags vmConfigs @Summary Create a vmConfig @Description 创建虚拟机配置 @Accept json @Produce json @Param request body dto.VmConfigCreate true "request" @Success 200 {object} dto.VmConfig @Security ApiKeyAuth @Router /vmconfigs [post]

func (VmConfigController) PostBatch

func (v VmConfigController) PostBatch() error

func (VmConfigController) PostSearch

func (v VmConfigController) PostSearch() (*page.Page, error)

Search VmConfigs @Tags vmConfigs @Summary Search vmConfigs @Description 过滤虚拟机配置 @Accept json @Produce json @Param conditions body condition.Conditions true "conditions" @Success 200 {object} page.Page @Security ApiKeyAuth @Router /vmconfigs/search [post]

type ZoneController

type ZoneController struct {
	Ctx         context.Context
	ZoneService service.ZoneService
}

func NewZoneController

func NewZoneController() *ZoneController

func (ZoneController) DeleteBy

func (z ZoneController) DeleteBy(name string) error

Delete Zone @Tags zones @Summary Delete a zone @Description 删除区域 @Accept json @Produce json @Param name path string true "可用区名称" @Security ApiKeyAuth @Router /zones/{name} [delete]

func (ZoneController) Get

func (z ZoneController) Get() (*page.Page, error)

List Zone @Tags zones @Summary Show all zones @Description 获取可用区列表 @Accept json @Produce json @Success 200 {object} page.Page @Security ApiKeyAuth @Router /zones [get]

func (ZoneController) GetBy

func (z ZoneController) GetBy(name string) (*dto.Zone, error)

Get Zone @Tags zones @Summary Show a zone @Description 获取单个可用区 @Accept json @Produce json @Param name path string true "可用区名称" @Success 200 {object} dto.Zone @Security ApiKeyAuth @Router /zones/{name} [get]

func (ZoneController) GetListBy

func (z ZoneController) GetListBy(regionName string) ([]dto.Zone, error)

Get Zones By Region @Tags zones @Summary Get zones by region @Description 获取跟区域关联的可用区 @Accept json @Produce json @Param region path string true "区域名称" @Success 200 {Array} []dto.Zone @Security ApiKeyAuth @Router /zones/list/{region} [get]

func (ZoneController) PatchBy

func (z ZoneController) PatchBy(name string) (*dto.Zone, error)

Update Zone @Tags zones @Summary Update a zone @Description 更新区域 @Accept json @Produce json @Param request body dto.ZoneUpdate true "request" @Param name path string true "区域名称" @Success 200 {object} dto.Zone @Security ApiKeyAuth @Router /zones/{name} [patch]

func (ZoneController) Post

func (z ZoneController) Post() (*dto.Zone, error)

Create Zone @Tags zones @Summary Create a zone @Description 创建区域 @Accept json @Produce json @Param request body dto.ZoneCreate true "request" @Success 200 {object} dto.Zone @Security ApiKeyAuth @Router /zones [post]

func (ZoneController) PostBatch

func (z ZoneController) PostBatch() error

func (ZoneController) PostClusters

func (z ZoneController) PostClusters() (dto.CloudZoneResponse, error)

func (ZoneController) PostDatastores

func (z ZoneController) PostDatastores() ([]dto.CloudDatastore, error)

func (ZoneController) PostFolders

func (z ZoneController) PostFolders() ([]string, error)

func (ZoneController) PostSearch

func (z ZoneController) PostSearch() (*page.Page, error)

Search Zone @Tags zones @Summary Search zones @Description 过滤部署计划 @Accept json @Produce json @Param conditions body condition.Conditions true "conditions" @Success 200 {object} page.Page @Security ApiKeyAuth @Router /zones/search [post]

func (ZoneController) PostTemplates

func (z ZoneController) PostTemplates() (dto.CloudZoneResponse, error)

func (ZoneController) PostUploadImage

func (z ZoneController) PostUploadImage() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL