controller

package
v0.15.4 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AddToManagerFuncs []func(manager.Manager) error

AddToManagerFuncs is a list of functions to add all Controllers to the Manager

Functions

func AddToManager

func AddToManager(m manager.Manager) error

AddToManager adds all Controllers to the Manager

Types

type AuthController

type AuthController struct {
	// contains filtered or unexported fields
}

func (*AuthController) Auth

func (n *AuthController) Auth(ctx *gin.Context)

Auth godoc @Summary Authorization @Description Authorize user, return a token and expireAt if success @Tags Auth @Param body body api.AuthReqBody true "body" @Accept application/json @Produce application/json @Success 200 {object} api.AuthRspBody @Failure 500 {object} api.RspFailBody @Router /cluster/auth/auth [post]

func (*AuthController) GetAuthMiddleWare

func (n *AuthController) GetAuthMiddleWare() func(ctx *gin.Context)

func (*AuthController) Info

func (n *AuthController) Info(ctx *gin.Context)

Info godoc @Summary Auth info @Description Get the status if enable authorization @Tags Auth @Produce application/json @Success 200 {object} api.AuthInfoRspBody @Router /cluster/auth/info [get]

func (*AuthController) Logout

func (n *AuthController) Logout(ctx *gin.Context)

Logout godoc @Summary Logout the token @Description Logout the token, if verify token success, delete this token and return success @Tags Auth @Produce application/json @Success 200 {object} api.AuthLogoutRspBody @Failure 500 {object} api.RspFailBody @Router /cluster/auth/logout [post]

type IAuthController

type IAuthController interface {
	Auth(ctx *gin.Context)
	Logout(ctx *gin.Context)
	Info(ctx *gin.Context)
	GetAuthMiddleWare() func(ctx *gin.Context)
}

func NewAuthController

func NewAuthController(m *manager.ServerManager) IAuthController

type ILocalDiskController

type ILocalDiskController interface {
	LocalDiskList(ctx *gin.Context)
}

func NewLocalDiskController

func NewLocalDiskController(m *manager.ServerManager) ILocalDiskController

type ILocalDiskNodeController

type ILocalDiskNodeController interface {
	LocalDiskNodeList(ctx *gin.Context)
}

type IMetricsController

type IMetricsController interface {
	ModuleStatus(ctx *gin.Context)
	OperationList(ctx *gin.Context)
	OperationGet(ctx *gin.Context)
	EventList(ctx *gin.Context)
	EventGet(ctx *gin.Context)
}

func NewMetricsController

func NewMetricsController(m *manager.ServerManager) IMetricsController

type INodeController

type INodeController interface {
	StorageNodeGet(ctx *gin.Context)
	StorageNodeList(ctx *gin.Context)
	StorageNodeMigrateGet(ctx *gin.Context)
	StorageNodeDisksList(ctx *gin.Context)
	UpdateStorageNodeDisk(ctx *gin.Context)
	SetStorageNodeDiskOwner(ctx *gin.Context)
	GetStorageNodeDisk(ctx *gin.Context)
	StorageNodePoolsList(ctx *gin.Context)
	StorageNodePoolGet(ctx *gin.Context)
	StorageNodePoolDisksList(ctx *gin.Context)
	StorageNodePoolDiskGet(ctx *gin.Context)
	StorageNodeUpdate(ctx *gin.Context)
}

func NewNodeController

func NewNodeController(m *manager.ServerManager) INodeController

type IPoolController

type IPoolController interface {
	StoragePoolGet(ctx *gin.Context)
	StoragePoolList(ctx *gin.Context)
	StorageNodesGetByPoolName(ctx *gin.Context)
	StorageNodeDisksGetByPoolName(ctx *gin.Context)
	StoragePoolExpand(ctx *gin.Context)
}

func NewPoolController

func NewPoolController(m *manager.ServerManager) IPoolController

type ISettingController

type ISettingController interface {
	EnableDRBDSetting(ctx *gin.Context)
	DRBDSettingGet(ctx *gin.Context)
}

func NewSettingController

func NewSettingController(m *manager.ServerManager) ISettingController

type ISnapshotController

type ISnapshotController interface {
	SnapshotList(ctx *gin.Context)
	SnapshotGet(ctx *gin.Context)
}

func NewSnapshotController

func NewSnapshotController(m *manager.ServerManager) ISnapshotController

