config

package
v0.0.0-...-b359386 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoDockerPushURL = errors.New("ERROR: Docker push URL not configured, set it with 'owo docker set-push-url'")

Functions

func DefaultPath

func DefaultPath() string

func Dir

func Dir() string

func HomeDir

func HomeDir() string

func TokenCache

func TokenCache() tokensource.Cache

Types

type Cluster

type Cluster struct {
	Name          string `json:"name"`
	OAuthURL      string `json:"oauth_url,omitempty" toml:"OAuthURL,omitempty"`
	Key           string `json:"key,omitempty" toml:"Key,omitempty"`
	TLSPin        string `json:"tls_pin" toml:"TLSPin,omitempty"`
	ControllerURL string `json:"controller_url"`
	GitURL        string `json:"git_url"`
	ImageURL      string `json:"image_url"`
	DockerPushURL string `json:"docker_push_url,omitempty" toml:"DockerPushURL,omitempty"`
}

func (*Cluster) Client

func (c *Cluster) Client() (controller.Client, error)

func (*Cluster) DockerPushHost

func (c *Cluster) DockerPushHost() (string, error)

func (*Cluster) TarClient

func (c *Cluster) TarClient() (*tarclient.Client, error)

type Config

type Config struct {
	Default  string     `toml:"default"`
	Clusters []*Cluster `toml:"cluster"`
}

func ReadFile

func ReadFile(path string) (*Config, error)

func (*Config) Add

func (c *Config) Add(s *Cluster, force bool) error

func (*Config) Marshal

func (c *Config) Marshal() []byte

func (*Config) Remove

func (c *Config) Remove(name string) *Cluster

func (*Config) SaveTo

func (c *Config) SaveTo(path string) error

func (*Config) SetDefault

func (c *Config) SetDefault(name string) bool

func (*Config) Upgrade

func (c *Config) Upgrade() (changed bool)

Jump to

Keyboard shortcuts

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