Documentation
¶
Overview ¶
Package stack represents a cloud stack operations under the `/cloud/stack` API endpoint.
Index ¶
- type AddRequest
- type AddResponse
- type Client
- func (s *Client) Add(ctx context.Context, request AddRequest) (response AddResponse, err error)
- func (s *Client) GenerateName(ctx context.Context) (response GenerateNameResponse, err error)
- func (s *Client) Get(ctx context.Context, request GetRequest) (response GetResponse, err error)
- func (s *Client) List(ctx context.Context, request ListRequest) (response ListResponse, err error)
- func (s *Client) Restart(ctx context.Context, request StopStartRestartRequest) (response StartStopRestartResponse, err error)
- func (s *Client) Start(ctx context.Context, request StopStartRestartRequest) (response StartStopRestartResponse, err error)
- func (s *Client) Stop(ctx context.Context, request StopStartRestartRequest) (response StartStopRestartResponse, err error)
- type GenerateNameResponse
- type GetRequest
- type GetResponse
- type ListRequest
- type ListResponse
- type StartStopRestartResponse
- type StopStartRestartRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddRequest ¶
type AddRequest struct {
ServerName string `json:"server_name"`
Name string `json:"name"`
Label string `json:"label"`
EnableSSL int `json:"enable_ssl"`
DockerCompose string `json:"docker_compose"`
Environments []models.EnvironmentVariable
}
AddRequest represents the construction / setup of a new cloud stack.
type AddResponse ¶
type AddResponse struct {
Return struct {
JobID string `json:"job_id"`
} `json:"return"`
models.APIResponse
}
AddResponse is the response from calling the create stack api.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a Service to work with API Jobs.
func (*Client) Add ¶
func (s *Client) Add(ctx context.Context, request AddRequest) (response AddResponse, err error)
Add creates a new cloud stack.
func (*Client) GenerateName ¶
func (s *Client) GenerateName(ctx context.Context) (response GenerateNameResponse, err error)
GenerateName generate a new cloud stack name.
func (*Client) Get ¶
func (s *Client) Get(ctx context.Context, request GetRequest) (response GetResponse, err error)
Get fetches a cloud stack.
func (*Client) List ¶
func (s *Client) List(ctx context.Context, request ListRequest) (response ListResponse, err error)
List fetches all cloud stacks on a specific server.
func (*Client) Restart ¶
func (s *Client) Restart(ctx context.Context, request StopStartRestartRequest) (response StartStopRestartResponse, err error)
Restart restarts a stack on the given server.
func (*Client) Start ¶
func (s *Client) Start(ctx context.Context, request StopStartRestartRequest) (response StartStopRestartResponse, err error)
Start starts a cloud stack on a given server.
func (*Client) Stop ¶
func (s *Client) Stop(ctx context.Context, request StopStartRestartRequest) (response StartStopRestartResponse, err error)
Stop is for stopping a cloud stack on a given server.
type GenerateNameResponse ¶
type GenerateNameResponse struct {
Return struct {
Name string `json:"name"`
} `json:"return"`
models.APIResponse
}
GenerateNameResponse represents the response from generate_name action.
type GetRequest ¶
GetRequest represents a request to get a specific stack.
type GetResponse ¶
type GetResponse struct {
Stack models.Stack `json:"return"`
models.APIResponse
}
GetResponse GetReponse is the response for getting a single stack.
type ListRequest ¶
type ListRequest struct {
ServerName string `json:"server_name"`
}
ListRequest represents a listing request for stacks on a server.
type ListResponse ¶
type ListResponse struct {
Return struct {
models.Pagination
Stacks []models.Stack `json:"data"`
}
models.APIResponse
}
ListResponse is the response for listing stacks.
type StartStopRestartResponse ¶
type StartStopRestartResponse struct {
Return struct {
JobID string `json:"job_id"`
} `json:"return"`
models.APIResponse
}
StartStopRestartResponse represents the response from start/stop/restart actions.
type StopStartRestartRequest ¶
type StopStartRestartRequest struct {
ServerName string `json:"server_name"`
Name string `json:"name"`
Containers []string `json:"containers"`
}
StopStartRestartRequest is a request to start, restart or stop a cloud stack/container.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package environment represents a cloud stack environment operations under the `/cloud/stack/environment` API endpoint.
|
Package environment represents a cloud stack environment operations under the `/cloud/stack/environment` API endpoint. |