protoutil

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

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

func MarshalMap

func MarshalMap(from proto.Message) (map[string]interface{}, error)

func MarshalStruct

func MarshalStruct(m interface{}) (*types.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 Unmarshal

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

func UnmarshalMap

func UnmarshalMap(m map[string]interface{}, into proto.Message) error

func UnmarshalStruct

func UnmarshalStruct(structuredData *types.Struct, into interface{}) error

func UnmarshalValue

func UnmarshalValue(value *types.Value, into interface{}) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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