encoding

package
v0.0.0-...-68bc43f Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2017 License: MIT Imports: 0 Imported by: 0

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

type Marshaler func(interface{}) ([]byte, error)

Marshaler is the interface implemented by objects that can produce a byte representation of another object.

type Unmarshaler

type Unmarshaler func([]byte, interface{}) error

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.

Jump to

Keyboard shortcuts

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