lookup

package
v0.0.0-...-84f2696 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL