config

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultLocation

func DefaultLocation() string

DefaultLocation returns the standard location for the configuration file

Types

type Config

type Config struct {
	Namespace string `mapstructure:"namespace"`
	User      string `mapstructure:"user"`
	Password  string `mapstructure:"pass"`
	API       string `mapstructure:"api"`
	WSS       string `mapstructure:"wss"`
	Certs     string `mapstructure:"certs"`
	Colors    bool   `mapstructure:"colors"`

	Location string // Origin of data, file which was loaded
	// contains filtered or unexported fields
}

Config represents a epinio config

func Load

func Load() (*Config, error)

Load loads the Epinio config from the default location

func LoadFrom added in v0.0.22

func LoadFrom(file string) (*Config, error)

LoadFrom loads the Epinio config from a specific file

func (*Config) Save

func (c *Config) Save() error

Save saves the Epinio config

func (*Config) String added in v0.0.25

func (c *Config) String() string

Generates a string representation of the configuration (for debugging)

Jump to

Keyboard shortcuts

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