config

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExecutableName = "kon"
)

Variables

This section is empty.

Functions

func KubeConfigPath

func KubeConfigPath() (string, error)

func StateDir

func StateDir() string

func TerraformDir

func TerraformDir() string

Types

type AWSConfig

type AWSConfig struct {
	Regions             []string
	StateS3Bucket       string
	StateS3BucketRegion string         `yaml:"states3bucket_region"`
	Credentials         AWSCredentials `yaml:"credentials"`
}

func (*AWSConfig) GetCredentials

func (c *AWSConfig) GetCredentials(profile string) (creds AWSCredentials, err error)

func (*AWSConfig) GetDefaultCredentials

func (c *AWSConfig) GetDefaultCredentials() AWSCredentials

func (*AWSConfig) IsSetup

func (c *AWSConfig) IsSetup() bool

type AWSCredentials

type AWSCredentials struct {
	AccessKeyID     string
	SecretAccessKey string
}

type ClientConfig

type ClientConfig struct {
	Clouds struct {
		AWS AWSConfig `yaml:"aws,omitempty"`
	} `yaml:"clouds,omitempty"`
	Clusters        map[string]*ClusterInfo
	SelectedCluster string
	// contains filtered or unexported fields
}

func GetConfig

func GetConfig() *ClientConfig

func (*ClientConfig) ConfigFile

func (c *ClientConfig) ConfigFile() string

func (*ClientConfig) GetClusterLocation

func (c *ClientConfig) GetClusterLocation(cluster string) (*ClusterInfo, error)

func (*ClientConfig) IsClusterSelected

func (c *ClientConfig) IsClusterSelected() bool

func (*ClientConfig) IsPersisted

func (c *ClientConfig) IsPersisted() bool

func (*ClientConfig) IsSetup

func (c *ClientConfig) IsSetup() bool

func (*ClientConfig) Persist

func (c *ClientConfig) Persist() error

func (*ClientConfig) ToYAML

func (c *ClientConfig) ToYAML() (str string, err error)

type ClusterInfo

type ClusterInfo struct {
	Cloud  string
	Region string
	Status types.ClusterStatus
}

Jump to

Keyboard shortcuts

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