config

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2021 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Server Server `json:"server" yaml:"server"`
	Logs   Logs   `json:"logs" yaml:"logs"`
	Zones  Zones  `json:"zones" yaml:"zones"`
	Target Target `json:"target" yaml:"target"`
}

Config is a combination of all available configurations.

func Load

func Load() *Config

Load initializes a default configuration struct.

type Credential added in v0.3.0

type Credential struct {
	Project   string `json:"project" yaml:"project"`
	AccessKey string `json:"access_key" yaml:"access_key"`
	SecretKey string `json:"secret_key" yaml:"secret_key"`
	Org       string `json:"org" yaml:"org"`
	Zone      string `json:"zone" yaml:"zone"`
}

Credential defines a single project credential.

type Logs

type Logs struct {
	Level  string `json:"level" yaml:"level"`
	Pretty bool   `json:"pretty" yaml:"pretty"`
}

Logs defines the level and color for log configuration.

type Server

type Server struct {
	Addr string `json:"addr" yaml:"addr"`
	Path string `json:"path" yaml:"path"`
	Web  string `json:"web_config" yaml:"web_config"`
}

Server defines the general server configuration.

type Target

type Target struct {
	Engine         string       `json:"engine" yaml:"engine"`
	File           string       `json:"file" yaml:"file"`
	Refresh        int          `json:"refresh" yaml:"refresh"`
	CheckInstance  bool         `json:"check_instance" yaml:"check_instance"`
	CheckBaremetal bool         `json:"check_baremetal" yaml:"check_baremetal"`
	Credentials    []Credential `json:"credentials" yaml:"credentials"`
}

Target defines the target specific configuration.

type Zones added in v1.0.0

type Zones struct {
	Instance  []string `json:"instance" yaml:"instance"`
	Baremetal []string `json:"baremetal" yaml:"baremetal"`
}

Zones defines the available zones per api endpoint.

Jump to

Keyboard shortcuts

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