type IVolumeController

type IVolumeController interface {
	VolumeGet(ctx *gin.Context)
	VolumeList(ctx *gin.Context)
	VolumeReplicasGet(ctx *gin.Context)
	GetVolumeMigrateOperation(ctx *gin.Context)
	VolumeMigrateOperation(ctx *gin.Context)
	GetVolumeConvertOperation(ctx *gin.Context)
	VolumeConvertOperation(ctx *gin.Context)
	VolumeOperationGet(ctx *gin.Context)
	VolumeEventList(ctx *gin.Context)
	GetVolumeExpandOperation(ctx *gin.Context)
	VolumeExpandOperation(ctx *gin.Context)
	VolumeSnapshotList(ctx *gin.Context)
}

func NewVolumeController

func NewVolumeController(m *manager.ServerManager) IVolumeController

type IVolumeGroupController

type IVolumeGroupController interface {
	VolumeGroupList(ctx *gin.Context)
	VolumeGroupGet(ctx *gin.Context)
}

type LocalDiskController

type LocalDiskController struct {
	// contains filtered or unexported fields
}

func (*LocalDiskController) LocalDiskList

func (v *LocalDiskController) LocalDiskList(ctx *gin.Context)

LocalDiskList godoc @Summary 摘要 获取本地磁盘列表 @Description get LocalDiskList 状态枚举 (Active、Inactive、Unknown、Pending、Available、Bound) @Tags LocalDisk @Accept application/json @Produce application/json @Success 200 {object} api.LocalDiskList @Router /cluster/localdisks [get]

type LocalDiskNodeController

type LocalDiskNodeController struct {
	// contains filtered or unexported fields
}

func (*LocalDiskNodeController) LocalDiskNodeList

func (v *LocalDiskNodeController) LocalDiskNodeList(ctx *gin.Context)

LocalDiskNodeList godoc @Summary 摘要 获取集群磁盘组列表 @Description get LocalDiskNodeList @Tags LocalDiskNode @Accept application/json @Produce application/json @Success 200 {object} api.LocalDiskNodeList @Router /cluster/localdisknodes [get]

type MetricsController

type MetricsController struct {
	// contains filtered or unexported fields
}

func (*MetricsController) EventGet

func (v *MetricsController) EventGet(ctx *gin.Context)

EventGet godoc @Summary 摘要 获取指定事件 @Description EventGet @Tags Metric @Param eventName path string true "eventName" @Accept json @Produce json @Success 200 {object} api.Event @Router /cluster/events/:eventName [get]

func (*MetricsController) EventList

func (v *MetricsController) EventList(ctx *gin.Context)

EventList godoc @Summary 摘要 获取审计日志 @Description EventList 排序 resourceType枚举(Cluster;StorageNode;DiskNode;Pool;Volume;DiskVolume;Disk) sort枚举 (time、name、type) @Tags Metric @Param page query int32 true "page" @Param pageSize query int32 true "pageSize" @Param resourceName query string false "resourceName" @Param resourceType query string false "resourceType" @Param sort query string false "sort" @Accept json @Produce json @Success 200 {object} api.EventActionList @Router /cluster/events [get]

func (*MetricsController) ModuleStatus

func (v *MetricsController) ModuleStatus(ctx *gin.Context)

ModuleStatus godoc @Summary 摘要 获取基础监控指标 @Description get ModuleStatus @Tags Metric @Param name query string false "name" @Accept application/json @Produce application/json @Success 200 {object} api.ModuleStatus @Router /cluster/status [get]

func (*MetricsController) OperationGet

func (v *MetricsController) OperationGet(ctx *gin.Context)

OperationGet godoc @Summary 摘要 获取指定操作记录 @Description OperationGet eventType枚举 (Migrate、Expand、Convert) @Tags Metric @Param operationName path string true "operationName" @Param eventType query string true "eventType" @Accept json @Produce json @Success 200 {object} api.Operation @Router /cluster/operations/:operationName [get]

func (*MetricsController) OperationList

func (v *MetricsController) OperationList(ctx *gin.Context)

OperationList godoc @Summary 摘要 获取操作记录列表 @Description OperationList 状态枚举 (Submitted、AddReplica、SyncReplica、PruneReplica、InProgress、Completed、ToBeAborted、Cancelled、Aborted、Failed) @Tags Metric @Param name query string false "name" @Param page query int32 true "page" @Param pageSize query int32 true "pageSize" @Accept json @Produce json @Success 200 {object} api.OperationMetric @Router /cluster/operations [get]

