config

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Profile

type Profile struct {
	ConfigFile            string
	LogLevel              string
	ProfileName           string
	AccessToken           string
	SandboxAccessToken    string
	ProductionAccessToken string
	SandboxBaseUrl        string
	ProductionBaseUrl     string
	Environment           flags.EnvironmentFlag
}

Profile handles all things related to managing the project specific configurations

func (*Profile) CreateProfile added in v0.0.3

func (p *Profile) CreateProfile() error

CreateProfile creates a profile when running init

func (*Profile) GetAccessToken

func (p *Profile) GetAccessToken() (string, error)

func (*Profile) GetBaseURL added in v0.0.6

func (p *Profile) GetBaseURL() string

func (*Profile) GetConfigField added in v0.0.3

func (p *Profile) GetConfigField(field string) string

GetConfigField returns the configuration field for the specific profile

func (*Profile) GetConfigFolder

func (p *Profile) GetConfigFolder(xdgPath string) string

GetConfigFolder retrieves the folder where the config file is stored

func (*Profile) InitConfig

func (p *Profile) InitConfig()

InitConfig reads in config file and ENV variables if set.

Jump to

Keyboard shortcuts

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