Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultMapstructureDecoder = (func() *MapstructureDecoder { weaklyTypedInput := true decodeHook := mapstructure.ComposeDecodeHookFunc( mapstructure.StringToTimeDurationHookFunc(), mapstructure.StringToTimeHookFunc(time.RFC3339), StringToJsonUint64HookFunc(), StringToJsonNumericStringHookFunc(), StringToDurationHookFunc(), StringToByteSliceHookFunc(), ) return NewMapstructureDecoder( weaklyTypedInput, decodeHook, ) })()
Functions ¶
func StringToByteSliceHookFunc ¶
func StringToByteSliceHookFunc() mapstructure.DecodeHookFunc
[]byte is JSON encoded as base64 string in Golang. This decode function converts string -> []byte pair correctly.
func StringToDurationHookFunc ¶
func StringToDurationHookFunc() mapstructure.DecodeHookFunc
String to wrapped Duration
func StringToJsonNumericStringHookFunc ¶
func StringToJsonNumericStringHookFunc() mapstructure.DecodeHookFunc
func StringToJsonUint64HookFunc ¶
func StringToJsonUint64HookFunc() mapstructure.DecodeHookFunc
String to wrapped json.Uint64
Types ¶
type MapstructureDecoder ¶
type MapstructureDecoder struct {
// contains filtered or unexported fields
}
func NewMapstructureDecoder ¶
func NewMapstructureDecoder( weeklyTypedInput bool, decodeHookFuncFn mapstructure.DecodeHookFunc, ) *MapstructureDecoder
func (*MapstructureDecoder) Decode ¶
func (generator *MapstructureDecoder) Decode( input interface{}, resultPtr interface{}, ) error
func (*MapstructureDecoder) MustDecode ¶
func (generator *MapstructureDecoder) MustDecode( input interface{}, resultPtr interface{}, )
Click to show internal directories.
Click to hide internal directories.