type NodeController

type NodeController struct {
	// contains filtered or unexported fields
}

func (*NodeController) GetStorageNodeDisk

func (n *NodeController) GetStorageNodeDisk(ctx *gin.Context)

GetStorageNodeDisk godoc @Summary 摘要 获取指定磁盘信息 @Description get GetStorageNodeDisk diskname i.g sdb sdc ... @Tags Node @Param nodeName path string true "nodeName" @Param diskName path string true "diskName" @Param fuzzy query bool false "fuzzy" @Param sort query bool false "sort" @Accept json @Produce json @Success 200 {object} api.LocalDiskInfo @Failure 500 {object} api.RspFailBody @Router /cluster/nodes/{nodeName}/disks/{diskName} [get]

func (*NodeController) SetStorageNodeDiskOwner

func (n *NodeController) SetStorageNodeDiskOwner(ctx *gin.Context)

SetStorageNodeDiskOwner godoc @Summary 摘要 更新磁盘owner @Description post SetStorageNodeDiskOwner devicePath i.g /dev/sdb /dev/sdc ... @Tags Node @Param nodeName path string true "nodeName" @Param devicePath path string true "devicePath" @Param body body api.DiskReqBody false "reqBody" @Accept json @Produce json @Success 200 {object} api.DiskReqBody @Failure 500 {object} api.RspFailBody @Router /cluster/nodes/{nodeName}/disks/{devicePath}/owner [post]

func (*NodeController) StorageNodeDisksList

func (n *NodeController) StorageNodeDisksList(ctx *gin.Context)

StorageNodeDisksList godoc @Summary 摘要 获取指定存储节点磁盘列表 @Description list StorageNodeDisks 状态枚举 (Active、Inactive、Unknown、Pending、Available、Bound) @Tags Node @Param nodeName path string true "nodeName" @Param page query int32 true "page" @Param pageSize query int32 true "pageSize" @Param state query string false "state" @Param fuzzy query bool false "fuzzy" @Param sort query bool false "sort" @Accept json @Produce json @Success 200 {object} api.LocalDiskListByNode @Router /cluster/nodes/{nodeName}/disks [get]

func (*NodeController) StorageNodeGet

func (n *NodeController) StorageNodeGet(ctx *gin.Context)

StorageNodeGet godoc @Summary 摘要 获取指定存储节点 @Description get StorageNode 驱动状态 [运行中(Ready),维护中(Maintain), 离线(Offline)] , 节点状态 [运行中(Ready),未就绪(NotReady),未知(Unknown)] @Tags Node @Param nodeName path string false "nodeName" @Accept json @Produce json @Success 200 {object} api.StorageNode @Router /cluster/nodes/{nodeName} [get]

func (*NodeController) StorageNodeList

func (n *NodeController) StorageNodeList(ctx *gin.Context)

StorageNodeList godoc @Summary 摘要 获取存储节点列表 @Description list StorageNode 驱动状态 [运行中(Ready),维护中(Maintain), 离线(Offline)] , 节点状态 [运行中(Ready),未就绪(NotReady),未知(Unknown)] @Tags Node @Param name query string false "name" @Param page query int32 true "page" @Param pageSize query int32 true "pageSize" @Param nodeState query string false "nodeState" @Param driverState query string false "driverState" @Param fuzzy query bool false "fuzzy" @Param sort query bool false "sort" @Accept json @Produce json @Success 200 {object} api.StorageNodeList @Router /cluster/nodes [get]

func (*NodeController) StorageNodeMigrateGet

func (n *NodeController) StorageNodeMigrateGet(ctx *gin.Context)

StorageNodeMigrateGet godoc @Summary 摘要 获取指定节点数据卷迁移任务列表 @Description get StorageNodeMigrate @Tags Node @Param nodeName path string true "nodeName" @Param page query int32 true "page" @Param pageSize query int32 true "pageSize" @Param migrateOperationName query string false "migrateOperationName" @Param volumeName query string false "volumeName" @Param state query string false "state" @Accept json @Produce json @Success 200 {object} api.VolumeOperationListByNode @Router /cluster/nodes/{nodeName}/migrates [get]

