decode

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2021 License: Apache-2.0 Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrWrongParam = errors.New("Wrong parameter")
View Source
var (
	// Header is the http header decoder
	Header = headerDecode{}
)

Functions

func Body

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

Body body decoder

func JSON

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

JSON json decoder

func XML

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

XML xml decoder

func YAML

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

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

Decoder Decoder interface

type JSONDecode

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

JSONDecode json decoder core data structure

func NewJSONDecode

func NewJSONDecode(obj interface{}) *JSONDecode

NewJSONDecode create a new json decoder

func (*JSONDecode) Decode

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

Decode json decoder

type XMLDecode

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

XMLDecode xml decoder core data structure

func NewXMLDecode

func NewXMLDecode(obj interface{}) *XMLDecode

NewXMLDecode create a new xml decoder

func (*XMLDecode) Decode

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

Decode xml decoder

type YAMLDecode

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

YAMLDecode yaml decoder core data structure

func NewYAMLDecode

func NewYAMLDecode(obj interface{}) *YAMLDecode

NewYAMLDecode create a new yaml decoder

func (*YAMLDecode) Decode

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