configuration

package
v0.0.0-...-847e9cf Latest Latest
Warning

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

Go to latest
Published: May 27, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AzureConfig

type AzureConfig struct {
	Credentials az.Credentials `yaml:"credentials"`
}

type Config

type Config struct {
	Version            string      `yaml:"version"`
	Kind               Kind        `yaml:"kind"`
	CurrentEnvironment uuid.UUID   `yaml:"current-environment"`
	AzureConfig        AzureConfig `yaml:"azure-config,omitempty"`
}

func GetConfig

func GetConfig() (*Config, error)

GetConfig returns existing Config or fails if there is no config file or file is incorrect

func (*Config) AddAzureCredentials

func (c *Config) AddAzureCredentials(credentials az.Credentials)

func (*Config) CreateNewEnvironment

func (c *Config) CreateNewEnvironment(name string) (uuid.UUID, error)

CreateNewEnvironment in Config

func (*Config) Save

func (c *Config) Save() error

Save Config to usedConfigFile

func (*Config) SetUsedEnvironment

func (c *Config) SetUsedEnvironment(u uuid.UUID) error

SetUsedEnvironment to another value

type Kind

type Kind string
const (
	KindConfig Kind = "Config"
)

Jump to

Keyboard shortcuts

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