config

package
v0.0.0-...-37d6c06 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(home string, configPath string) error

Types

type Config

type Config struct {
	Orgs             map[string]Organization `mapstructure:"organizations"     validate:"required"`
	Home             string                  `                                 validate:"required"`
	ErrorColor       string                  `mapstructure:"error_color"       validate:"required"`
	InformationColor string                  `mapstructure:"information_color" validate:"required"`
	WarningColor     string                  `mapstructure:"warning_color"     validate:"required"`
	FocusColor       string                  `mapstructure:"focus_color"       validate:"required"`
	SpinnerColor     string                  `mapstructure:"spinner_color"     validate:"required"`
}

func GetInstance

func GetInstance() *Config

type Organization

type Organization struct {
	Name   string `validate:"required"`
	Prefix string `validate:"required" mapstructure:"prefix"`
	URL    string `validate:"required" mapstructure:"url"`
	Region string `validate:"required" mapstructure:"region"`
}

Jump to

Keyboard shortcuts

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