proto

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: Apache-2.0 Imports: 2 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Equal

func Equal(x, y Message) bool

Equal reports whether two messages are equal, by recursively comparing the fields of the message.

func Marshal

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

Marshal returns the wire-format encoding of m.

func MarshalV1 added in v0.7.0

func MarshalV1(m MessageV1) ([]byte, error)

MarshalV1 returns the wire-format encoding of m. The provided message is a v1 message.

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).

func UnmarshalV1 added in v0.7.0

func UnmarshalV1(b []byte, m MessageV1) error

UnmarshalV1 parses the wire-format message in b and places the result in m. The provided message is a v1 message.

Types

type Message

type Message = proto.Message

func Clone

func Clone(src Message) Message

Clone returns a deep copy of m. If the top-level message is invalid, it returns an invalid message as well.

type MessageV1 added in v0.7.0

type MessageV1 = protoadapt.MessageV1

Jump to

Keyboard shortcuts

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