lookup

package
Version: v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2021 License: Apache-2.0 Imports: 5 Imported by: 76

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigLookup

type ConfigLookup struct {
	// contains filtered or unexported fields
}

ConfigLookup is wrapper for core.ConfigBackend which performs key lookup and unmarshalling

func New

func New(coreBackends ...core.ConfigBackend) *ConfigLookup

New providers lookup wrapper around given backend

func (*ConfigLookup) GetBool

func (c *ConfigLookup) GetBool(key string) bool

GetBool returns bool value for given key

func (*ConfigLookup) GetDuration

func (c *ConfigLookup) GetDuration(key string) time.Duration

GetDuration returns time.Duration value for given key

func (*ConfigLookup) GetInt

func (c *ConfigLookup) GetInt(key string) int

GetInt returns int value for given key

func (*ConfigLookup) GetLowerString

func (c *ConfigLookup) GetLowerString(key string) string

GetLowerString returns lower case string value for given key

func (*ConfigLookup) GetString

func (c *ConfigLookup) GetString(key string) string

GetString returns string value for given key

func (*ConfigLookup) Lookup

func (c *ConfigLookup) Lookup(key string) (interface{}, bool)

Lookup returns value for given key

func (*ConfigLookup) UnmarshalKey

func (c *ConfigLookup) UnmarshalKey(key string, rawVal interface{}, opts ...UnmarshalOption) error

UnmarshalKey unmarshals value for given key to rawval type

type UnmarshalOption

type UnmarshalOption func(o *unmarshalOpts)

UnmarshalOption describes a functional parameter unmarshaling

func WithUnmarshalHookFunction

func WithUnmarshalHookFunction(hookFunction mapstructure.DecodeHookFunc) UnmarshalOption

WithUnmarshalHookFunction provides an option to pass Custom Decode Hook Func for unmarshaling

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL