request

package
v0.0.0-...-b392570 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CLUSTER_ENABLE_EVENT  = "enable"
	CLUSTER_DISABLE_EVENT = "disable"
	GROUP_CREATE_EVENT    = "create"
	GROUP_REMOVE_EVENT    = "remove"
	GROUP_CHANGE_EVENT    = "change"
)
View Source
const (
	RequestSuccessed int = 0
	RequestInvalid   int = -1001
	RequestFailure   int = -1002
)

Variables

View Source
var (
	ErrRequestSuccessed = errors.New("request successed")
	ErrRequestInvalid   = errors.New("request resolve error")
	ErrRequestFailure   = errors.New("request failure error")
)

Functions

This section is empty.

Types

type ClusterEventRequest

type ClusterEventRequest struct {
	Event string `json:"Event"`
}

func ResolveClusterEventRequest

func ResolveClusterEventRequest(r *http.Request) (*ClusterEventRequest, error)

type GroupAllContainersRequest

type GroupAllContainersRequest struct {
	GroupID string `json:"GroupId"`
}

GroupAllContainersRequest is exported Method: GET Route: /v1/groups/{groupid}/collections

func ResolveGroupAllContainersRequest

func ResolveGroupAllContainersRequest(r *http.Request) (*GroupAllContainersRequest, error)

ResolveGroupAllContainersRequest is exported

type GroupContainersMetaBaseRequest

type GroupContainersMetaBaseRequest struct {
	MetaID string `json:"MetaId"`
}

GroupContainersMetaBaseRequest is exported Method: GET Route: /v1/groups/collections/{metaid}/base

func ResolveGroupContainersMetaBaseRequest

func ResolveGroupContainersMetaBaseRequest(r *http.Request) (*GroupContainersMetaBaseRequest, error)

ResolveGroupContainersMetaBaseRequest is exported

type GroupContainersRequest

type GroupContainersRequest struct {
	MetaID string `json:"MetaId"`
}

GroupContainersRequest is exported Method: GET Route: /v1/groups/collections/{metaid}

func ResolveGroupContainersRequest

func ResolveGroupContainersRequest(r *http.Request) (*GroupContainersRequest, error)

ResolveGroupContainersRequest is exported

type GroupCreateContainersRequest

type GroupCreateContainersRequest struct {
	GroupID   string             `json:"GroupId"`
	Instances int                `json:"Instances"`
	Placement types.Placement    `json:"Placement"`
	WebHooks  types.WebHooks     `json:"WebHooks"`
	Config    models.Container   `json:"Config"`
	Option    types.CreateOption `json:"Option"`
}

GroupCreateContainersRequest is exported Method: POST Route: /v1/groups/collections

func ResolveGroupCreateContainersRequest

func ResolveGroupCreateContainersRequest(r *http.Request) (*GroupCreateContainersRequest, error)

ResolveGroupCreateContainersRequest is exported

type GroupEngineRequest

type GroupEngineRequest struct {
	Server string `json:"Server"`
}

GroupEngineRequest is exported Method: GET Route: /v1/groups/engines/{server}

func ResolveGroupEngineRequest

func ResolveGroupEngineRequest(r *http.Request) (*GroupEngineRequest, error)

ResolveGroupEngineRequest is exported

type GroupEnginesRequest

type GroupEnginesRequest struct {
	GroupID string `json:"GroupId"`
}

GroupEnginesRequest is exported Method: GET Route: /v1/groups/{groupid}/engines

func ResolveGroupEnginesRequest

func ResolveGroupEnginesRequest(r *http.Request) (*GroupEnginesRequest, error)

ResolveGroupEnginesRequest is exported

type GroupEventRequest

type GroupEventRequest struct {
	GroupID string `json:"GroupId"`
	Event   string `json:"Event"`
}

GroupEventRequest is exported Method: POST Route: /v1/groups/event

func ResolveGroupEventRequest

func ResolveGroupEventRequest(r *http.Request) (*GroupEventRequest, error)

ResolveGroupEventRequest is exported

type GroupOperateContainerRequest

