Documentation ¶
Index ¶
- type ClusterEventResponse
- type ContainersMetaBase
- type GroupAllContainersResponse
- type GroupContainersMetaBaseResponse
- type GroupContainersResponse
- type GroupCreateContainersResponse
- type GroupEngineResponse
- type GroupEnginesResponse
- type GroupEventResponse
- type GroupOperateContainersResponse
- type GroupRemoveContainersResponse
- type GroupUpdateContainersResponse
- type GroupUpgradeContainersResponse
- type Response
- type ResponseResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterEventResponse ¶
type ClusterEventResponse struct {
Message string `json:"Message"`
}
ClusterEventResponse is exported Method: POST Route: /v1/cluster/event
func NewClusterEventResponse ¶
func NewClusterEventResponse(message string) *ClusterEventResponse
NewClusterEventResponse is exported
type ContainersMetaBase ¶
type ContainersMetaBase struct { GroupID string `json:"GroupId"` MetaID string `json:"MetaId"` IsRemoveDelay bool `json:"IsRemoveDelay"` IsRecovery bool `json:"IsRecovery"` Instances int `json:"Instances"` Placement types.Placement `json:"Placement"` WebHooks types.WebHooks `json:"WebHooks"` ImageTag string `json:"ImageTag"` models.Container CreateAt int64 `json:"CreateAt"` LastUpdateAt int64 `json:"LastUpdateAt"` }
ContainersMetaBase is exported
type GroupAllContainersResponse ¶
type GroupAllContainersResponse struct { GroupID string `json:"GroupId"` Containers *types.GroupContainers `json:"Containers"` }
GroupAllContainersResponse is exported Method: GET Route: /v1/groups/{groupid}/collections
func NewGroupAllContainersResponse ¶
func NewGroupAllContainersResponse(groupid string, containers *types.GroupContainers) *GroupAllContainersResponse
NewGroupAllContainersResponse is exported
type GroupContainersMetaBaseResponse ¶
type GroupContainersMetaBaseResponse struct {
MetaBase *ContainersMetaBase `json:"MetaBase"`
}
GroupContainersMetaBaseResponse is exported Method: GET Route: /v1/groups/collections/{metaid}/base
func NewGroupContainersMetaBaseResponse ¶
func NewGroupContainersMetaBaseResponse(metaBase *cluster.MetaBase) *GroupContainersMetaBaseResponse
NewGroupContainersMetaBaseResponse is exported
type GroupContainersResponse ¶
type GroupContainersResponse struct {
Container *types.GroupContainer `json:"Container"`
}
GroupContainersResponse is exported Method: GET Route: /v1/groups/collections/{metaid}
func NewGroupContainersResponse ¶
func NewGroupContainersResponse(container *types.GroupContainer) *GroupContainersResponse
NewGroupContainersResponse is exported
type GroupCreateContainersResponse ¶
type GroupCreateContainersResponse struct { GroupID string `json:"GroupId"` MetaID string `json:"MetaId"` Created string `json:"Created"` Containers *types.CreatedContainers `json:"Containers"` }
GroupCreateContainersResponse is exported Method: POST Route: /v1/groups/collections
func NewGroupCreateContainersResponse ¶
func NewGroupCreateContainersResponse(groupid string, metaid string, instances int, containers *types.CreatedContainers) *GroupCreateContainersResponse
NewGroupCreateContainersResponse is exported
type GroupEngineResponse ¶
GroupEngineResponse is exported Method: GET Route: /v1/groups/engines/{server}
func NewGroupEngineResponse ¶
func NewGroupEngineResponse(engine *cluster.Engine) *GroupEngineResponse
NewGroupEngineResponse is exported
type GroupEnginesResponse ¶
type GroupEnginesResponse struct { GroupID string `json:"GroupId"` Engines []*cluster.Engine `json:"Engines"` }
GroupEnginesResponse is exported Method: GET Route: /v1/groups/{groupid}/engines
func NewGroupEnginesResponse ¶
func NewGroupEnginesResponse(groupid string, engines []*cluster.Engine) *GroupEnginesResponse
NewGroupEnginesResponse is exported
type GroupEventResponse ¶
type GroupEventResponse struct {
Message string `json:"Message"`
}
GroupEventResponse is exported Method: POST Route: /v1/groups/event
func NewGroupEventResponse ¶
func NewGroupEventResponse(message string) *GroupEventResponse
NewGroupEventResponse is exported
type GroupOperateContainersResponse ¶
type GroupOperateContainersResponse struct { MetaID string `json:"MetaId"` Action string `json:"Action"` Containers *types.OperatedContainers `json:"Containers"` }
GroupOperateContainersResponse is exported Method: PUT Route1: /v1/groups/collections/action Route2: /v1/groups/container/action
func NewGroupOperateContainersResponse ¶
func NewGroupOperateContainersResponse(metaid string, action string, containers *types.OperatedContainers) *GroupOperateContainersResponse
NewGroupOperateContainersResponse is exported
type GroupRemoveContainersResponse ¶
type GroupRemoveContainersResponse struct { MetaID string `json:"MetaId"` Containers *types.RemovedContainers `json:"Containers"` }
GroupRemoveContainersResponse is exported Method: PUT Route1: /v1/groups/collections/{metaid} Route2: /v1/groups/container/{containerid}
func NewGroupRemoveContainersResponse ¶
func NewGroupRemoveContainersResponse(metaid string, containers *types.RemovedContainers) *GroupRemoveContainersResponse
NewGroupRemoveContainersResponse is exported
type GroupUpdateContainersResponse ¶
type GroupUpdateContainersResponse struct { MetaID string `json:"MetaId"` Updated string `json:"Updated"` Containers *types.CreatedContainers `json:"Containers"` }
GroupUpdateContainersResponse is exported Method: PUT Route: /v1/groups/collections
func NewGroupUpdateContainersResponse ¶
func NewGroupUpdateContainersResponse(metaid string, instances int, containers *types.CreatedContainers) *GroupUpdateContainersResponse
NewGroupUpdateContainersResponse is exported
type GroupUpgradeContainersResponse ¶
type GroupUpgradeContainersResponse struct { MetaID string `json:"MetaId"` Upgrade string `json:"Upgrade"` Containers *types.UpgradeContainers `json:"Containers"` }
GroupUpgradeContainersResponse is exported Method: PUT Route: /v1/groups/collections/upgrade
func NewGroupUpgradeContainersResponse ¶
func NewGroupUpgradeContainersResponse(metaid string, upgrade string, containers *types.UpgradeContainers) *GroupUpgradeContainersResponse
NewGroupUpgradeContainersResponse is exported
type ResponseResult ¶
type ResponseResult struct { Response `json:"-,omitempty"` Code int `json:"Code"` Error string `json:"Error"` Content string `json:"Contnet"` ResponseID string `json:"ResponseID"` Data interface{} `json:"Data,omitpty"` }
消息返回响应结构体 Code: 响应码, == 0 成功, < 0 失败 Error: 失败名称 Content: 成功/失败描述 ResponseID: Data: 响应数据
func (*ResponseResult) SetError ¶
func (r *ResponseResult) SetError(code int, err error, content string)
func (*ResponseResult) SetResponse ¶
func (r *ResponseResult) SetResponse(data interface{})