Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Alternative ¶
type Alternative struct { Name string `json:"name"` From string `json:"from,omitempty"` Config map[string]interface{} `json:"config"` Options map[string]interface{} `json:"options,omitempty"` }
Alternative represents an alternative to a deployment.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a helper client to call arsenal public API.
func NewClient ¶
NewClient creates a new client to call Arsenal public routes with a given host and deploymentToken.
func (*Client) DeleteAlternative ¶
DeleteAlternative deletes an existing alternative.
func (*Client) Deploy ¶
func (ac *Client) Deploy(deployRequest *DeployRequest) (*DeployResponse, error)
Deploy makes a deploy request and returns a followup token if successful.
func (*Client) Follow ¶
func (ac *Client) Follow(followupToken string) (*FollowupState, error)
Follow makes a followup request with a followup token.
func (*Client) UpsertAlternative ¶
func (ac *Client) UpsertAlternative(altConfig *Alternative) error
UpsertAlternative creates or updates an alternative.
type DeployRequest ¶
type DeployRequest struct { Version string `json:"version"` Alternative string `json:"alternative,omitempty"` Metadata map[string]string `json:"metadata"` }
DeployRequest represents a deploy request to arsenal.
func (*DeployRequest) String ¶
func (r *DeployRequest) String() string
String returns a string representation of a deploy request. Omits metadata.
type DeployResponse ¶ added in v0.53.1
type DeployResponse struct { FollowUpToken string `json:"followup_token"` DeploymentName string `json:"deployment_name"` DeploymentID string `json:"deployment_id"` DeploymentFamily string `json:"deployment_family"` StackName string `json:"stack_name"` StackID string `json:"stack_id"` StackPlatform string `json:"stack_platform"` Namespace string `json:"namespace"` }
type FollowupState ¶
FollowupState is the followup status of a deploy request.
type RequestError ¶ added in v0.53.0
type RequestError struct {
// contains filtered or unexported fields
}
RequestError represents an error from a HTTP 4XX status
func (*RequestError) Error ¶ added in v0.53.0
func (r *RequestError) Error() string