content

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Json

func Json(source []byte, target interface{}) error

func KeyValueMap

func KeyValueMap(source map[string]interface{}, target interface{}) error

func SetErrorHandler

func SetErrorHandler(proc ErrorHandler)

func UrlQuery

func UrlQuery(source []byte, target interface{}) error

func UrlQueryString

func UrlQueryString(source string, target interface{}) error

Types

type BinaryContentProcessor

type BinaryContentProcessor func(source []byte, target interface{}) error

type ContentProcessor

type ContentProcessor func(source interface{}, target interface{}) error

type ErrorHandler

type ErrorHandler func(err error)

type MapContentProcessor

type MapContentProcessor func(source map[string]interface{}, target interface{}) error

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

func (*Processor) Validate

func (p *Processor) Validate()

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 TextContentProcessor func(source string, target interface{}) error

type Validatable

type Validatable interface {
	Validate() error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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