func (*NodeController) StorageNodePoolDiskGet

func (n *NodeController) StorageNodePoolDiskGet(ctx *gin.Context)

StorageNodePoolDiskGet godoc @Summary 摘要 获取指定节点指定存储池指定磁盘信息 @Description get StorageNodePoolDiskGet @Tags Node @Param nodeName path string true "nodeName" @Param poolName path string true "poolName" @Param diskName path string true "diskName" @Accept json @Produce json @Success 200 {object} api.LocalDiskInfo @Failure 500 {object} api.RspFailBody @Router /cluster/nodes/{nodeName}/pools/{poolName}/disks/{diskName} [get]

func (*NodeController) StorageNodePoolDisksList

func (n *NodeController) StorageNodePoolDisksList(ctx *gin.Context)

StorageNodePoolDisksList godoc @Summary 摘要 获取指定节点指定存储池磁盘列表信息 @Description get StorageNodePoolDisksList @Tags Node @Param nodeName path string true "nodeName" @Param poolName path string true "poolName" @Param fuzzy query bool false "fuzzy" @Accept json @Produce json @Success 200 {object} api.LocalDisksItemsList @Failure 500 {object} api.RspFailBody @Router /cluster/nodes/{nodeName}/pools/{poolName}/disks [get]

func (*NodeController) StorageNodePoolGet

func (n *NodeController) StorageNodePoolGet(ctx *gin.Context)

StorageNodePoolGet godoc @Summary 摘要 获取指定节点指定存储池信息 @Description get StorageNodePoolGet @Tags Node @Param nodeName path string true "nodeName" @Param poolName path string true "poolName" @Accept json @Produce json @Success 200 {object} api.StoragePool @Failure 500 {object} api.RspFailBody @Router /cluster/nodes/{nodeName}/pools/{poolName} [get]

func (*NodeController) StorageNodePoolsList

func (n *NodeController) StorageNodePoolsList(ctx *gin.Context)

StorageNodePoolsList godoc @Summary 摘要 获取指定节点存储池列表信息 @Description get StorageNodePoolsList @Tags Node @Param nodeName path string true "nodeName" @Param fuzzy query bool false "fuzzy" @Param page query int32 true "page" @Param pageSize query int32 true "pageSize" @Accept json @Produce json @Success 200 {object} api.StoragePoolList @Failure 500 {object} api.RspFailBody @Router /cluster/nodes/{nodeName}/pools [get]

func (*NodeController) StorageNodeUpdate

func (n *NodeController) StorageNodeUpdate(ctx *gin.Context)

StorageNodeUpdate godoc @Summary Set node enable/disable @Tags Node @Param nodeName path string true "nodeName" @Param body body api.NodeUpdateReqBody true "body" @Accept application/json @Produce application/json @Success 200 {object} api.NodeUpdateRspBody @Failure 500 {object} api.RspFailBody @Router /cluster/nodes/{nodeName} [post]

func (*NodeController) UpdateStorageNodeDisk

func (n *NodeController) UpdateStorageNodeDisk(ctx *gin.Context)

UpdateStorageNodeDisk godoc @Summary 摘要 更新磁盘 @Description post UpdateStorageNodeDisk devicePath i.g /dev/sdb /dev/sdc ... @Tags Node @Param nodeName path string true "nodeName" @Param devicePath path string true "devicePath" @Param body body api.DiskReqBody false "reqBody" @Accept json @Produce json @Success 200 {object} api.DiskReqBody @Failure 500 {object} api.RspFailBody @Router /cluster/nodes/{nodeName}/disks/{devicePath} [post]

type PoolController

type PoolController struct {
	// contains filtered or unexported fields
}

func (*PoolController) StorageNodeDisksGetByPoolName

func (n *PoolController) StorageNodeDisksGetByPoolName(ctx *gin.Context)

StorageNodeDisksGetByPoolName godoc @Summary 摘要 获取指定存储池指定存储节点磁盘列表信息 @Description get StorageNodeDisksGetByPoolName @Tags Pool @Param nodeName path string true "nodeName" @Param poolName path string true "poolName" @Param page query int32 true "page" @Param pageSize query int32 true "pageSize" @Param fuzzy query bool false "fuzzy" @Accept json @Produce json @Success 200 {object} api.NodeDiskListByPool @Router /cluster/pools/{poolName}/nodes/{nodeName}/disks [get]

