package
0.0.0-20231027131641-93b1e7503408
Repository: https://github.com/lightstar/golib.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
Package env is a wrapper around config package and allows reading configuration from some source and parsing it with some encoder, both defined in environment variables.
Package etcd is a wrapper around config package and allows reading configuration from some key in etcd server.
Package file is a wrapper around config package and allows reading configuration from some file on disk.
Package i2s provides convertor from raw data representation as map[string]interface{} into external structure using reflection.

# Functions

Must function panics on any error that can rise after creating configuration service.
NewFromBytes function creates new configuration service using source bytes and chosen encoder.
NewFromRaw function creates new configuration service using already parsed raw configuration data.
NewInner function creates new configuration service using data under some key in another already existing configuration service.

# Variables

ErrNoSuchKey error is returned when source configuration data doesn't have the wanted key.
ErrNotMap error is returned when retrieved data is not a map, but it has to be.

# Structs

Config structure that provides configuration service.

# Interfaces

Encoder is an object used to convert source bytes into structured representation of configuration.