settings

package
v1.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultLocation

func DefaultLocation() (string, error)

DefaultLocation returns the standard location for the settings file

Types

type Settings

type Settings struct {
	Namespace string `mapstructure:"namespace"` // Currently targeted 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"`
	AppChart  string `mapstructure:"appchart"` // Current default app chart (name)

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

Settings represents a epinio settings

func Load

func Load() (*Settings, error)

Load loads the Epinio settings from the default location

func LoadFrom

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

LoadFrom loads the Epinio settings from a specific file

func (*Settings) Save

func (c *Settings) Save() error

Save saves the Epinio settings

func (*Settings) String

func (c *Settings) String() string

Generates a string representation of the settings (for debugging)

Jump to

Keyboard shortcuts

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