protoutils

package
v1.18.0-beta4 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NilStructError = eris.New("cannot unmarshal nil struct")
)

Functions

func MarshalBytes

func MarshalBytes(pb proto.Message) ([]byte, error)

func MarshalBytesEmitZeroValues

func MarshalBytesEmitZeroValues(pb proto.Message) ([]byte, error)

func MarshalBytesIndented added in v1.17.0

func MarshalBytesIndented(pb proto.Message) ([]byte, error)

func MarshalStruct

func MarshalStruct(m proto.Message) (*structpb.Struct, error)

this function is designed for converting go object (that is not a proto.Message) into a pb Struct, based on json struct tags

func MarshalStructEmitZeroValues

func MarshalStructEmitZeroValues(m proto.Message) (*structpb.Struct, error)

func UnmarshalAllowUnknown added in v1.17.0

func UnmarshalAllowUnknown(r io.Reader, into proto.Message) error

func UnmarshalBytes added in v1.6.0

func UnmarshalBytes(data []byte, into proto.Message) error

func UnmarshalBytesAllowUnknown added in v1.17.0

func UnmarshalBytesAllowUnknown(data []byte, into proto.Message) error

func UnmarshalYaml added in v1.6.0

func UnmarshalYaml(data []byte, into proto.Message) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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