decode

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2020 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Header is the http header decoder
	Header = headerDecode{}
)

Functions

func Body added in v0.0.5

func Body(r io.Reader, obj interface{}) error

Body body decoder

func JSON added in v0.0.5

func JSON(r io.Reader, obj interface{}) error

JSON json decoder

func XML added in v0.0.5

func XML(r io.Reader, obj interface{}) error

XML xml decoder

func YAML added in v0.0.5

func YAML(r io.Reader, obj interface{}) error

YAML yaml decoder

Types

type BodyDecode

type BodyDecode struct {
	// contains filtered or unexported fields
}

BodyDecode body decoder structure

func NewBodyDecode

func NewBodyDecode(obj interface{}) *BodyDecode

NewBodyDecode create a new body decoder

func (*BodyDecode) Decode

func (b *BodyDecode) Decode(r io.Reader) error

Decode body decoder

type Decoder

type Decoder interface {
	Decode(r io.Reader) error
}

Decoder is the decoding interface

type Decoder2 added in v0.0.7

type Decoder2 interface {
	Decode(*http.Request, interface{})
}

Decoder Decoder interface

type JSONDecode added in v0.0.2

type JSONDecode struct {
	// contains filtered or unexported fields
}

JSONDecode json decoder core data structure

func NewJSONDecode added in v0.0.2

func NewJSONDecode(obj interface{}) *JSONDecode

NewJSONDecode create a new json decoder

func (*JSONDecode) Decode added in v0.0.2

func (j *JSONDecode) Decode(r io.Reader) error

Decode json decoder

type XMLDecode added in v0.0.2

type XMLDecode struct {
	// contains filtered or unexported fields
}

XMLDecode xml decoder core data structure

func NewXMLDecode added in v0.0.2

func NewXMLDecode(obj interface{}) *XMLDecode

NewXMLDecode create a new xml decoder

func (*XMLDecode) Decode added in v0.0.2

func (x *XMLDecode) Decode(r io.Reader) error

Decode xml decoder

type YAMLDecode added in v0.0.2

type YAMLDecode struct {
	// contains filtered or unexported fields
}

YAMLDecode yaml decoder core data structure

func NewYAMLDecode added in v0.0.2

func NewYAMLDecode(obj interface{}) *YAMLDecode

NewYAMLDecode create a new yaml decoder

func (*YAMLDecode) Decode added in v0.0.2

func (x *YAMLDecode) Decode(r io.Reader) error

Decode yaml decoder

Jump to

Keyboard shortcuts

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