Help us shape the future of Go! Take the 2026 Go Developer Survey

codec

package
v2.10.4 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const Name string = "proto"

By default, gRPC registers and uses the "proto" codec, so it is not necessary to do this in your own code to send and receive proto messages. https://github.com/grpc/grpc-go/blob/master/Documentation/encoding.md#using-a-codec

Variables

This section is empty.

Functions

This section is empty.

Types

type Codec

type Codec struct {
	Base encoding.Codec
}

func (*Codec) Marshal

func (c *Codec) Marshal(v interface{}) ([]byte, error)

Marshal returns the wire format of v. rawMessages would be returned without encoding.

func (*Codec) Name

func (c *Codec) Name() string

func (*Codec) String

func (c *Codec) String() string

String return codec name.

func (*Codec) Unmarshal

func (c *Codec) Unmarshal(data []byte, v interface{}) error

Unmarshal parses the wire format into v. rawMessages would not be unmarshalled.

type RawMessage

type RawMessage []byte

func (RawMessage) ProtoMessage

func (RawMessage) ProtoMessage()

func (RawMessage) Reset

func (r RawMessage) Reset()

func (RawMessage) String

func (RawMessage) String() string

Jump to

Keyboard shortcuts

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