config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAPIKey

func GetAPIKey() string

func GetCurrentContextName

func GetCurrentContextName() string

func GetFS

func GetFS() afero.Fs

func IsEnvironmentVariable

func IsEnvironmentVariable(valueString string) bool

func LoadCLIConfig

func LoadCLIConfig()

func MakeContext

func MakeContext(name string, url string) error

func RenameContext

func RenameContext(old string, new string)

func ResolveValue

func ResolveValue(valueString string) string

func SetCurrentContext

func SetCurrentContext(name string) error

func SetFileSystem

func SetFileSystem(filesystem afero.Fs)

func WriteCLIConfig

func WriteCLIConfig() error

Types

type AppMapConfig

type AppMapConfig struct {
	Application string          `yaml:"name"`
	Packages    []AppMapPackage `yaml:"packages"`
}

func LoadAppmapConfig

func LoadAppmapConfig(overridePath string, fallbackPath string) (*AppMapConfig, error)

type AppMapPackage

type AppMapPackage struct {
	Path    string   `yaml:"path"`
	Exclude []string `yaml:"exclude"`
}

type Config

type Config struct {
	CurrentContext string              `yaml:"current_context"`
	Contexts       map[string]*Context `yaml:"contexts"`
	// contains filtered or unexported fields
}

func GetCLIConfig

func GetCLIConfig() *Config

type Context

type Context struct {
	URL    string `yaml:"url"`
	APIKey string `yaml:"api_key"`
}

func GetContext

func GetContext(name string) (*Context, error)

func GetCurrentContext

func GetCurrentContext() (*Context, error)

func (*Context) GetAPIKey

func (context *Context) GetAPIKey() string

func (*Context) GetName

func (context *Context) GetName() (string, error)

func (*Context) GetURL

func (context *Context) GetURL() string

func (*Context) SetAPIKey

func (context *Context) SetAPIKey(apiKey string)

func (*Context) SetURL

func (context *Context) SetURL(url string)

func (*Context) SetVariable

func (context *Context) SetVariable(key, value string) error

Jump to

Keyboard shortcuts

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