Help us shape the future of Go! Take the 2026 Go Developer Survey

client

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientConfigPath

func ClientConfigPath() string

func SaveClientConfig

func SaveClientConfig(cfg *ClientConfig) error

Types

type AppInfo

type AppInfo struct {
	ID     int64  `json:"ID"`
	Name   string `json:"Name"`
	Slug   string `json:"Slug"`
	Status string `json:"Status"`
	Domain string `json:"Domain"`
}

type Client

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

func New

func New(baseURL, apiKey string) *Client

func (*Client) DeployApp

func (c *Client) DeployApp(name string, composeData []byte) error

func (*Client) GetApp

func (c *Client) GetApp(slug string) (*AppInfo, error)

func (*Client) GetAppCompose

func (c *Client) GetAppCompose(slug string) ([]byte, error)

func (*Client) ListApps

func (c *Client) ListApps() ([]AppInfo, error)

func (*Client) ListBackupRuns

func (c *Client) ListBackupRuns(slug string) ([]json.RawMessage, error)

func (*Client) RemoveApp

func (c *Client) RemoveApp(slug string) error

func (*Client) Restore

func (c *Client) Restore(runID int64) error

func (*Client) TriggerBackup

func (c *Client) TriggerBackup(slug string) error

type ClientConfig

type ClientConfig struct {
	Contexts       map[string]Context `yaml:"contexts"`
	CurrentContext string             `yaml:"current_context"`
}

func LoadClientConfig

func LoadClientConfig() (*ClientConfig, error)

func (*ClientConfig) AddContext

func (cfg *ClientConfig) AddContext(name, url, apiKey string)

func (*ClientConfig) GetCurrentContext

func (cfg *ClientConfig) GetCurrentContext() (*Context, error)

func (*ClientConfig) UseContext

func (cfg *ClientConfig) UseContext(name string) error

type Context

type Context struct {
	URL    string `yaml:"url"`
	APIKey string `yaml:"api_key"`
}

Jump to

Keyboard shortcuts

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