proto

package
v0.0.0-...-4760111 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromJSON

func FromJSON(content []byte, out proto.Message) error

func FromMap

func FromMap(in map[string]interface{}, out proto.Message) error

func FromYAML

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

func MustTimestampFromProto

func MustTimestampFromProto(ts *tspb.Timestamp) *time.Time

func MustTimestampProto

func MustTimestampProto(t time.Time) *tspb.Timestamp

func MustToStruct

func MustToStruct(message proto.Message) *pstruct.Struct

func TimestampString

func TimestampString(ts *tspb.Timestamp, layout string) string

func ToDuration

func ToDuration(duration duration.Duration) time.Duration

func ToJSON

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

func ToMap

func ToMap(pb proto.Message) (map[string]interface{}, error)

func ToStruct

func ToStruct(message proto.Message) (pstruct.Struct, error)

Converts loosely typed Struct to strongly typed Message

func ToTyped

func ToTyped(protoStruct *pstruct.Struct, message proto.Message) error

Converts loosely typed Struct to strongly typed Message

func ToYAML

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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