decoder

package
v0.20.2 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MEDIA_JSON  = "application/json"
	MEDIA_PLAIN = "text/plain"
	MEDIA_HTML  = "text/html"
	MEDIA_XML   = "text/xml"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Decoder

type Decoder interface {
	DecoderObj(resp []byte, obj interface{}) (Decoder, error)
}

func GetDecoder

func GetDecoder(ct string) Decoder

type JSONDecoder

type JSONDecoder struct{}

func (JSONDecoder) DecoderObj

func (d JSONDecoder) DecoderObj(resp []byte, obj interface{}) (Decoder, error)

type StreamDecoder

type StreamDecoder struct{}

func (StreamDecoder) DecoderObj

func (d StreamDecoder) DecoderObj(resp []byte, obj interface{}) (Decoder, error)

type StringDecoder

type StringDecoder struct{}

func (StringDecoder) DecoderObj

func (d StringDecoder) DecoderObj(resp []byte, obj interface{}) (Decoder, error)

Jump to

Keyboard shortcuts

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