proto

package
v0.14.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2021 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Equal added in v0.13.0

func Equal(a, b Message) bool

Equal reports whether two messages are equal.

func Marshal

func Marshal(m Message) ([]byte, error)

Marshal returns the wire-format encoding of m.

func Unmarshal

func Unmarshal(b []byte, m Message) error

Unmarshal parses the wire-format message in b and places the result in m. The provided message must be mutable (e.g., a non-nil pointer to a message).

Types

type Codec

type Codec struct{}

Codec provides protobuf encoding.Codec.

func (Codec) Marshal

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

Marshal implements encoding.Codec.

func (Codec) Name

func (Codec) Name() string

Name implements encoding.Codec.

func (Codec) Unmarshal

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

Unmarshal implements encoding.Codec.

type Message

type Message = proto.Message

Message is the main interface for protobuf API v2 messages.

Jump to

Keyboard shortcuts

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