Documentation
ΒΆ
Index ΒΆ
- Constants
- func WithViper() compogo.Option
- type Config
- type Decorator
- func (decorator *Decorator) GetBool(s string) bool
- func (decorator *Decorator) GetDuration(s string) time.Duration
- func (decorator *Decorator) GetFloat32(s string) float32
- func (decorator *Decorator) GetFloat64(s string) float64
- func (decorator *Decorator) GetInt(s string) int
- func (decorator *Decorator) GetInt8(s string) int8
- func (decorator *Decorator) GetInt16(s string) int16
- func (decorator *Decorator) GetInt32(s string) int32
- func (decorator *Decorator) GetInt64(s string) int64
- func (decorator *Decorator) GetIntSlice(s string) []int
- func (decorator *Decorator) GetSizeInBytes(s string) uint
- func (decorator *Decorator) GetString(s string) string
- func (decorator *Decorator) GetStringMap(s string) map[string]any
- func (decorator *Decorator) GetStringMapString(s string) map[string]string
- func (decorator *Decorator) GetStringMapStringSlice(s string) map[string][]string
- func (decorator *Decorator) GetStringSlice(s string) []string
- func (decorator *Decorator) GetTime(s string) time.Time
- func (decorator *Decorator) GetUint(s string) uint
- func (decorator *Decorator) GetUint8(s string) uint8
- func (decorator *Decorator) GetUint16(s string) uint16
- func (decorator *Decorator) GetUint32(s string) uint32
- func (decorator *Decorator) GetUint64(s string) uint64
- func (decorator *Decorator) ReadConfig() (err error)
- func (decorator *Decorator) SetDefault(s string, a any)
- func (decorator *Decorator) With(s string) configurator.Configurator
Constants ΒΆ
View Source
const ( PathFieldName = "config.path" NameFieldName = "config.name" TypeFieldName = "config.type" EnvKeyReplaceFromFieldName = "config.env.replace.from" EnvKeyReplaceToFieldName = "config.env.replace.to" PathDefault = "." NameDefault = "config" TypeDefault = "yaml" EnvKeyReplaceFromDefault = "." EnvKeyReplaceToDefault = "_" )
Variables ΒΆ
This section is empty.
Functions ΒΆ
Types ΒΆ
type Config ΒΆ
type Config struct {
Path string
Name string
Type string
EnvKeyReplaceFrom string
EnvKeyReplaceTo string
}
func Configuration ΒΆ
type Decorator ΒΆ
func NewDecorator ΒΆ
func NewDecorator() *Decorator
func (*Decorator) GetDuration ΒΆ added in v0.0.9
func (*Decorator) GetFloat32 ΒΆ
func (*Decorator) GetFloat64 ΒΆ added in v0.0.9
func (*Decorator) GetIntSlice ΒΆ added in v0.0.9
func (*Decorator) GetSizeInBytes ΒΆ added in v0.0.9
func (*Decorator) GetStringMap ΒΆ added in v0.0.9
func (*Decorator) GetStringMapString ΒΆ added in v0.0.9
func (*Decorator) GetStringMapStringSlice ΒΆ added in v0.0.9
func (*Decorator) GetStringSlice ΒΆ added in v0.0.9
func (*Decorator) ReadConfig ΒΆ
func (*Decorator) SetDefault ΒΆ added in v0.0.9
func (*Decorator) With ΒΆ added in v0.0.9
func (decorator *Decorator) With(s string) configurator.Configurator
Click to show internal directories.
Click to hide internal directories.