package
0.0.0-20231027131641-93b1e7503408
Repository: https://github.com/lightstar/golib.git
Documentation: pkg.go.dev
# Functions
CleanEtcd function clears provided key to restore etcd to its original state.
New function creates configuration service using static predefined map of data.
SetupEtcd function prepares etcd for testing by setting provided key to sample config JSON data.
SetupEtcdWrong function prepares etcd for testing by setting provided key to sample wrong config JSON data.
TestSampleConfig function can be used to test provided configuration against expected raw data.
# Variables
ErrNoData error is returned when predefined configuration data is nil.
ErrNoSuchKey error is returned when requested key is not exists in predefined configuration data.
ErrOutputNotPointer error is returned when provided output parameter is not a pointer.
ExpectedSampleConfig variable contains expected result of configuration parsing.
ExpectedSampleRawDataJSON variable contains expected raw result of configuration parsing by JSON encoder.
ExpectedSampleRawDataTOML variable contains expected raw result of configuration parsing by TOML encoder.
ExpectedSampleRawDataYAML variable contains expected raw result of configuration parsing by YAML encoder.
SampleConfigDataJSON variable contains sample configuration as raw JSON data.
SampleConfigDataTOML variable contains sample configuration as raw TOML data.
SampleConfigDataWrongJSON variable contains sample wrong JSON data.
SampleConfigDataWrongTOML variable contains sample wrong TOML data.
SampleConfigDataWrongYAML variable contains sample wrong YAML data.
SampleConfigDataYAML variable contains sample configuration as raw YAML data.
# Structs
ChildProfile structure used as inner aggregate type sample configuration.
Config structure implementing config.Interface.
SampleConfigType structure used for sample configuration.
UserProfile structure used as inner type in sample configuration.