config

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2018 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddEnv

func AddEnv()

func ColorToTermColor added in v0.2.1

func ColorToTermColor(colorDef colorDef) *color.Color

func EditConfig

func EditConfig()

func ListEnvs

func ListEnvs()

func SaveConfig

func SaveConfig(config Config)

Types

type AlertConfig

type AlertConfig struct {
	Env      string                `yaml:"env"`
	Name     string                `yaml:"name"`
	Selector common.QuerySelectors `yaml:"selector"`
	Service  AlertServiceConfig    `yaml:"service"`
}

type AlertServiceConfig

type AlertServiceConfig map[string]string

type ColorConfig added in v0.2.1

type ColorConfig struct {
	Timestamp      colorDef
	AttributeKey   colorDef
	AttributeValue colorDef
	Message        colorDef
}

type Config

type Config struct {
	DefaultEnv   string            `yaml:"default"`
	Colors       ColorConfig       `yaml:"colors"`
	Environments map[string]EnvMap `yaml:"env"`
	Alerts       []AlertConfig     `yaml:"alerts"`
}

func LoadConfig

func LoadConfig() Config

func NewConfig

func NewConfig() Config

type EnvMap

type EnvMap map[string]string

type RuntimeConfig

type RuntimeConfig struct {
	ActiveEnv string
	DataDir   string
	Env       EnvMap
	Config    Config
}

func BuildConfig

func BuildConfig() RuntimeConfig

Jump to

Keyboard shortcuts

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