Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var EmptyContext = ParsingContext{}
View Source
var PrimitivesParser = &primitivesParser{}
Functions ¶
func IsPrimitive ¶
Types ¶
type ArrayParser ¶
type ArrayParser struct {
// contains filtered or unexported fields
}
func NewArrayParser ¶
func NewArrayParser(config *Config) *ArrayParser
func (*ArrayParser) Parse ¶
func (parser *ArrayParser) Parse(from reflect.Value, into reflect.Value, ctx ParsingContext) error
type Config ¶
type Config struct { TagName string ValueResolver func(ctx ParsingContext) (reflect.Value, error) }
type InterfaceParser ¶
type InterfaceParser struct {
// contains filtered or unexported fields
}
func NewInterfaceParser ¶
func NewInterfaceParser(config *Config) *InterfaceParser
func (*InterfaceParser) Parse ¶
func (parser *InterfaceParser) Parse(from reflect.Value, into reflect.Value, ctx ParsingContext) error
type MapParser ¶
type MapParser struct {
// contains filtered or unexported fields
}
func NewMapParser ¶
type ParsingContext ¶
type PointerParser ¶
type PointerParser struct {
// contains filtered or unexported fields
}
func NewPointerParser ¶
func NewPointerParser(config *Config) *PointerParser
func (*PointerParser) Parse ¶
func (parser *PointerParser) Parse(from reflect.Value, into reflect.Value, ctx ParsingContext) error
handlePointer when the destination field is a pointer currently we support POINTERS TO STRUCTS only
Checking if the pointer is to nil, if so - creating a new empty struct and pointing to it. Then letting the structParser to handle the assignment into the struct.
type ResolverParser ¶
type ResolverParser struct {
// contains filtered or unexported fields
}
func NewResolverParser ¶
func NewResolverParser(config *Config) *ResolverParser
func (*ResolverParser) Parse ¶
func (parser *ResolverParser) Parse(from reflect.Value, into reflect.Value, ctx ParsingContext) error
type StructParser ¶
type StructParser struct {
// contains filtered or unexported fields
}
func NewStructParser ¶
func NewStructParser(config *Config) *StructParser
func (*StructParser) Parse ¶
func (parser *StructParser) Parse(from reflect.Value, into reflect.Value, ctx ParsingContext) error
type UnionTypeContainer ¶
type UnionTypeContainer interface {
ResolveType(ctx ParsingContext) (reflect.Value, error)
}
Click to show internal directories.
Click to hide internal directories.