proto

package
v1.7.12 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package proto provides proto file logic

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal added in v1.4.0

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

Marshal returns the wire-format encoding of m.

func Unmarshal added in v1.4.0

func Unmarshal(data []byte, v Message) error

Unmarshal parses the wire-format message in b and places the result in m.

Types

type Message

type Message = proto.Message

Message is a type alias of proto.Message.

func Clone

func Clone(m Message) Message

Clone returns a deep copy of m.

func ToMessageV2 added in v1.7.9

func ToMessageV2(m MessageV1) Message

ToMessageV2 upcasts V1 Message to V2 protobuf MessageV2.

type MessageV1 added in v1.2.1

type MessageV1 = protoiface.MessageV1

MessageV1 is a type alias of protoiface.MessageV1.

func ToMessageV1 added in v1.2.1

func ToMessageV1(m Message) MessageV1

ToMessageV1 downcasts Messages to V1 protobuf MessageV1.

type Name added in v1.2.1

type Name = protoreflect.Name

Name is a type alias of protoreflect.Name.

Jump to

Keyboard shortcuts

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