Documentation ¶
Overview ¶
Package encoding defines interfaces shared by other packages that are used by usrv servers and clients to encode and decode the endpoint-specific request and response messages into a byte-level format suitable for transmitting over a transport.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Codec ¶
type Codec interface { Marshaler() Marshaler Unmarshaler() Unmarshaler }
Codec is implemented by objects that can produce marshalers and unmarshalers for a given object type.
Marshaler returns a Marshaler implementation that can marshal instances of a particular type into a byte slice.
Unmarshaler returns a Unmarshaler implementation that can unmarshal instances of a particular type from a byte slice.
type Marshaler ¶
Marshaler is the interface implemented by objects that can produce a byte representation of another object.
type Unmarshaler ¶
Unmarshaler is the interface implemented by objects that can unmarshal a byte representation of an object into an object instance.
Directories ¶
Path | Synopsis |
---|---|
Package gob provides a codec for encoding and decoding of data using the gob format.
|
Package gob provides a codec for encoding and decoding of data using the gob format. |
Package json provides a codec for encoding and decoding JSON data.
|
Package json provides a codec for encoding and decoding JSON data. |
Package msgpack provides a codec for encoding and decoding data using msgpack.
|
Package msgpack provides a codec for encoding and decoding data using msgpack. |
Package protobuf provides a codec for encoding and decoding of data using protocol buffers.
|
Package protobuf provides a codec for encoding and decoding of data using protocol buffers. |