protoutils

package
v1.10.12 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2022 License: Apache-2.0 Imports: 6 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 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 UnmarshalBytes added in v1.6.0

func UnmarshalBytes(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