conf

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2019 License: Apache-2.0 Imports: 8 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 interface {
	CredsRootPaths() map[string]string
	CredsRootPath(string) (string, error)
	CredsEncryptionKeyFile() string
	CredsKeyDecryptionKeyFile() string
	ProjectionMappingsRootPath() string
	OutputDir() string
	Debug() bool
	ShowSecrets() bool
	Version() string
	BuildDate() string
	Generation() string
	LabelVersionKey() string
	LabelManagedKey() string
	AddDeployLabels() bool
}

Config is the interface for loading flag settings for the CLI app

func LoadConfigFromArgs

func LoadConfigFromArgs(args []string) (Config, error)

LoadConfigFromArgs returns a new config given some CLI args

type Encryption

type Encryption struct {
	Module                string `yaml:"module",json:"module"`
	IncludeDecryptionKeys bool   `yaml:"include_decryption_keys",json:"include_decryption_keys"`
	// PluginPath is the path to the .so on the filesystem, if this Module is loaded from a shared object, and Module: "plugin"
	PluginPath string `yaml:"plugin-path",json:"plugin-path"`
	// Options are arbitrary flags available to underlying implementations
	Params map[string]string `yaml:"params",json:"params"`
	// CredsKeysFilePath tends to not be specified in a projection mapping; this is merged from the CLI flags
	CredsKeysFilePath string `yaml:"creds_keys_file",json:"creds_keys_file"`
	// KeysDecrypterFilePath tends to not be specified in a projection mapping; this is merged from the CLI flags
	KeysDecrypterFilePath string `yaml:"keys_decrypter_file",json:"keys_decrypter_file"`
}

Encryption defines how a projection mapping wants to encrypt its keys

type MapStringStringFlag

type MapStringStringFlag struct {
	Values map[string]string
}

MapStringStringFlag is a flag struct for key=value pairs

func NewMapStringStringFlag

func NewMapStringStringFlag() MapStringStringFlag

NewMapStringStringFlag creates a new flag var for storing key=value pairs

func (*MapStringStringFlag) Set

func (s *MapStringStringFlag) Set(value string) error

Set implements the flag.Var interface

func (*MapStringStringFlag) String

func (s *MapStringStringFlag) String() string

String implements the flag.Var interface

func (*MapStringStringFlag) ToMapStringString

func (s *MapStringStringFlag) ToMapStringString() map[string]string

ToMapStringString returns the underlying representation of the map of key=value pairs

Jump to

Keyboard shortcuts

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