Documentation ¶
Index ¶
Constants ¶
View Source
const ( JSONCodecName = "application/json" // check https://tools.ietf.org/html/draft-rfernando-protocol-buffers-00 for more information. // but it still a draft, so this constant can be renamed in any future release: // when some mime type for protobuf will be accepted as a standard. ProtoCodecName = "application/protobuf" ProtoCodecName1 = "application/x-protobuf" // will be linked to ProtoCodecName in future release. ProtoCodecName2 = "application/x-google-protobuf" // will be linked to ProtoCodecName in future release. XMLCodecName = "application/xml" )
Variables ¶
View Source
var NotProtoMessage = errors.New("not proto message")
View Source
var Register = register{/* contains filtered or unexported fields */}
Functions ¶
This section is empty.
Types ¶
type ProtobufCodec ¶
type ProtobufCodec struct{}
func (*ProtobufCodec) Decode ¶
func (c *ProtobufCodec) Decode(data []byte, v interface{}) error
func (*ProtobufCodec) Encode ¶
func (c *ProtobufCodec) Encode(v interface{}) ([]byte, error)
Click to show internal directories.
Click to hide internal directories.