Documentation ¶
Index ¶
- Constants
- func ComposeDecodeHookFunc(fs ...DecodeHookFunc) mapstructure.DecodeHookFunc
- func DecodeStructuredString(ctx *DecodeContext, targetType reflect.Type) error
- func UnmarshalMapToStruct(ctx *DecodeContext, targetType reflect.Type) error
- type DataProvider
- type DecodeContext
- type DecodeHookFunc
- type Decoder
- type QueryOptionType
Constants ¶
View Source
const ( QO_ALWAYS QueryOptionType = "always" // always query data from data provider QO_AUTO = "" // query data if data is nil QO_NO = "no" // never query data from data provider for current field node and its children QO_BYPASS = "bypass" // never query data for the current field node )
Variables ¶
This section is empty.
Functions ¶
func ComposeDecodeHookFunc ¶
func ComposeDecodeHookFunc(fs ...DecodeHookFunc) mapstructure.DecodeHookFunc
func DecodeStructuredString ¶
func DecodeStructuredString(ctx *DecodeContext, targetType reflect.Type) error
func UnmarshalMapToStruct ¶
func UnmarshalMapToStruct(ctx *DecodeContext, targetType reflect.Type) error
Types ¶
type DataProvider ¶
type DataProvider interface {
Get(key string) interface{}
}
type DecodeContext ¶
type DecodeContext struct { Data interface{} QueryKey string QueryOption QueryOptionType // contains filtered or unexported fields }
func (*DecodeContext) Done ¶
func (ctx *DecodeContext) Done()
type DecodeHookFunc ¶
type DecodeHookFunc func(*DecodeContext, reflect.Type) error
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
func NewDecoder ¶
func NewDecoder(dp DataProvider) *Decoder
type QueryOptionType ¶
type QueryOptionType string
Click to show internal directories.
Click to hide internal directories.