format

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Encoder

type Encoder interface {
	ContentType() string                       // ContentType returns the Content-Type header
	Accept() string                            // Accept returns the Accept header.
	Decode(r io.Reader, rcv interface{}) error // Decode takes a response body and decodes it into the receiver rcv.
	Encode(i interface{}) (io.Reader, error)   // Encode takes the request body and encodes it into the correct
	EncodeTo(w io.Writer, i interface{}) error // EncodeTo similar to Encode except we attempt to encode to the supplied writer.
}

Encoder is an interface which allows us to interchange the way we encode and decode the request and response bodies.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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