Categorygithub.com/zpatrick/cfg
modulepackage
0.0.6
Repository: https://github.com/zpatrick/cfg.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

Addr returns the address of t.
And combines the given validators into a single validator, requiring each validator check to succeed.
Between returns a validator which ensures the input is >= min and <= max.
Load calls Load(ctx) for each schema in schemas.
Not returns a new validator which throws an error when v does not.
OneOf returns a validator which ensures the input is equal to one of the given vals.
Or combines the given validators into a single validator, requiring only one validator check to succeed.
StaticProvider adapts v into a Provider[T].
StaticProviderAddr adapts pv into a Provider[T].

# Constants

A NoValueProvidedError denotes that no value was provided.

# Structs

A Schema models a configuration setting for an application.

# Interfaces

A Provider loads a configuration value from a predetermined source.
A Validator checks whether or not a given value T is considered valid.

# Type aliases

MultiProvider allows a slice of Provider[T] to be used as a Provider[T].
The ProviderFunc is an adapter type which allows ordinary functions to be used as Providers.
Schemas is a named type for a map of Schemas.
A ValidatorFunc is an adapter type which allows functions to be used as Validators.