Documentation ¶
Overview ¶
Package pbtypes contains protocol buffer types (Timestamp, Void, etc.) and related helpers.
Package pbtypes is a generated protocol buffer package. It is generated from these files: timestamp.proto void.proto html.proto It has these top-level messages: Timestamp Void HTML
Index ¶
- Variables
- type HTML
- type RawMessage
- type Timestamp
- func (m *Timestamp) Marshal() (data []byte, err error)
- func (t Timestamp) MarshalJSON() ([]byte, error)
- func (m *Timestamp) MarshalTo(data []byte) (int, error)
- func (*Timestamp) ProtoMessage()
- func (m *Timestamp) Reset()
- func (m *Timestamp) Size() (n int)
- func (m *Timestamp) String() string
- func (t Timestamp) Time() time.Time
- func (m *Timestamp) Unmarshal(data []byte) error
- func (t *Timestamp) UnmarshalJSON(data []byte) error
- type Void
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthHtml = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowHtml = fmt.Errorf("proto: integer overflow") )
var ( ErrInvalidLengthTimestamp = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTimestamp = fmt.Errorf("proto: integer overflow") )
var ( ErrInvalidLengthVoid = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowVoid = fmt.Errorf("proto: integer overflow") )
Functions ¶
This section is empty.
Types ¶
type HTML ¶
type HTML struct {
HTML string `protobuf:"bytes,1,opt,name=HTML,proto3" json:"__html"`
}
HTML is a type which marshals into {__html: "html code here"} to designate that this value is sanitized HTML code, see https://facebook.github.io/react/tips/dangerously-set-inner-html.html
func (*HTML) ProtoMessage ¶
func (*HTML) ProtoMessage()
type RawMessage ¶
type RawMessage []byte
RawMessage is a raw encoded JSON object. It implements json.Marshaler and json.Unmarshaler like json.RawMessage, but also proto.Marshaler and proto.Unmarshaler.
func (*RawMessage) Marshal ¶
func (m *RawMessage) Marshal() ([]byte, error)
Marshal implements proto.Marshaler.
func (*RawMessage) MarshalJSON ¶
func (m *RawMessage) MarshalJSON() ([]byte, error)
MarshalJSON returns *m as the JSON encoding of m.
func (*RawMessage) Unmarshal ¶
func (m *RawMessage) Unmarshal(data []byte) error
Unmarshal implements proto.Unmarshaler.
func (*RawMessage) UnmarshalJSON ¶
func (m *RawMessage) UnmarshalJSON(data []byte) error
UnmarshalJSON sets *m to a copy of data.
type Timestamp ¶
type Timestamp struct { // Represents seconds of UTC time since Unix epoch // 1970-01-01T00:00:00Z. Must be from from 0001-01-01T00:00:00Z to // 9999-12-31T23:59:59Z inclusive. Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"` // Non-negative fractions of a second at nanosecond resolution. Negative // second values with fractions must still have non-negative nanos values // that count forward in time. Must be from 0 to 999,999,999 // inclusive. Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"` }
func NewTimestamp ¶
NewTimestamp creates a new Timestamp from a time.Time.
func (Timestamp) MarshalJSON ¶
func (*Timestamp) ProtoMessage ¶
func (*Timestamp) ProtoMessage()
func (*Timestamp) UnmarshalJSON ¶
type Void ¶
type Void struct { }
Void is an empty type used as the protobuf RPC method arg or result for methods that take no parameters or yield no results, respectively.
func (*Void) ProtoMessage ¶
func (*Void) ProtoMessage()