Documentation ¶
Index ¶
- func FromJSON(content []byte, out proto.Message) error
- func FromMap(in map[string]interface{}, out proto.Message) error
- func FromYAML(content []byte, pb proto.Message) error
- func MarshalAnyDeterministic(pb proto.Message) (*any.Any, error)
- func MustTimestampFromProto(ts *tspb.Timestamp) *time.Time
- func MustTimestampProto(t time.Time) *tspb.Timestamp
- func MustToStruct(message proto.Message) *pstruct.Struct
- func TimestampString(ts *tspb.Timestamp, layout string) string
- func ToDuration(duration duration.Duration) time.Duration
- func ToJSON(pb proto.Message) ([]byte, error)
- func ToMap(pb proto.Message) (map[string]interface{}, error)
- func ToStruct(message proto.Message) (pstruct.Struct, error)
- func ToTyped(protoStruct *pstruct.Struct, message proto.Message) error
- func ToYAML(pb proto.Message) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalAnyDeterministic ¶
When saving Snapshot in SnapshotCache we generate version based on proto.Equal() Therefore we need deterministic way of marshalling Any which is part of the Protobuf on which we execute Equal()
Based on proto.MarshalAny
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.