func (*PoolController) StorageNodesGetByPoolName

func (n *PoolController) StorageNodesGetByPoolName(ctx *gin.Context)

StorageNodesGetByPoolName godoc @Summary 摘要 获取指定存储池存储节点列表信息 @Description get StorageNodesGetByPoolName @Tags Pool @Param poolName path string true "poolName" @Param page query int32 true "page" @Param pageSize query int32 true "pageSize" @Param nodeName query string false "nodeName" @Param state query string false "state" @Param fuzzy query bool false "fuzzy" @Param sort query bool false "sort" @Accept json @Produce json @Success 200 {object} api.StorageNodeListByPool @Router /cluster/pools/{poolName}/nodes [get]

func (*PoolController) StoragePoolExpand

func (n *PoolController) StoragePoolExpand(ctx *gin.Context)

StoragePoolExpand godoc @Summary Storage pool expand @Description expand new disk for storage pool @Tags Pool @Param body body api.StoragePoolExpansionReqBody true "body" @Accept application/json @Produce application/json @Success 200 {object} api.StoragePoolExpansionRspBody @Failure 500 {object} api.RspFailBody @Router /cluster/pools/expand [post]

func (*PoolController) StoragePoolGet

func (n *PoolController) StoragePoolGet(ctx *gin.Context)

StoragePoolGet godoc @Summary 摘要 获取指定存储池基本信息 @Description get Pool angel @Tags Pool @Param poolName path string true "poolName" @Accept json @Produce json @Success 200 {object} api.StoragePool @Router /cluster/pools/{poolName} [get]

func (*PoolController) StoragePoolList

func (n *PoolController) StoragePoolList(ctx *gin.Context)

StoragePoolList godoc @Summary 摘要 获取存储池列表信息 @Description list StoragePools @Tags Pool @Param name query string false "name" @Param page query int32 true "page" @Param pageSize query int32 true "pageSize" @Param fuzzy query bool false "fuzzy" @Param sort query bool false "sort" @Accept json @Produce json @Success 200 {object} api.StoragePoolList @Router /cluster/pools [get]

type RestController

type RestController interface {
	Get(ctx *gin.Context)
	List(ctx *gin.Context)
}

type SettingController

type SettingController struct {
	// contains filtered or unexported fields
}

func (*SettingController) DRBDSettingGet

func (n *SettingController) DRBDSettingGet(ctx *gin.Context)

DRBDSettingGet godoc @Summary 摘要 获取高可用设置 @Description get DRBDSettingGet @Tags Setting @Accept json @Produce json @Success 200 {object} api.DrbdEnableSetting @Router /cluster/drbd [get]

func (*SettingController) EnableDRBDSetting

func (n *SettingController) EnableDRBDSetting(ctx *gin.Context)

EnableDRBDSetting godoc @Summary 摘要 高可用设置 @Description post EnableDRBDSetting @Tags Setting @Param body body api.DrbdEnableSettingReqBody true "body" @Accept json @Produce json @Success 200 {object} api.DrbdEnableSettingRspBody @Failure 500 {object} api.RspFailBody @Router /cluster/drbd [post]

type SnapshotController

type SnapshotController struct {
	// contains filtered or unexported fields
}

func (*SnapshotController) SnapshotGet

func (v *SnapshotController) SnapshotGet(ctx *gin.Context)

SnapshotGet godoc @Summary 摘要 获取指定快照 @Description get SnapshotGet 状态枚举 (Creating, Ready, NotReady, ToBeDeleted, Deleted) @Tags Volume @Param snapshotName path string true "snapshotName" @Accept json @Produce json @Success 200 {object} api.Snapshot @Failure 500 {object} api.RspFailBody @Router /cluster/volumes/{volumeName}/snapshot [get]

func (*SnapshotController) SnapshotList

func (v *SnapshotController) SnapshotList(ctx *gin.Context)

SnapshotList godoc @Summary 摘要 全局快照列表展式 @Description list Snapshot @Tags Snapshot @Param page query int32 true "page" @Param pageSize query int32 true "pageSize" @Param snapshotName query string false "snapshotName" @Param state query string false "state" @Param volumeName query string false "volumeName" @Accept json @Produce json @Success 200 {object} api.SnapshotList @Router /cluster/snapshots [get]

