config

package
v0.0.0-...-c283e9f Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2021 License: BSD-3-Clause, MIT Imports: 18 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func CACertFile

func CACertFile(name string) (*os.File, error)

func CACertPath

func CACertPath(name string) string

func DefaultPath

func DefaultPath() string

func Dir

func Dir() string

func HomeDir

func HomeDir() string

func RemoveGlobalGitConfig

func RemoveGlobalGitConfig(gitURL string)

func TokenCache

func TokenCache() tokensource.Cache

func WriteGlobalGitConfig

func WriteGlobalGitConfig(gitURL, caFile string) error

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