cluster

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2023 License: MIT Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(cnf *config.Config) *Client

func (*Client) Create

func (c *Client) Create(input *CreateClusterInput) (*CreateClusterOutput, error)

func (*Client) Delete

func (c *Client) Delete(input *DeleteClusterInput) (*DeleteClusterOutput, error)

func (*Client) DisableMaintenanceMode

func (c *Client) DisableMaintenanceMode(input *DisableMaintenanceModeInput) (*DisableMaintenanceModeOutput, error)

func (*Client) EnableMaintenanceMode

func (c *Client) EnableMaintenanceMode(input *EnableMaintenanceModeInput) (*EnableMaintenanceModeOutput, error)

func (*Client) Get

func (c *Client) Get(input *GetClusterInput) (*GetClusterOutput, error)

func (*Client) List

func (c *Client) List(input *ListClusterInput) (*ListClusterOutput, error)

func (*Client) Update

func (c *Client) Update(input *UpdateClusterInput) (*UpdateClusterOutput, error)

type ClientCredentials added in v1.2.0

type ClientCredentials struct {
	ClientId     string `json:"uid"`
	ClientSecret string `json:"secret"`
}

type Cluster

type Cluster struct {
	Id       int    `json:"id"`
	Name     string `json:"name"`
	Slug     string `json:"slug"`
	Region   string `json:"region"`
	Version  string `json:"version"`
	Provider string `json:"provider"`
	Status   string `json:"status"`

	// Fields that are only returned for admins
	CreatedAt       time.Time `json:"created_at,omitempty"`
	UpdatedAt       time.Time `json:"updated_at,omitempty"`
	AgentConnected  bool      `json:"agent_connected,omitempty"`
	AgentLastPing   time.Time `json:"agent_last_ping,omitempty"`
	AgentIdentifier string    `json:"agent_identifier,omitempty"`
	AgentVersion    string    `json:"agent_version,omitempty"`

	Credentials *ClientCredentials `json:"oauth_application,omitempty"`
}

type CreateClusterInput

type CreateClusterInput struct {
	Domain string `json:"domain"`
	Name   string `json:"name"`
}

type CreateClusterOutput

type CreateClusterOutput struct {
	Cluster *Cluster `json:"cluster"`
}

type DeleteClusterInput

type DeleteClusterInput struct {
	ClusterId int
}

type DeleteClusterOutput

type DeleteClusterOutput struct {
}

type DisableMaintenanceModeInput

type DisableMaintenanceModeInput struct {
}

type DisableMaintenanceModeOutput

type DisableMaintenanceModeOutput struct {
}

type EnableMaintenanceModeInput

type EnableMaintenanceModeInput struct {
}

type EnableMaintenanceModeOutput

type EnableMaintenanceModeOutput struct {
}

type GetClusterInput

type GetClusterInput struct {
	ClusterId int
}

type GetClusterOutput

type GetClusterOutput struct {
	Cluster *Cluster `json:"cluster"`
}

type ListClusterInput

type ListClusterInput struct {
}

func (*ListClusterInput) ToQueryParams

func (i *ListClusterInput) ToQueryParams() map[string]string

type ListClusterOutput

type ListClusterOutput struct {
	Clusters []*Cluster `json:"clusters"`
}

type UpdateClusterInput

type UpdateClusterInput struct {
	ClusterId       int    `json:"-"`
	AgentVersion    string `json:"agent_version,omitempty"`
	AgentIdentifier string `json:"agent_identifier,omitempty"`
	Version         string `json:"version,omitempty"`
	Provider        string `json:"provider,omitempty"`
	Region          string `json:"region,omitempty"`
	Status          string `json:"status,omitempty"`
	Domain          string `json:"domain,omitempty"`
}

type UpdateClusterOutput

type UpdateClusterOutput struct {
	Cluster Cluster `json:"cluster"`
}

Jump to

Keyboard shortcuts

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