Documentation ¶
Overview ¶
Package cfg :: aws.go - extended AWS SDK functions
Package cfg :: config.go Get project settings from os env or specified config.yaml
Package cfg :: context.go
Package cfg :: env.go
Index ¶
- func Decrypt(text string) string
- func DecryptKeyTextByKMS(key, text string) string
- func Flatten(prefix string, value interface{}, kvmap map[string]string)
- func FlattenConfig(file string) map[string]string
- type Config
- func (c Config) Get(key string, defaultValues ...string) string
- func (c Config) GetBool(key string, defaultValues ...bool) bool
- func (c Config) GetInt32(key string, defaultValues ...int32) int32
- func (c Config) GetInt64(key string, defaultValues ...int64) int64
- func (c Config) GetUint32(key string, defaultValues ...uint32) uint32
- func (c Config) GetUint64(key string, defaultValues ...uint64) uint64
- type ConfigParserFunc
- type ConfigReaderFunc
- type Context
- type DecryptFunc
- type Env
- type KMSDecryptInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptKeyTextByKMS ¶
DecryptKeyTextByKMS checks possible encrypted KMS key/value and retruns decrypted text
func FlattenConfig ¶
FlattenConfig loads a config file (.yaml) to flattened key/value map
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config represents a flattened settings per config file
func (Config) Get ¶
Get gets string value of the key in os.Environ() or Config.settings or using defaultValues[0] if provided; otherwise return ""
type ConfigParserFunc ¶
ConfigParserFunc is a generic parser function
type ConfigReaderFunc ¶
ConfigReaderFunc is a generic reader function
type DecryptFunc ¶
DecryptFunc is a generic decrypt function
type Env ¶
type Env map[string]interface{}
Env struct stores application-wide configuration
type KMSDecryptInterface ¶
type KMSDecryptInterface interface {
Decrypt(input *kms.DecryptInput) (*kms.DecryptOutput, error)
}
KMSDecryptInterface interface