type VolumeController

type VolumeController struct {
	// contains filtered or unexported fields
}

func (*VolumeController) GetVolumeConvertOperation

func (v *VolumeController) GetVolumeConvertOperation(ctx *gin.Context)

GetVolumeConvertOperation godoc @Summary 摘要 获取指定数据卷转换操作 @Description get GetVolumeConvertOperation 状态枚举 (Submitted、InProgress、Completed、ToBeAborted、Aborted) @Tags Volume @Param volumeName path string true "volumeName" @Accept json @Produce json @Success 200 {object} api.VolumeConvertOperation @Failure 500 {object} api.RspFailBody @Router /cluster/volumes/{volumeName}/convert [get]

func (*VolumeController) GetVolumeExpandOperation

func (v *VolumeController) GetVolumeExpandOperation(ctx *gin.Context)

GetVolumeExpandOperation godoc @Summary 摘要 获取指定数据卷扩容操作 @Description get GetVolumeExpandOperation 状态枚举 (Submitted、InProgress、Completed、ToBeAborted、Aborted) @Tags Volume @Param volumeName path string true "volumeName" @Accept json @Produce json @Success 200 {object} api.VolumeExpandOperation @Failure 500 {object} api.RspFailBody @Router /cluster/volumes/{volumeName}/expand [get]

func (*VolumeController) GetVolumeMigrateOperation

func (v *VolumeController) GetVolumeMigrateOperation(ctx *gin.Context)

GetVolumeMigrateOperation godoc @Summary 摘要 获取指定数据卷迁移操作 @Description get GetVolumeMigrateOperation 状态枚举 (Submitted、AddReplica、SyncReplica、PruneReplica、InProgress、Completed、ToBeAborted、Cancelled、Aborted、Failed) @Tags Volume @Param volumeName path string true "volumeName" @Accept json @Produce json @Success 200 {object} api.VolumeMigrateOperation @Failure 500 {object} api.RspFailBody @Router /cluster/volumes/{volumeName}/migrate [get]

func (*VolumeController) VolumeConvertOperation

func (v *VolumeController) VolumeConvertOperation(ctx *gin.Context)

VolumeConvertOperation godoc @Summary 摘要 指定数据卷转换操作 @Description post VolumeConvertOperation @Tags Volume @Param volumeName path string true "volumeName" @Param body body api.VolumeConvertReqBody true "reqBody" @Accept json @Produce json @Success 200 {object} api.VolumeConvertRspBody @Failure 500 {object} api.RspFailBody @Router /cluster/volumes/{volumeName}/convert [post]

func (*VolumeController) VolumeEventList

func (v *VolumeController) VolumeEventList(ctx *gin.Context)

VolumeEventList godoc @Summary 摘要 获取指定数据卷审计日志 sort=time ,先不做按操作查询 @Description get VolumeOperation @Tags Volume @Param volumeName path string true "volumeName" @Param page query int32 true "page" @Param pageSize query int32 true "pageSize" @Param action query string false "action" @Param sort query string false "sort" @Accept json @Produce json @Success 200 {object} api.EventActionList @Router /cluster/volumes/{volumeName}/events [get]

func (*VolumeController) VolumeExpandOperation

func (v *VolumeController) VolumeExpandOperation(ctx *gin.Context)

VolumeExpandOperation godoc @Summary 摘要 指定数据卷扩容操作 @Description post VolumeExpandOperation @Tags Volume @Param volumeName path string true "volumeName" @Param body body api.VolumeExpandReqBody true "reqBody" @Accept json @Produce json @Success 200 {object} api.VolumeExpandRspBody @Failure 500 {object} api.RspFailBody @Router /cluster/volumes/{volumeName}/expand [post]

func (*VolumeController) VolumeGet

func (v *VolumeController) VolumeGet(ctx *gin.Context)

VolumeGet godoc @Summary 摘要 获取指定数据卷基本信息 @Description get Volume angel1 @Tags Volume @Param volumeName path string true "volumeName" @Accept application/json @Produce application/json @Success 200 {object} api.Volume @Router /cluster/volumes/{volumeName} [get]

func (*VolumeController) VolumeList

func (v *VolumeController) VolumeList(ctx *gin.Context)

