Documentation ¶
Index ¶
- func Json(source []byte, target interface{}) error
- func KeyValueMap(source map[string]interface{}, target interface{}) error
- func SetErrorHandler(proc ErrorHandler)
- func UrlQuery(source []byte, target interface{}) error
- func UrlQueryString(source string, target interface{}) error
- type BinaryContentProcessor
- type ContentProcessor
- type ErrorHandler
- type MapContentProcessor
- type Processor
- func (p *Processor) ProcessBytes(source []byte, proc BinaryContentProcessor) *Processor
- func (p *Processor) ProcessContent(source interface{}, proc ContentProcessor) *Processor
- func (p *Processor) ProcessMap(source map[string]interface{}, proc MapContentProcessor) *Processor
- func (p *Processor) ProcessString(source string, proc TextContentProcessor) *Processor
- func (p *Processor) Validate()
- type ProcessorOption
- type ProcessorOptionFunc
- type TextContentProcessor
- type Validatable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func KeyValueMap ¶
func SetErrorHandler ¶
func SetErrorHandler(proc ErrorHandler)
func UrlQueryString ¶
Types ¶
type BinaryContentProcessor ¶
type ContentProcessor ¶
type ContentProcessor func(source interface{}, target interface{}) error
type ErrorHandler ¶
type ErrorHandler func(err error)
type MapContentProcessor ¶
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
func NewProcessor ¶
func NewProcessor(target interface{}, opts ...ProcessorOption) *Processor
func (*Processor) ProcessBytes ¶
func (p *Processor) ProcessBytes(source []byte, proc BinaryContentProcessor) *Processor
func (*Processor) ProcessContent ¶
func (p *Processor) ProcessContent(source interface{}, proc ContentProcessor) *Processor
func (*Processor) ProcessMap ¶
func (p *Processor) ProcessMap(source map[string]interface{}, proc MapContentProcessor) *Processor
func (*Processor) ProcessString ¶
func (p *Processor) ProcessString(source string, proc TextContentProcessor) *Processor
type ProcessorOption ¶
type ProcessorOption interface {
// contains filtered or unexported methods
}
func WithErrorHandler ¶
func WithErrorHandler(proc ErrorHandler) ProcessorOption
type ProcessorOptionFunc ¶
type ProcessorOptionFunc func(processor *Processor)
type TextContentProcessor ¶
type Validatable ¶
type Validatable interface {
Validate() error
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.