Versions in this module Expand all Collapse all v0 v0.3.0 Jul 9, 2022 Changes in this version + func CollectParamsFromEnv(appTitle string, spec interface{}, skipDefaults bool, prefix ...string) (map[string]string, error) + func EnvNamesNoDefaults(spec interface{}, prefix ...string) ([]string, error) + func ParamEnvField(appTitle, env string, field Field) (string, string, error) + func ParamNames(appTitle string, spec interface{}, skipDefaults bool, prefix ...string) ([]string, error) type Config + Prefix string + SkipDefault bool + func (c *Config) CollectParamsFromEnv(appTitle string) (map[string]string, error) + func (c *Config) GetPrefix() string + func (c *Config) IsDefaultsExcluded() bool + func (c *Config) IsPrefixEnabled() bool + func (c *Config) MarkDefaultsAsExcluded() + func (c *Config) MarkDefaultsAsIncluded() + func (c *Config) ParamNames(appTitle string) ([]string, error) + func (c *Config) SetExcludeDefaults(value bool) + func (c *Config) SetPrefix(prefix string) v0.1.0 May 2, 2022 Changes in this version + const AWSLambdaFunctionNameVar + const AWSProfile + const AWSRegion + const AppName + const FieldIDLength + const GlobalParamStoreKey + var InvalidSpecFailure = failure.Config("specification must be a struct pointer") + func BinaryUnmarshaler(field reflect.Value) (b encoding.BinaryUnmarshaler) + func BindCLI(cmd *cobra.Command, v *viper.Viper, spec interface{}, prefix ...string) error + func CollectParamStoreFromEnv(appTitle string, spec interface{}, prefix ...string) (map[string]string, error) + func EnvNames(spec interface{}, prefix ...string) ([]string, error) + func EnvReport(spec interface{}, prefix ...string) (map[string]string, error) + func EnvToMap(spec interface{}, prefix ...string) (map[string]string, error) + func EnvVar(key string) (string, error) + func EnvVarOptional(key string) string + func EnvVarStrict(key string) (string, error) + func PStoreKey(field Field, appTitle, env string) string + func ProcessCLI(v *viper.Viper, spec interface{}, prefix ...string) error + func ProcessEnv(spec interface{}, prefix ...string) error + func ProcessField(value string, field reflect.Value) error + func ProcessParamStore(pstore ssmiface.SSMAPI, appTitle string, isEncrypted bool, spec interface{}, ...) (map[string]string, error) + func TextUnmarshaler(field reflect.Value) (t encoding.TextUnmarshaler) + type Config struct + Data interface{} + func NewConfig(d interface{}) *Config + func (c *Config) CollectParamStoreFromEnv(appTitle string, prefix ...string) (map[string]string, error) + func (c *Config) EnvNames(prefix ...string) ([]string, error) + func (c *Config) EnvReport(prefix ...string) (map[string]string, error) + func (c *Config) EnvToMap(prefix ...string) (map[string]string, error) + func (c *Config) ProcessCLI(v *viper.Viper, prefix ...string) error + func (c *Config) ProcessEnv(prefix ...string) error + func (c *Config) ProcessParamStore(pstore ssmiface.SSMAPI, appTitle string, isEncrypted bool, prefix ...string) (map[string]string, error) + type Decoder interface + Decode func(value string) error + func DecoderFrom(field reflect.Value) (d Decoder) + type Field struct + EnvVar string + Name string + Prefix string + ReflectTag reflect.StructTag + ReflectValue reflect.Value + StructName string + Tag Tag + func Fields(spec interface{}, prefixParam ...string) ([]Field, error) + func NewField(name string, prefix string, sn string, v reflect.Value, t reflect.StructTag, ...) Field + func (f Field) BindName() string + func (f Field) CLIFlag() string + func (f Field) CLIShortFlag() string + func (f Field) CLIUsage() string + func (f Field) DefaultValue() string + func (f Field) EnvVariable() string + func (f Field) IsCLI() bool + func (f Field) IsDefault() bool + func (f Field) IsGlobalParamStore() bool + func (f Field) IsParamStore() bool + func (f Field) IsPersistentFlag() bool + func (f Field) IsRequired() bool + func (f Field) ParamStoreKey() string + type Setter interface + Set func(value string) error + func SetterFrom(field reflect.Value) (s Setter) + type Tag struct + CLIFlag string + CLIShort string + CLIUsage string + Default string + EnvVar string + IsCLIPFlag bool + IsDefault bool + IsPStoreGlobal bool + Mask bool + NoCLIBind bool + NoPrefix bool + NoPrint bool + PStoreVar string + Required bool + func ParseTag(t string) (Tag, error)