Documentation ¶
Overview ¶
Package protoutil contains some utilities for interacting with protocol buffer objects.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustTime ¶
func MustTime(tspb *timestamppb.Timestamp) time.Time
MustTime converts a google.protobuf.Timestamp to a time.Time.
func MustTimestamp ¶
func MustTimestamp(ts time.Time) *timestamppb.Timestamp
MustTimestamp converts a time.Time to a google.protobuf.Timestamp, or panics.
func MustTimestampFromPointer ¶
func MustTimestampFromPointer(ts *time.Time) *timestamppb.Timestamp
MustTimestampFromPointer converts a *time.Time to a google.protobuf.Timestamp, or panics.
Types ¶
type ProtoJSONDecoder ¶
type ProtoJSONDecoder struct {
// contains filtered or unexported fields
}
ProtoJSONDecoder decodes a concatenated stream of protocol buffer messages encoded as JSON.
func NewProtoJSONDecoder ¶
func NewProtoJSONDecoder(r io.Reader, opts protojson.UnmarshalOptions) *ProtoJSONDecoder
func (*ProtoJSONDecoder) More ¶
func (d *ProtoJSONDecoder) More() bool
func (*ProtoJSONDecoder) UnmarshalNext ¶
func (d *ProtoJSONDecoder) UnmarshalNext(dst proto.Message) error
Click to show internal directories.
Click to hide internal directories.