decode

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2019 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Header = headerDecode{}
)

Functions

func DecodeBody

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

func DecodeJSON

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

func DecodeXML

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

func DecodeYAML

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

Types

type BodyDecode

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

func NewBodyDecode

func NewBodyDecode(obj interface{}) *BodyDecode

func (*BodyDecode) Decode

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

type Decoder

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

type JSONDecode added in v0.0.2

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

func NewJSONDecode added in v0.0.2

func NewJSONDecode(obj interface{}) *JSONDecode

func (*JSONDecode) Decode added in v0.0.2

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

type XMLDecode added in v0.0.2

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

func NewXMLDecode added in v0.0.2

func NewXMLDecode(obj interface{}) *XMLDecode

func (*XMLDecode) Decode added in v0.0.2

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

type YAMLDecode added in v0.0.2

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

func NewYAMLDecode added in v0.0.2

func NewYAMLDecode(obj interface{}) *YAMLDecode

func (*YAMLDecode) Decode added in v0.0.2

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

Jump to

Keyboard shortcuts

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