codecs

package
v0.0.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// MediaTypeProtobuf is the Protobuf serialization format media type.
	MediaTypeProtobuf = encoding.MediaType("application/x-protobuf")
	// MediaTypeJSON is the JSON serialiation format media type.
	MediaTypeJSON = encoding.MediaType("application/json")

	NameProtobuf = "protobuf"
	NameJSON     = "json"
)

Variables

View Source
var ByMediaType = map[encoding.MediaType]encoding.Codec{
	MediaTypeProtobuf: encoding.Codec{
		Name:       NameProtobuf,
		Type:       MediaTypeProtobuf,
		NewEncoder: proto.NewEncoder,
		NewDecoder: proto.NewDecoder,
	},
	MediaTypeJSON: encoding.Codec{
		Name:       NameJSON,
		Type:       MediaTypeJSON,
		NewEncoder: json.NewEncoder,
		NewDecoder: json.NewDecoder,
	},
}

ByMediaType are pre-configured default Codecs, ready to use OOTB

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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