Documentation ¶
Index ¶
- func WithLogger(logger *logrus.Logger) interfaces.ConfigurationOption
- func WithName(name string) interfaces.ConfigurationOption
- func WithProvider(provider string) interfaces.ConfigurationOption
- func WithURI(uri string) interfaces.ConfigurationOption
- type Viper
- func (v *Viper) Get(key string) (interface{}, error)
- func (v *Viper) GetArrayOfStringsOrDefault(path string, defaultValue []string) []string
- func (v *Viper) GetBoolOrDefault(path string, defaultValue bool) bool
- func (v *Viper) GetDurationOrDefault(path string, defaultValue time.Duration) time.Duration
- func (v *Viper) GetFloat64OrDefault(path string, defaultValue float64) float64
- func (v *Viper) GetIntOrDefault(path string, defaultValue int) int
- func (v *Viper) GetMapOfStringOrDefault(path string, defaultValue map[string]string) map[string]string
- func (v *Viper) GetStringOrDefault(path string, defaultValue string) string
- func (v *Viper) Open(paths ...string) error
- func (v *Viper) Save(data interface{}) error
- func (v *Viper) Set(key string, value interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithLogger ¶
func WithLogger(logger *logrus.Logger) interfaces.ConfigurationOption
func WithName ¶
func WithName(name string) interfaces.ConfigurationOption
func WithProvider ¶
func WithProvider(provider string) interfaces.ConfigurationOption
func WithURI ¶
func WithURI(uri string) interfaces.ConfigurationOption
Types ¶
type Viper ¶
func New ¶
func New(options ...interfaces.ConfigurationOption) (*Viper, error)
func (*Viper) GetArrayOfStringsOrDefault ¶
func (*Viper) GetBoolOrDefault ¶
func (*Viper) GetDurationOrDefault ¶
func (*Viper) GetFloat64OrDefault ¶
func (*Viper) GetMapOfStringOrDefault ¶
func (*Viper) GetStringOrDefault ¶
Click to show internal directories.
Click to hide internal directories.