type GroupOperateContainerRequest struct {
	ContainerID string `json:"ContainerId"`
	Action      string `json:"Action"`
}

GroupOperateContainerRequest is exported Method: PUT Route: /v1/groups/container/action

func ResolveGroupOperateContainerRequest

func ResolveGroupOperateContainerRequest(r *http.Request) (*GroupOperateContainerRequest, error)

ResolveGroupOperateContainerRequest is exported

type GroupOperateContainersRequest

type GroupOperateContainersRequest struct {
	MetaID string `json:"MetaId"`
	Action string `json:"Action"`
}

GroupOperateContainersRequest is exported Method: PUT Route: /v1/groups/collections/action

func ResolveGroupOperateContainersRequest

func ResolveGroupOperateContainersRequest(r *http.Request) (*GroupOperateContainersRequest, error)

ResolveGroupOperateContainersRequest is exported

type GroupRemoveContainerRequest

type GroupRemoveContainerRequest struct {
	ContainerID string `json:"ContainerId"`
}

GroupRemoveContainerRequest is exported Method: DELETE Route: /v1/groups/container/{containerid}

func ResolveGroupRemoveContainerRequest

func ResolveGroupRemoveContainerRequest(r *http.Request) (*GroupRemoveContainerRequest, error)

ResolveGroupRemoveContainerRequest is exported

type GroupRemoveContainersOfMetaNameRequest

type GroupRemoveContainersOfMetaNameRequest struct {
	GroupID  string `json:"GroupID"`
	MetaName string `json:"MetaName"`
}

GroupRemoveContainersOfMetaNameRequest is exported Method: DELETE Route: /v1/groups/{groupid}/collections/{metaname}

func ResolveGroupRemoveContainersOfMetaNameRequest

func ResolveGroupRemoveContainersOfMetaNameRequest(r *http.Request) (*GroupRemoveContainersOfMetaNameRequest, error)

ResolveGroupRemoveContainersOfMetaNameRequest is exported

type GroupRemoveContainersRequest

type GroupRemoveContainersRequest struct {
	MetaID string `json:"MetaId"`
}

GroupRemoveContainersRequest is exported Method: DELETE Route: /v1/groups/collections/{metaid}

func ResolveGroupRemoveContainersRequest

func ResolveGroupRemoveContainersRequest(r *http.Request) (*GroupRemoveContainersRequest, error)

ResolveGroupRemoveContainersRequest is exported

type GroupUpdateContainersRequest

type GroupUpdateContainersRequest struct {
	MetaID    string             `json:"MetaId"`
	Instances int                `json:"Instances"`
	Placement types.Placement    `json:"Placement"`
	WebHooks  types.WebHooks     `json:"WebHooks"`
	Config    models.Container   `json:"Config"`
	Option    types.UpdateOption `json:"Option"`
}

GroupUpdateContainersRequest is exported Method: PUT Route: /v1/groups/collections

func ResolveGroupUpdateContainersRequest

func ResolveGroupUpdateContainersRequest(r *http.Request) (*GroupUpdateContainersRequest, error)

ResolveGroupUpdateContainersRequest is exported

type GroupUpgradeContainersRequest

type GroupUpgradeContainersRequest struct {
	MetaID   string `json:"MetaId"`
	ImageTag string `json:"ImageTag"`
}

GroupUpgradeContainersRequest is exported Method: PUT Route: /v1/groups/collections/upgrade

func ResolveGroupUpgradeContainersRequest

func ResolveGroupUpgradeContainersRequest(r *http.Request) (*GroupUpgradeContainersRequest, error)

ResolveGroupUpgradeContainersRequest is exported

type ServerNodeLabelsRequest

type ServerNodeLabelsRequest struct {
	Server string            `json:"Server"`
	Labels map[string]string `json:"Labels"`
}

ServerNodeLabelsRequest is exported Method: PUT Route: /v1/groups/nodelabels

func ResolveServerNodeLabelsRequest

func ResolveServerNodeLabelsRequest(r *http.Request) (*ServerNodeLabelsRequest, error)

ResolveServerNodeLabelsRequest is exported

Jump to

Keyboard shortcuts

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