Documentation
¶
Overview ¶
Package protoutil contains functions for working with protobuf types.
Index ¶
- func NewAnyBool(v bool) *anypb.Any
- func NewAnyBytes(v []byte) *anypb.Any
- func NewAnyDouble(v float64) *anypb.Any
- func NewAnyFloat(v float32) *anypb.Any
- func NewAnyInt32(v int32) *anypb.Any
- func NewAnyInt64(v int64) *anypb.Any
- func NewAnyNull() *anypb.Any
- func NewAnyString(v string) *anypb.Any
- func NewAnyUInt32(v uint32) *anypb.Any
- func NewAnyUInt64(v uint64) *anypb.Any
- func NewStructBool(v bool) *structpb.Value
- func NewStructList(vs ...*structpb.Value) *structpb.Value
- func NewStructMap(v map[string]*structpb.Value) *structpb.Value
- func NewStructNull() *structpb.Value
- func NewStructNumber(v float64) *structpb.Value
- func NewStructString(v string) *structpb.Value
- func ToAny(value interface{}) *anypb.Any
- func ToStruct(value interface{}) *structpb.Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAnyBytes ¶
NewAnyBytes creates a new any type from bytes.
func NewAnyDouble ¶
NewAnyDouble creates a new any type from a float64.
func NewAnyFloat ¶
NewAnyFloat creates a new any type from a float32.
func NewAnyInt32 ¶
NewAnyInt32 creates a new any type from an int32.
func NewAnyInt64 ¶
NewAnyInt64 creates a new any type from an int64.
func NewAnyNull ¶
NewAnyNull creates a new any type from a null struct.
func NewAnyString ¶
NewAnyString creates a new any type from a string.
func NewAnyUInt32 ¶
NewAnyUInt32 creates a new any type from an uint32.
func NewAnyUInt64 ¶
NewAnyUInt64 creates a new any type from an uint64.
func NewStructBool ¶
NewStructBool creates a new bool struct value.
func NewStructList ¶
NewStructList creates a new list struct value.
func NewStructMap ¶
NewStructMap creates a new map struct value.
func NewStructNull ¶
NewStructNull creates a new null struct value.
func NewStructNumber ¶
NewStructNumber creates a new number struct value.
func NewStructString ¶
NewStructString creates a new string struct value.
Types ¶
This section is empty.