config

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigFile string

ConfigFile is the path to a config file defined by GARBAGED_CONFIG env

Functions

This section is empty.

Types

type AWSAccount

type AWSAccount struct {
	ARN        string `json:"arn"`
	ExternalID string `json:"externalid"`
	Name       string `json:"name"`
}

AWSAccount holds info about AWS accounts. Indexed by account number.

type AWSConfig

type AWSConfig struct {
	RoleEC2Tag string `json:"role_ec2_tag"`
	TypeEC2Tag string `json:"type_ec2_tag"`
	DryRun     bool   `json:"dryrun"`
	TermLimit  int    `json:"termlimit"`
}

AWSConfig is AWS-Specific config bits.

type DatabaseConfig

type DatabaseConfig struct {
	Host        string `json:"host"`
	Port        int    `json:"port"`
	User        string `json:"user"`
	Pass        string `json:"pass"`
	Name        string `json:"name"`
	SSLMode     string `json:"sslmode"`
	SSLRootCert string `json:"sslrootcert"`
}

DatabaseConfig holds info on the database.

type GarbagedConfig

type GarbagedConfig struct {
	Debug             bool                  `json:"debug"`
	Bind              string                `json:"bind"`
	TLSKey            string                `json:"tlskey"`
	TLSCert           string                `json:"tlscert"`
	IIDCert           string                `json:"iid_verify_cert"`
	Database          DatabaseConfig        `json:"database"`
	Accounts          map[string]AWSAccount `json:"accounts"`
	AWS               AWSConfig             `json:"aws"`
	Stateful          StatefulConfig        `json:"stateful"`
	Graylog           GraylogConfig         `json:"graylog"`
	TimeBetweenPickup string                `json:"timebetweenpickup"`
	Slack             SlackConfig           `json:"slack"`
}

GarbagedConfig is our config struct

var Config GarbagedConfig

Config is the global config object

func NewConfig

func NewConfig(fname string) (config GarbagedConfig, err error)

NewConfig reads in a config file and set config

type GraylogConfig

type GraylogConfig struct {
	Enabled bool   `json:"enabled"`
	Host    string `json:"host"`
	Port    int    `json:"port"`
}

GraylogConfig configs... graylog

type SlackConfig

type SlackConfig struct {
	Enabled  bool     `json:"enabled"`
	APIKey   string   `json:"APIKey"`
	Channels []string `json:"channels"`
	TimeWait string   `json:"timewait"`
}

SlackConfig - for your slack config needs

type StatefulConfig

type StatefulConfig struct {
	Roles []string `json:"roles"`
	Types []string `json:"types"`
}

StatefulConfig defines which node types are permanently stateful

Jump to

Keyboard shortcuts

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