config

package
v0.0.0-...-aee7741 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup

func Setup(name, version, commit, envPrefix string, defaults map[string]interface{})

Setup is initializing the basic configuration like config path and name and the validation framework as well as setting the passed defaults

Types

type FileSecret

type FileSecret struct {
	TemplatePath string
	TargetPath   string
	SecretPath   string
}

FileSecret holds the configuration parsed from the config file regarding the file secret templating.

type FileSecretList

type FileSecretList []FileSecret

FileSecretList is a slice of FileSecret

func NewFileSecretList

func NewFileSecretList() FileSecretList

NewFileSecretList creates and returns a FileSecretList of length 0.

func (*FileSecretList) Init

func (gl *FileSecretList) Init() error

Init initializes the FileSecretList with values from the config.

func (*FileSecretList) Validate

func (gl *FileSecretList) Validate() error

Validate the values parsed from the config.

type Logging

type Logging struct {
	LogLevel  string `valid:"in(debug|info|warning|error)~Invalid logLevel"`
	LogFormat string `valid:"in(text|json)~Invalid logFormat"`
}

func NewLogginConfig

func NewLogginConfig() *Logging

func (*Logging) Init

func (lc *Logging) Init() error

func (*Logging) Validate

func (lc *Logging) Validate() error

type RandomString

type RandomString struct {
	Override          bool
	Length            int
	AllowedCharacters string
}

type RandomStrings

type RandomStrings map[string]*RandomString

func NewRandomStrings

func NewRandomStrings() RandomStrings

func (*RandomStrings) Init

func (rs *RandomStrings) Init() error

func (*RandomStrings) Validate

func (rs *RandomStrings) Validate() error

Validate the values parsed from the config.

type Secret

type Secret struct {
	VaultPath string
	Name      string
}

Secret holds the configuration parsed from the config file regarding the file secret templating.

type SecretList

type SecretList []Secret

SecretList is a slice of Secret

func NewSecretList

func NewSecretList() SecretList

NewSecretList creates and returns a SecretList of length 0.

func (*SecretList) Init

func (fsl *SecretList) Init() error

Init initializes the SecretList with values from the config.

func (*SecretList) Validate

func (fsl *SecretList) Validate() error

Validate the values parsed from the config.

type Target

type Target struct {
	Path string
	Data map[string]TargetData
}

type TargetData

type TargetData struct {
	Ref       string
	Transform string
	Lit       string
}

type TargetList

type TargetList []Target

func NewTargetList

func NewTargetList() TargetList

func (*TargetList) Init

func (gl *TargetList) Init() error

func (*TargetList) Validate

func (gl *TargetList) Validate() error

Validate the values parsed from the config.

type Vault

type Vault struct {
	EndpointUrl       string `valid:"url~Invalid EndpointUrl"`
	SecretBackend     string `valid:"-"`
	Role              string `valid:"-"`
	JwtPath           string `valid:"matches(.+)~Invalid JwtPath"`
	FailOnEmptySecret bool   `valid:"-"`
	AuthPath          string `valid:"-"`
	CaCert            string `valid:"-"`
}

func NewVaultconfig

func NewVaultconfig() *Vault

func (*Vault) Init

func (vc *Vault) Init() error

func (*Vault) Validate

func (vc *Vault) Validate() error

Jump to

Keyboard shortcuts

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