package
1.7.0
Repository: https://github.com/acronis/go-appkit.git
Documentation: pkg.go.dev

# Functions

CallSetForFields finds all initialized (non-nil) fields of the passed object that implement Config interface and calls Set() method for each of them.
CallSetProviderDefaultsForFields finds all initialized (non-nil) fields of the passed object that implement Config interface and calls SetProviderDefaults() method for each of them.
NewDefaultLoader creates a new configurations loader with an ability to read values from the environment variables.
NewKeyPrefixedDataProvider creates a new KeyPrefixedDataProvider.
NewLoader creates a new configurations' loader.
NewViperAdapter creates a new ViperAdapter.
UpdateDataProvider changes data provider values from config structures.
WrapKeyErr wraps error adding information about a key where this error occurs.
WrapKeyErrIfNeeded wraps error adding information about a key where this error occurs.

# Constants

Supported data formats.
Supported data formats.

# Structs

KeyPrefixedDataProvider is a DataProvider implementation that uses a specified key prefix for parsing configuration parameters.
Loader loads configuration values from data provider (with initializing default values before) and sets them in configuration objects.
ViperAdapter is DataProvider implementation that uses viper library under the hood.

# Interfaces

Config is a common interface for configuration objects that may be used by Loader.
DataProvider is an interface for providing configuration data from different sources (files, reader, environment variables).
DataProviderUpdater objects can update data providers using their internal values.
KeyPrefixProvider is an interface for providing key prefix that will be used for configuration parameters.

# Type aliases

DataType is a type of data format in which configuration may be described.
A DecoderConfigOption can be passed to UnmarshalKey to configure mapstructure.DecoderConfig options.