Documentation
¶
Index ¶
- Variables
- func EnrichStr(value string) string
- func ReadJson(path string) map[string]interface{}
- type EnvParamsData
- type Enverant
- func (e *Enverant) GetBool(key string, opts ...ValueOption) bool
- func (e *Enverant) GetBoolOr(key string, default_ bool, opts ...ValueOption) bool
- func (e *Enverant) GetBoolean(key string, opts ...ValueOption) (bool, bool)
- func (e *Enverant) GetInt(key string, opts ...ValueOption) int
- func (e *Enverant) GetIntOr(key string, default_ int, opts ...ValueOption) int
- func (e *Enverant) GetInteger(key string, opts ...ValueOption) (int, bool)
- func (e *Enverant) GetParams() []*EnvParamsData
- func (e *Enverant) GetPtrBool(key string, opts ...ValueOption) *bool
- func (e *Enverant) GetPtrInt(key string, opts ...ValueOption) *int
- func (e *Enverant) GetPtrStr(key string, opts ...ValueOption) *string
- func (e *Enverant) GetStr(key string, opts ...ValueOption) string
- func (e *Enverant) GetStrOr(key string, default_ string, opts ...ValueOption) string
- func (e *Enverant) GetString(key string, opts ...ValueOption) (string, bool)
- func (m *Enverant) GetValidating() *Enverant
- func (e *Enverant) LookupEnv(key string, params *ValueParams) (string, bool)
- func (e *Enverant) ValidetNoUnused()
- type EnverantOption
- type ValueOption
- type ValueParams
- type VarType
Constants ¶
This section is empty.
Variables ¶
View Source
var EnverantDebug = os.Getenv("ENVERANT_PRINT_JSON") == "true"
Functions ¶
Types ¶
type EnvParamsData ¶ added in v0.23.0
type EnvParamsData struct { *ValueParams PrefixedKey string Value string }
type Enverant ¶
type Enverant struct { Description string // contains filtered or unexported fields }
func NewEnverant ¶
func NewEnverant(opts ...EnverantOption) *Enverant
func (*Enverant) GetBoolOr ¶
func (e *Enverant) GetBoolOr(key string, default_ bool, opts ...ValueOption) bool
func (*Enverant) GetBoolean ¶ added in v0.17.0
func (e *Enverant) GetBoolean(key string, opts ...ValueOption) (bool, bool)
func (*Enverant) GetIntOr ¶
func (e *Enverant) GetIntOr(key string, default_ int, opts ...ValueOption) int
func (*Enverant) GetInteger ¶ added in v0.17.0
func (e *Enverant) GetInteger(key string, opts ...ValueOption) (int, bool)
func (*Enverant) GetParams ¶ added in v0.23.0
func (e *Enverant) GetParams() []*EnvParamsData
func (*Enverant) GetPtrBool ¶ added in v0.17.0
func (e *Enverant) GetPtrBool(key string, opts ...ValueOption) *bool
func (*Enverant) GetPtrInt ¶ added in v0.17.0
func (e *Enverant) GetPtrInt(key string, opts ...ValueOption) *int
func (*Enverant) GetPtrStr ¶ added in v0.17.0
func (e *Enverant) GetPtrStr(key string, opts ...ValueOption) *string
func (*Enverant) GetStrOr ¶
func (e *Enverant) GetStrOr(key string, default_ string, opts ...ValueOption) string
func (*Enverant) GetString ¶ added in v0.17.0
func (e *Enverant) GetString(key string, opts ...ValueOption) (string, bool)
func (*Enverant) GetValidating ¶ added in v0.17.1
func (*Enverant) LookupEnv ¶ added in v0.23.0
func (e *Enverant) LookupEnv(key string, params *ValueParams) (string, bool)
func (*Enverant) ValidetNoUnused ¶ added in v0.23.0
func (e *Enverant) ValidetNoUnused()
type EnverantOption ¶
type EnverantOption func(m *Enverant)
func WithDescription ¶ added in v0.23.0
func WithDescription(Description string) EnverantOption
func WithPrefix ¶ added in v0.23.0
func WithPrefix(prefix string) EnverantOption
func WithValidate ¶ added in v0.17.0
func WithValidate(validate bool) EnverantOption
type ValueOption ¶ added in v0.17.0
type ValueOption func(m *ValueParams)
func OrBool ¶ added in v0.17.0
func OrBool(default_ bool) ValueOption
func OrInt ¶ added in v0.17.0
func OrInt(default_ int) ValueOption
func OrStr ¶ added in v0.17.0
func OrStr(default_ string) ValueOption
func WithDesc ¶ added in v0.23.0
func WithDesc(description string) ValueOption
WithDesc - is used to build help information
type ValueParams ¶ added in v0.17.0
Click to show internal directories.
Click to hide internal directories.