codec

package
v3.0.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const Name string = "proto"

Name .. 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 any) ([]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 any) 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