config

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetGlobal

func SetGlobal()

Types

type Avi

type Avi struct {
	Password   string
	SDKVersion string
	Tenant     string
	User       string
}

Avi stores avi settings.

type Backup

type Backup struct {
	User     string
	Password string
	Remote   string
	Branch   string
	RepoName string
	FullName string
	Email    string
	Enable   bool
}

Git backup settings.

type Database

type Database struct {
	Database string
	Host     string
	Password string
	Port     int
	SSLMode  string
	User     string
}

Database stores database settings.

type Infoblox

type Infoblox struct {
	Enable   bool
	Host     string
	Password string
	User     string
}

Infoblox stores infoblox settings.

type Lbm

type Lbm struct {
	AdminGroup         string
	CorsAllowedOrigins []string
	Environment        string
	GenericPRD         int
	KeyFile            string
	PemFile            string
	RunTLS             bool
}

Lbm stores application settings.

type NetAPI added in v1.0.3

type NetAPI struct {
	Enable bool
	URI    string
}

Network API.

type Nsr

type Nsr struct {
	Password string
	User     string
}

Nsr stores netscaler settings.

type Prometheus added in v1.0.3

type Prometheus struct {
	Enable bool
	URI    string
}

Prometheus.

type Setting

type Setting struct {
	Avi        Avi
	Database   Database
	Infoblox   Infoblox
	Lbm        Lbm
	Nsr        Nsr
	Backup     Backup
	NetAPI     NetAPI
	Prometheus Prometheus
}

Setting stores credentials and application settings.

var GlobalConfig *Setting

func Set

func Set() (r *Setting)

Set will populate the exported Setting struct with values from either env or local toml file.

func (*Setting) Read

func (c *Setting) Read()

Read will open a local copy of config.toml and read the settings. If the file does not exist, the function will populate the settings with environmental vars.

Jump to

Keyboard shortcuts

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