VolumeList godoc @Summary 摘要 获取数据卷列表信息 数据卷状态枚举 (ToBeMounted、Created、Creating、Ready、NotReady、ToBeDeleted、Deleted) @Description list Volume sortBy排序:"time","name","namespace" sortDir:升序"ASC" 降序"DESC" 默认按时间降序 @Tags Volume @Param page query int32 true "page" @Param pageSize query int32 true "pageSize" @Param volumeName query string false "volumeName" @Param state query string false "state" @Param group query string false "group" @Param namespace query string false "namespace" @Param sortBy query string false "sortBy" @Param sortDir query string false "sortDir" @Accept json @Produce json @Success 200 {object} api.VolumeList @Router /cluster/volumes [get]

func (*VolumeController) VolumeMigrateOperation

func (v *VolumeController) VolumeMigrateOperation(ctx *gin.Context)

VolumeMigrateOperation godoc @Summary 摘要 指定数据卷迁移操作 @Description post VolumeMigrateOperation body i.g. body { SrcNode string ,SelectedNode string} @Tags Volume @Param volumeName path string true "volumeName" @Param body body api.VolumeMigrateReqBody true "reqBody" @Accept json @Produce json @Success 200 {object} api.VolumeMigrateRspBody @Failure 500 {object} api.RspFailBody @Router /cluster/volumes/{volumeName}/migrate [post]

func (*VolumeController) VolumeOperationGet

func (v *VolumeController) VolumeOperationGet(ctx *gin.Context)

VolumeOperationGet godoc @Summary 摘要 获取指定数据卷操作记录信息 状态枚举 (Submitted、AddReplica、SyncReplica、PruneReplica、InProgress、Completed、ToBeAborted、Cancelled、Aborted、Failed) @Description get VolumeOperation @Tags Volume @Param volumeName path string true "volumeName" @Param volumeEventName query string false "volumeEventName" @Param state query string false "state" @Accept json @Produce json @Success 200 {object} api.VolumeOperationByVolume @Router /cluster/volumes/{volumeName}/operations [get]

func (*VolumeController) VolumeReplicasGet

func (v *VolumeController) VolumeReplicasGet(ctx *gin.Context)

VolumeReplicasGet godoc @Summary 摘要 获取指定数据卷的副本列表信息 @Description list volumes @Tags Volume @Param volumeName path string true "volumeName" @Param volumeReplicaName query string false "volumeReplicaName" @Param state query string false "state" @Accept json @Produce json @Success 200 {object} api.VolumeReplicaList @Router /cluster/volumes/{volumeName}/replicas [get]

func (*VolumeController) VolumeSnapshotList

func (v *VolumeController) VolumeSnapshotList(ctx *gin.Context)

VolumeSnapshotList godoc @Summary 摘要 获取指定数据卷快照操作 快照状态枚举 (Creating, Ready, NotReady, ToBeDeleted, Deleted) @Description get VolumeSnapshotList @Tags Volume @Param volumeName path string true "volumeName" @Param page query int32 true "page" @Param pageSize query int32 true "pageSize" @Param state query string false "state" @Param snapshotName query string false "snapshotName" @Accept json @Produce json @Success 200 {object} api.SnapshotList @Failure 500 {object} api.RspFailBody @Router /cluster/volumes/{volumeName}/snapshot [get]

type VolumeGroupController

type VolumeGroupController struct {
	// contains filtered or unexported fields
}

func (*VolumeGroupController) VolumeGroupGet

func (v *VolumeGroupController) VolumeGroupGet(ctx *gin.Context)

VolumeGroupGet godoc @Summary 摘要 查看数据卷组 @Description get VolumeGroupGet @Tags VolumeGroup @Param vgName path string false "vgName" @Accept application/json @Produce application/json @Success 200 {object} api.VolumeGroup @Router /cluster/volumegroups/{vgName} [get]

func (*VolumeGroupController) VolumeGroupList

func (v *VolumeGroupController) VolumeGroupList(ctx *gin.Context)

VolumeGroupList godoc @Summary 摘要 获取数据卷组列表 @Description get VolumeGroupList @Tags VolumeGroup @Param name query string false "name" @Param fuzzy query bool false "fuzzy" @Param sort query bool false "sort" @Accept application/json @Produce application/json @Success 200 {object} api.VolumeGroupList @Router /cluster/volumegroups [get]

Jump to

Keyboard shortcuts

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