Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 7.5% on proxy.golang.org
Top 3.4% dependent packages on proxy.golang.org
Top 3.5% dependent repos on proxy.golang.org

proxy.golang.org : github.com/worldline-go/igconfig

Package igconfig allows to set struct values based on different input places. For example struct can be filled from default values defined in tags, environmental variables or Vault secrets. All values in tags(except value in 'default' tag) should be lower-cased. Failing to make values lower-case will result in inability to properly set those fields. This is a choice to make lower number of mixed-cased values and generally be more in-line with best practices and proper usages. Library is basically a set of "loaders". Loader is anything that satisfies loader.Loader interface. Such loaders will take application name and structure that should be filled and will do specific steps do try and set fields in structure. LoadConfig function contains all the loaders that are enabled by default. This function should be used in most of the cases as only functionality that should be used by the caller. In rare cases caller might want to use specific set of loaders to load configuration. Some loaders also provide ability to periodically update values. This can be useful if application has logging and caller might want to change logging level at a runtime. Example_fileLoader for getting values from file(YAML or JSON). In this example, used to change etc path and get the file name from the appname.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/worldline-go/igconfig
Keywords: config, consul, environment, go, vault
License: MIT
Latest release: about 1 year ago
First release: almost 2 years ago
Namespace: github.com/worldline-go
Dependent packages: 3
Dependent repositories: 2
Stars: 10 on GitHub
Forks: 1 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: about 1 month ago

    Loading...
    Readme
    Loading...