arsenal

package
v0.54.1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

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

func NewClient(host, deploymentToken string) *Client

NewClient creates a new client to call Arsenal public routes with a given host and deploymentToken.

func (*Client) DeleteAlternative

func (ac *Client) DeleteAlternative(altName string) error

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

type FollowupState struct {
	Done     bool    `json:"done"`
	Progress float64 `json:"progress"`
}

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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