Documentation ¶
Overview ¶
Package types contains code for interacting with well-known types.
Index ¶
- Variables
- func AnyMessageName(any *Any) (string, error)
- func DurationFromProto(p *Duration) (time.Duration, error)
- func EmptyAny(any *Any) (proto.Message, error)
- func Is(any *Any, pb proto.Message) bool
- func NewPopulatedStdBool(r randyWrappers, easy bool) *bool
- func NewPopulatedStdBytes(r randyWrappers, easy bool) *[]byte
- func NewPopulatedStdDouble(r randyWrappers, easy bool) *float64
- func NewPopulatedStdDuration(r interface{ ... }, easy bool) *time.Duration
- func NewPopulatedStdFloat(r randyWrappers, easy bool) *float32
- func NewPopulatedStdInt32(r randyWrappers, easy bool) *int32
- func NewPopulatedStdInt64(r randyWrappers, easy bool) *int64
- func NewPopulatedStdString(r randyWrappers, easy bool) *string
- func NewPopulatedStdTime(r interface{ ... }, easy bool) *time.Time
- func NewPopulatedStdUInt32(r randyWrappers, easy bool) *uint32
- func NewPopulatedStdUInt64(r randyWrappers, easy bool) *uint64
- func SizeOfStdBool(v bool) int
- func SizeOfStdBytes(v []byte) int
- func SizeOfStdDouble(v float64) int
- func SizeOfStdDuration(d time.Duration) int
- func SizeOfStdFloat(v float32) int
- func SizeOfStdInt32(v int32) int
- func SizeOfStdInt64(v int64) int
- func SizeOfStdString(v string) int
- func SizeOfStdTime(t time.Time) int
- func SizeOfStdUInt32(v uint32) int
- func SizeOfStdUInt64(v uint64) int
- func StdBoolMarshal(v bool) ([]byte, error)
- func StdBoolMarshalTo(v bool, data []byte) (int, error)
- func StdBoolUnmarshal(v *bool, data []byte) error
- func StdBytesMarshal(v []byte) ([]byte, error)
- func StdBytesMarshalTo(v []byte, data []byte) (int, error)
- func StdBytesUnmarshal(v *[]byte, data []byte) error
- func StdDoubleMarshal(v float64) ([]byte, error)
- func StdDoubleMarshalTo(v float64, data []byte) (int, error)
- func StdDoubleUnmarshal(v *float64, data []byte) error
- func StdDurationMarshal(d time.Duration) ([]byte, error)
- func StdDurationMarshalTo(d time.Duration, data []byte) (int, error)
- func StdDurationUnmarshal(d *time.Duration, data []byte) error
- func StdFloatMarshal(v float32) ([]byte, error)
- func StdFloatMarshalTo(v float32, data []byte) (int, error)
- func StdFloatUnmarshal(v *float32, data []byte) error
- func StdInt32Marshal(v int32) ([]byte, error)
- func StdInt32MarshalTo(v int32, data []byte) (int, error)
- func StdInt32Unmarshal(v *int32, data []byte) error
- func StdInt64Marshal(v int64) ([]byte, error)
- func StdInt64MarshalTo(v int64, data []byte) (int, error)
- func StdInt64Unmarshal(v *int64, data []byte) error
- func StdStringMarshal(v string) ([]byte, error)
- func StdStringMarshalTo(v string, data []byte) (int, error)
- func StdStringUnmarshal(v *string, data []byte) error
- func StdTimeMarshal(t time.Time) ([]byte, error)
- func StdTimeMarshalTo(t time.Time, data []byte) (int, error)
- func StdTimeUnmarshal(t *time.Time, data []byte) error
- func StdUInt32Marshal(v uint32) ([]byte, error)
- func StdUInt32MarshalTo(v uint32, data []byte) (int, error)
- func StdUInt32Unmarshal(v *uint32, data []byte) error
- func StdUInt64Marshal(v uint64) ([]byte, error)
- func StdUInt64MarshalTo(v uint64, data []byte) (int, error)
- func StdUInt64Unmarshal(v *uint64, data []byte) error
- func TimestampFromProto(ts *Timestamp) (time.Time, error)
- func TimestampString(ts *Timestamp) string
- func UnmarshalAny(any *Any, pb proto.Message) error
- type Any
- func (this *Any) Compare(that interface{}) int
- func (*Any) Descriptor() ([]byte, []int)
- func (this *Any) Equal(that interface{}) bool
- func (m *Any) GetTypeUrl() string
- func (m *Any) GetValue() []byte
- func (this *Any) GoString() string
- func (m *Any) Marshal() (dAtA []byte, err error)
- func (m *Any) MarshalTo(dAtA []byte) (int, error)
- func (m *Any) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Any) ProtoMessage()
- func (m *Any) ProtoSize() (n int)
- func (m *Any) Reset()
- func (m *Any) Size() (n int)
- func (this *Any) String() string
- func (m *Any) Unmarshal(dAtA []byte) error
- func (m *Any) XXX_DiscardUnknown()
- func (m *Any) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Any) XXX_Merge(src proto.Message)
- func (*Any) XXX_MessageName() string
- func (m *Any) XXX_Size() int
- func (m *Any) XXX_Unmarshal(b []byte) error
- func (*Any) XXX_WellKnownType() string
- type Api
- func (this *Api) Compare(that interface{}) int
- func (*Api) Descriptor() ([]byte, []int)
- func (this *Api) Equal(that interface{}) bool
- func (m *Api) GetMethods() []*Method
- func (m *Api) GetMixins() []*Mixin
- func (m *Api) GetName() string
- func (m *Api) GetOptions() []*Option
- func (m *Api) GetSourceContext() *SourceContext
- func (m *Api) GetSyntax() Syntax
- func (m *Api) GetVersion() string
- func (this *Api) GoString() string
- func (m *Api) Marshal() (dAtA []byte, err error)
- func (m *Api) MarshalTo(dAtA []byte) (int, error)
- func (m *Api) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Api) ProtoMessage()
- func (m *Api) ProtoSize() (n int)
- func (m *Api) Reset()
- func (m *Api) Size() (n int)
- func (this *Api) String() string
- func (m *Api) Unmarshal(dAtA []byte) error
- func (m *Api) XXX_DiscardUnknown()
- func (m *Api) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Api) XXX_Merge(src proto.Message)
- func (*Api) XXX_MessageName() string
- func (m *Api) XXX_Size() int
- func (m *Api) XXX_Unmarshal(b []byte) error
- type BoolValue
- func (this *BoolValue) Compare(that interface{}) int
- func (*BoolValue) Descriptor() ([]byte, []int)
- func (this *BoolValue) Equal(that interface{}) bool
- func (m *BoolValue) GetValue() bool
- func (this *BoolValue) GoString() string
- func (m *BoolValue) Marshal() (dAtA []byte, err error)
- func (m *BoolValue) MarshalTo(dAtA []byte) (int, error)
- func (m *BoolValue) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*BoolValue) ProtoMessage()
- func (m *BoolValue) ProtoSize() (n int)
- func (m *BoolValue) Reset()
- func (m *BoolValue) Size() (n int)
- func (this *BoolValue) String() string
- func (m *BoolValue) Unmarshal(dAtA []byte) error
- func (m *BoolValue) XXX_DiscardUnknown()
- func (m *BoolValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BoolValue) XXX_Merge(src proto.Message)
- func (*BoolValue) XXX_MessageName() string
- func (m *BoolValue) XXX_Size() int
- func (m *BoolValue) XXX_Unmarshal(b []byte) error
- func (*BoolValue) XXX_WellKnownType() string
- type BytesValue
- func (this *BytesValue) Compare(that interface{}) int
- func (*BytesValue) Descriptor() ([]byte, []int)
- func (this *BytesValue) Equal(that interface{}) bool
- func (m *BytesValue) GetValue() []byte
- func (this *BytesValue) GoString() string
- func (m *BytesValue) Marshal() (dAtA []byte, err error)
- func (m *BytesValue) MarshalTo(dAtA []byte) (int, error)
- func (m *BytesValue) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*BytesValue) ProtoMessage()
- func (m *BytesValue) ProtoSize() (n int)
- func (m *BytesValue) Reset()
- func (m *BytesValue) Size() (n int)
- func (this *BytesValue) String() string
- func (m *BytesValue) Unmarshal(dAtA []byte) error
- func (m *BytesValue) XXX_DiscardUnknown()
- func (m *BytesValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BytesValue) XXX_Merge(src proto.Message)
- func (*BytesValue) XXX_MessageName() string
- func (m *BytesValue) XXX_Size() int
- func (m *BytesValue) XXX_Unmarshal(b []byte) error
- func (*BytesValue) XXX_WellKnownType() string
- type DoubleValue
- func (this *DoubleValue) Compare(that interface{}) int
- func (*DoubleValue) Descriptor() ([]byte, []int)
- func (this *DoubleValue) Equal(that interface{}) bool
- func (m *DoubleValue) GetValue() float64
- func (this *DoubleValue) GoString() string
- func (m *DoubleValue) Marshal() (dAtA []byte, err error)
- func (m *DoubleValue) MarshalTo(dAtA []byte) (int, error)
- func (m *DoubleValue) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*DoubleValue) ProtoMessage()
- func (m *DoubleValue) ProtoSize() (n int)
- func (m *DoubleValue) Reset()
- func (m *DoubleValue) Size() (n int)
- func (this *DoubleValue) String() string
- func (m *DoubleValue) Unmarshal(dAtA []byte) error
- func (m *DoubleValue) XXX_DiscardUnknown()
- func (m *DoubleValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DoubleValue) XXX_Merge(src proto.Message)
- func (*DoubleValue) XXX_MessageName() string
- func (m *DoubleValue) XXX_Size() int
- func (m *DoubleValue) XXX_Unmarshal(b []byte) error
- func (*DoubleValue) XXX_WellKnownType() string
- type Duration
- func (this *Duration) Compare(that interface{}) int
- func (*Duration) Descriptor() ([]byte, []int)
- func (this *Duration) Equal(that interface{}) bool
- func (m *Duration) GetNanos() int32
- func (m *Duration) GetSeconds() int64
- func (this *Duration) GoString() string
- func (m *Duration) Marshal() (dAtA []byte, err error)
- func (m *Duration) MarshalTo(dAtA []byte) (int, error)
- func (m *Duration) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Duration) ProtoMessage()
- func (m *Duration) ProtoSize() (n int)
- func (m *Duration) Reset()
- func (m *Duration) Size() (n int)
- func (d *Duration) String() string
- func (m *Duration) Unmarshal(dAtA []byte) error
- func (m *Duration) XXX_DiscardUnknown()
- func (m *Duration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Duration) XXX_Merge(src proto.Message)
- func (*Duration) XXX_MessageName() string
- func (m *Duration) XXX_Size() int
- func (m *Duration) XXX_Unmarshal(b []byte) error
- func (*Duration) XXX_WellKnownType() string
- type DynamicAny
- type Empty
- func (this *Empty) Compare(that interface{}) int
- func (*Empty) Descriptor() ([]byte, []int)
- func (this *Empty) Equal(that interface{}) bool
- func (this *Empty) GoString() string
- func (m *Empty) Marshal() (dAtA []byte, err error)
- func (m *Empty) MarshalTo(dAtA []byte) (int, error)
- func (m *Empty) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Empty) ProtoMessage()
- func (m *Empty) ProtoSize() (n int)
- func (m *Empty) Reset()
- func (m *Empty) Size() (n int)
- func (this *Empty) String() string
- func (m *Empty) Unmarshal(dAtA []byte) error
- func (m *Empty) XXX_DiscardUnknown()
- func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Empty) XXX_Merge(src proto.Message)
- func (*Empty) XXX_MessageName() string
- func (m *Empty) XXX_Size() int
- func (m *Empty) XXX_Unmarshal(b []byte) error
- func (*Empty) XXX_WellKnownType() string
- type Enum
- func (this *Enum) Compare(that interface{}) int
- func (*Enum) Descriptor() ([]byte, []int)
- func (this *Enum) Equal(that interface{}) bool
- func (m *Enum) GetEnumvalue() []*EnumValue
- func (m *Enum) GetName() string
- func (m *Enum) GetOptions() []*Option
- func (m *Enum) GetSourceContext() *SourceContext
- func (m *Enum) GetSyntax() Syntax
- func (this *Enum) GoString() string
- func (m *Enum) Marshal() (dAtA []byte, err error)
- func (m *Enum) MarshalTo(dAtA []byte) (int, error)
- func (m *Enum) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Enum) ProtoMessage()
- func (m *Enum) ProtoSize() (n int)
- func (m *Enum) Reset()
- func (m *Enum) Size() (n int)
- func (this *Enum) String() string
- func (m *Enum) Unmarshal(dAtA []byte) error
- func (m *Enum) XXX_DiscardUnknown()
- func (m *Enum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Enum) XXX_Merge(src proto.Message)
- func (*Enum) XXX_MessageName() string
- func (m *Enum) XXX_Size() int
- func (m *Enum) XXX_Unmarshal(b []byte) error
- type EnumValue
- func (this *EnumValue) Compare(that interface{}) int
- func (*EnumValue) Descriptor() ([]byte, []int)
- func (this *EnumValue) Equal(that interface{}) bool
- func (m *EnumValue) GetName() string
- func (m *EnumValue) GetNumber() int32
- func (m *EnumValue) GetOptions() []*Option
- func (this *EnumValue) GoString() string
- func (m *EnumValue) Marshal() (dAtA []byte, err error)
- func (m *EnumValue) MarshalTo(dAtA []byte) (int, error)
- func (m *EnumValue) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*EnumValue) ProtoMessage()
- func (m *EnumValue) ProtoSize() (n int)
- func (m *EnumValue) Reset()
- func (m *EnumValue) Size() (n int)
- func (this *EnumValue) String() string
- func (m *EnumValue) Unmarshal(dAtA []byte) error
- func (m *EnumValue) XXX_DiscardUnknown()
- func (m *EnumValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EnumValue) XXX_Merge(src proto.Message)
- func (*EnumValue) XXX_MessageName() string
- func (m *EnumValue) XXX_Size() int
- func (m *EnumValue) XXX_Unmarshal(b []byte) error
- type Field
- func (this *Field) Compare(that interface{}) int
- func (*Field) Descriptor() ([]byte, []int)
- func (this *Field) Equal(that interface{}) bool
- func (m *Field) GetCardinality() Field_Cardinality
- func (m *Field) GetDefaultValue() string
- func (m *Field) GetJsonName() string
- func (m *Field) GetKind() Field_Kind
- func (m *Field) GetName() string
- func (m *Field) GetNumber() int32
- func (m *Field) GetOneofIndex() int32
- func (m *Field) GetOptions() []*Option
- func (m *Field) GetPacked() bool
- func (m *Field) GetTypeUrl() string
- func (this *Field) GoString() string
- func (m *Field) Marshal() (dAtA []byte, err error)
- func (m *Field) MarshalTo(dAtA []byte) (int, error)
- func (m *Field) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Field) ProtoMessage()
- func (m *Field) ProtoSize() (n int)
- func (m *Field) Reset()
- func (m *Field) Size() (n int)
- func (this *Field) String() string
- func (m *Field) Unmarshal(dAtA []byte) error
- func (m *Field) XXX_DiscardUnknown()
- func (m *Field) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Field) XXX_Merge(src proto.Message)
- func (*Field) XXX_MessageName() string
- func (m *Field) XXX_Size() int
- func (m *Field) XXX_Unmarshal(b []byte) error
- type FieldMask
- func (this *FieldMask) Compare(that interface{}) int
- func (*FieldMask) Descriptor() ([]byte, []int)
- func (this *FieldMask) Equal(that interface{}) bool
- func (m *FieldMask) GetPaths() []string
- func (this *FieldMask) GoString() string
- func (m *FieldMask) Marshal() (dAtA []byte, err error)
- func (m *FieldMask) MarshalTo(dAtA []byte) (int, error)
- func (m *FieldMask) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*FieldMask) ProtoMessage()
- func (m *FieldMask) ProtoSize() (n int)
- func (m *FieldMask) Reset()
- func (m *FieldMask) Size() (n int)
- func (this *FieldMask) String() string
- func (m *FieldMask) Unmarshal(dAtA []byte) error
- func (m *FieldMask) XXX_DiscardUnknown()
- func (m *FieldMask) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *FieldMask) XXX_Merge(src proto.Message)
- func (*FieldMask) XXX_MessageName() string
- func (m *FieldMask) XXX_Size() int
- func (m *FieldMask) XXX_Unmarshal(b []byte) error
- type Field_Cardinality
- type Field_Kind
- type FloatValue
- func (this *FloatValue) Compare(that interface{}) int
- func (*FloatValue) Descriptor() ([]byte, []int)
- func (this *FloatValue) Equal(that interface{}) bool
- func (m *FloatValue) GetValue() float32
- func (this *FloatValue) GoString() string
- func (m *FloatValue) Marshal() (dAtA []byte, err error)
- func (m *FloatValue) MarshalTo(dAtA []byte) (int, error)
- func (m *FloatValue) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*FloatValue) ProtoMessage()
- func (m *FloatValue) ProtoSize() (n int)
- func (m *FloatValue) Reset()
- func (m *FloatValue) Size() (n int)
- func (this *FloatValue) String() string
- func (m *FloatValue) Unmarshal(dAtA []byte) error
- func (m *FloatValue) XXX_DiscardUnknown()
- func (m *FloatValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *FloatValue) XXX_Merge(src proto.Message)
- func (*FloatValue) XXX_MessageName() string
- func (m *FloatValue) XXX_Size() int
- func (m *FloatValue) XXX_Unmarshal(b []byte) error
- func (*FloatValue) XXX_WellKnownType() string
- type Int32Value
- func (this *Int32Value) Compare(that interface{}) int
- func (*Int32Value) Descriptor() ([]byte, []int)
- func (this *Int32Value) Equal(that interface{}) bool
- func (m *Int32Value) GetValue() int32
- func (this *Int32Value) GoString() string
- func (m *Int32Value) Marshal() (dAtA []byte, err error)
- func (m *Int32Value) MarshalTo(dAtA []byte) (int, error)
- func (m *Int32Value) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Int32Value) ProtoMessage()
- func (m *Int32Value) ProtoSize() (n int)
- func (m *Int32Value) Reset()
- func (m *Int32Value) Size() (n int)
- func (this *Int32Value) String() string
- func (m *Int32Value) Unmarshal(dAtA []byte) error
- func (m *Int32Value) XXX_DiscardUnknown()
- func (m *Int32Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Int32Value) XXX_Merge(src proto.Message)
- func (*Int32Value) XXX_MessageName() string
- func (m *Int32Value) XXX_Size() int
- func (m *Int32Value) XXX_Unmarshal(b []byte) error
- func (*Int32Value) XXX_WellKnownType() string
- type Int64Value
- func (this *Int64Value) Compare(that interface{}) int
- func (*Int64Value) Descriptor() ([]byte, []int)
- func (this *Int64Value) Equal(that interface{}) bool
- func (m *Int64Value) GetValue() int64
- func (this *Int64Value) GoString() string
- func (m *Int64Value) Marshal() (dAtA []byte, err error)
- func (m *Int64Value) MarshalTo(dAtA []byte) (int, error)
- func (m *Int64Value) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Int64Value) ProtoMessage()
- func (m *Int64Value) ProtoSize() (n int)
- func (m *Int64Value) Reset()
- func (m *Int64Value) Size() (n int)
- func (this *Int64Value) String() string
- func (m *Int64Value) Unmarshal(dAtA []byte) error
- func (m *Int64Value) XXX_DiscardUnknown()
- func (m *Int64Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Int64Value) XXX_Merge(src proto.Message)
- func (*Int64Value) XXX_MessageName() string
- func (m *Int64Value) XXX_Size() int
- func (m *Int64Value) XXX_Unmarshal(b []byte) error
- func (*Int64Value) XXX_WellKnownType() string
- type ListValue
- func (this *ListValue) Compare(that interface{}) int
- func (*ListValue) Descriptor() ([]byte, []int)
- func (this *ListValue) Equal(that interface{}) bool
- func (m *ListValue) GetValues() []*Value
- func (this *ListValue) GoString() string
- func (m *ListValue) Marshal() (dAtA []byte, err error)
- func (m *ListValue) MarshalTo(dAtA []byte) (int, error)
- func (m *ListValue) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ListValue) ProtoMessage()
- func (m *ListValue) ProtoSize() (n int)
- func (m *ListValue) Reset()
- func (m *ListValue) Size() (n int)
- func (this *ListValue) String() string
- func (m *ListValue) Unmarshal(dAtA []byte) error
- func (m *ListValue) XXX_DiscardUnknown()
- func (m *ListValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ListValue) XXX_Merge(src proto.Message)
- func (*ListValue) XXX_MessageName() string
- func (m *ListValue) XXX_Size() int
- func (m *ListValue) XXX_Unmarshal(b []byte) error
- func (*ListValue) XXX_WellKnownType() string
- type Method
- func (this *Method) Compare(that interface{}) int
- func (*Method) Descriptor() ([]byte, []int)
- func (this *Method) Equal(that interface{}) bool
- func (m *Method) GetName() string
- func (m *Method) GetOptions() []*Option
- func (m *Method) GetRequestStreaming() bool
- func (m *Method) GetRequestTypeUrl() string
- func (m *Method) GetResponseStreaming() bool
- func (m *Method) GetResponseTypeUrl() string
- func (m *Method) GetSyntax() Syntax
- func (this *Method) GoString() string
- func (m *Method) Marshal() (dAtA []byte, err error)
- func (m *Method) MarshalTo(dAtA []byte) (int, error)
- func (m *Method) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Method) ProtoMessage()
- func (m *Method) ProtoSize() (n int)
- func (m *Method) Reset()
- func (m *Method) Size() (n int)
- func (this *Method) String() string
- func (m *Method) Unmarshal(dAtA []byte) error
- func (m *Method) XXX_DiscardUnknown()
- func (m *Method) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Method) XXX_Merge(src proto.Message)
- func (*Method) XXX_MessageName() string
- func (m *Method) XXX_Size() int
- func (m *Method) XXX_Unmarshal(b []byte) error
- type Mixin
- func (this *Mixin) Compare(that interface{}) int
- func (*Mixin) Descriptor() ([]byte, []int)
- func (this *Mixin) Equal(that interface{}) bool
- func (m *Mixin) GetName() string
- func (m *Mixin) GetRoot() string
- func (this *Mixin) GoString() string
- func (m *Mixin) Marshal() (dAtA []byte, err error)
- func (m *Mixin) MarshalTo(dAtA []byte) (int, error)
- func (m *Mixin) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Mixin) ProtoMessage()
- func (m *Mixin) ProtoSize() (n int)
- func (m *Mixin) Reset()
- func (m *Mixin) Size() (n int)
- func (this *Mixin) String() string
- func (m *Mixin) Unmarshal(dAtA []byte) error
- func (m *Mixin) XXX_DiscardUnknown()
- func (m *Mixin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Mixin) XXX_Merge(src proto.Message)
- func (*Mixin) XXX_MessageName() string
- func (m *Mixin) XXX_Size() int
- func (m *Mixin) XXX_Unmarshal(b []byte) error
- type NullValue
- type Option
- func (this *Option) Compare(that interface{}) int
- func (*Option) Descriptor() ([]byte, []int)
- func (this *Option) Equal(that interface{}) bool
- func (m *Option) GetName() string
- func (m *Option) GetValue() *Any
- func (this *Option) GoString() string
- func (m *Option) Marshal() (dAtA []byte, err error)
- func (m *Option) MarshalTo(dAtA []byte) (int, error)
- func (m *Option) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Option) ProtoMessage()
- func (m *Option) ProtoSize() (n int)
- func (m *Option) Reset()
- func (m *Option) Size() (n int)
- func (this *Option) String() string
- func (m *Option) Unmarshal(dAtA []byte) error
- func (m *Option) XXX_DiscardUnknown()
- func (m *Option) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Option) XXX_Merge(src proto.Message)
- func (*Option) XXX_MessageName() string
- func (m *Option) XXX_Size() int
- func (m *Option) XXX_Unmarshal(b []byte) error
- type SourceContext
- func (this *SourceContext) Compare(that interface{}) int
- func (*SourceContext) Descriptor() ([]byte, []int)
- func (this *SourceContext) Equal(that interface{}) bool
- func (m *SourceContext) GetFileName() string
- func (this *SourceContext) GoString() string
- func (m *SourceContext) Marshal() (dAtA []byte, err error)
- func (m *SourceContext) MarshalTo(dAtA []byte) (int, error)
- func (m *SourceContext) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SourceContext) ProtoMessage()
- func (m *SourceContext) ProtoSize() (n int)
- func (m *SourceContext) Reset()
- func (m *SourceContext) Size() (n int)
- func (this *SourceContext) String() string
- func (m *SourceContext) Unmarshal(dAtA []byte) error
- func (m *SourceContext) XXX_DiscardUnknown()
- func (m *SourceContext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SourceContext) XXX_Merge(src proto.Message)
- func (*SourceContext) XXX_MessageName() string
- func (m *SourceContext) XXX_Size() int
- func (m *SourceContext) XXX_Unmarshal(b []byte) error
- type StringValue
- func (this *StringValue) Compare(that interface{}) int
- func (*StringValue) Descriptor() ([]byte, []int)
- func (this *StringValue) Equal(that interface{}) bool
- func (m *StringValue) GetValue() string
- func (this *StringValue) GoString() string
- func (m *StringValue) Marshal() (dAtA []byte, err error)
- func (m *StringValue) MarshalTo(dAtA []byte) (int, error)
- func (m *StringValue) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*StringValue) ProtoMessage()
- func (m *StringValue) ProtoSize() (n int)
- func (m *StringValue) Reset()
- func (m *StringValue) Size() (n int)
- func (this *StringValue) String() string
- func (m *StringValue) Unmarshal(dAtA []byte) error
- func (m *StringValue) XXX_DiscardUnknown()
- func (m *StringValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StringValue) XXX_Merge(src proto.Message)
- func (*StringValue) XXX_MessageName() string
- func (m *StringValue) XXX_Size() int
- func (m *StringValue) XXX_Unmarshal(b []byte) error
- func (*StringValue) XXX_WellKnownType() string
- type Struct
- func (this *Struct) Compare(that interface{}) int
- func (*Struct) Descriptor() ([]byte, []int)
- func (this *Struct) Equal(that interface{}) bool
- func (m *Struct) GetFields() map[string]*Value
- func (this *Struct) GoString() string
- func (m *Struct) Marshal() (dAtA []byte, err error)
- func (m *Struct) MarshalTo(dAtA []byte) (int, error)
- func (m *Struct) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Struct) ProtoMessage()
- func (m *Struct) ProtoSize() (n int)
- func (m *Struct) Reset()
- func (m *Struct) Size() (n int)
- func (this *Struct) String() string
- func (m *Struct) Unmarshal(dAtA []byte) error
- func (m *Struct) XXX_DiscardUnknown()
- func (m *Struct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Struct) XXX_Merge(src proto.Message)
- func (*Struct) XXX_MessageName() string
- func (m *Struct) XXX_Size() int
- func (m *Struct) XXX_Unmarshal(b []byte) error
- func (*Struct) XXX_WellKnownType() string
- type Syntax
- type Timestamp
- func (this *Timestamp) Compare(that interface{}) int
- func (*Timestamp) Descriptor() ([]byte, []int)
- func (this *Timestamp) Equal(that interface{}) bool
- func (m *Timestamp) GetNanos() int32
- func (m *Timestamp) GetSeconds() int64
- func (this *Timestamp) GoString() string
- func (m *Timestamp) Marshal() (dAtA []byte, err error)
- func (m *Timestamp) MarshalTo(dAtA []byte) (int, error)
- func (m *Timestamp) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Timestamp) ProtoMessage()
- func (m *Timestamp) ProtoSize() (n int)
- func (m *Timestamp) Reset()
- func (m *Timestamp) Size() (n int)
- func (ts *Timestamp) String() string
- func (m *Timestamp) Unmarshal(dAtA []byte) error
- func (m *Timestamp) XXX_DiscardUnknown()
- func (m *Timestamp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Timestamp) XXX_Merge(src proto.Message)
- func (*Timestamp) XXX_MessageName() string
- func (m *Timestamp) XXX_Size() int
- func (m *Timestamp) XXX_Unmarshal(b []byte) error
- func (*Timestamp) XXX_WellKnownType() string
- type Type
- func (this *Type) Compare(that interface{}) int
- func (*Type) Descriptor() ([]byte, []int)
- func (this *Type) Equal(that interface{}) bool
- func (m *Type) GetFields() []*Field
- func (m *Type) GetName() string
- func (m *Type) GetOneofs() []string
- func (m *Type) GetOptions() []*Option
- func (m *Type) GetSourceContext() *SourceContext
- func (m *Type) GetSyntax() Syntax
- func (this *Type) GoString() string
- func (m *Type) Marshal() (dAtA []byte, err error)
- func (m *Type) MarshalTo(dAtA []byte) (int, error)
- func (m *Type) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Type) ProtoMessage()
- func (m *Type) ProtoSize() (n int)
- func (m *Type) Reset()
- func (m *Type) Size() (n int)
- func (this *Type) String() string
- func (m *Type) Unmarshal(dAtA []byte) error
- func (m *Type) XXX_DiscardUnknown()
- func (m *Type) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Type) XXX_Merge(src proto.Message)
- func (*Type) XXX_MessageName() string
- func (m *Type) XXX_Size() int
- func (m *Type) XXX_Unmarshal(b []byte) error
- type UInt32Value
- func (this *UInt32Value) Compare(that interface{}) int
- func (*UInt32Value) Descriptor() ([]byte, []int)
- func (this *UInt32Value) Equal(that interface{}) bool
- func (m *UInt32Value) GetValue() uint32
- func (this *UInt32Value) GoString() string
- func (m *UInt32Value) Marshal() (dAtA []byte, err error)
- func (m *UInt32Value) MarshalTo(dAtA []byte) (int, error)
- func (m *UInt32Value) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*UInt32Value) ProtoMessage()
- func (m *UInt32Value) ProtoSize() (n int)
- func (m *UInt32Value) Reset()
- func (m *UInt32Value) Size() (n int)
- func (this *UInt32Value) String() string
- func (m *UInt32Value) Unmarshal(dAtA []byte) error
- func (m *UInt32Value) XXX_DiscardUnknown()
- func (m *UInt32Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *UInt32Value) XXX_Merge(src proto.Message)
- func (*UInt32Value) XXX_MessageName() string
- func (m *UInt32Value) XXX_Size() int
- func (m *UInt32Value) XXX_Unmarshal(b []byte) error
- func (*UInt32Value) XXX_WellKnownType() string
- type UInt64Value
- func (this *UInt64Value) Compare(that interface{}) int
- func (*UInt64Value) Descriptor() ([]byte, []int)
- func (this *UInt64Value) Equal(that interface{}) bool
- func (m *UInt64Value) GetValue() uint64
- func (this *UInt64Value) GoString() string
- func (m *UInt64Value) Marshal() (dAtA []byte, err error)
- func (m *UInt64Value) MarshalTo(dAtA []byte) (int, error)
- func (m *UInt64Value) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*UInt64Value) ProtoMessage()
- func (m *UInt64Value) ProtoSize() (n int)
- func (m *UInt64Value) Reset()
- func (m *UInt64Value) Size() (n int)
- func (this *UInt64Value) String() string
- func (m *UInt64Value) Unmarshal(dAtA []byte) error
- func (m *UInt64Value) XXX_DiscardUnknown()
- func (m *UInt64Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *UInt64Value) XXX_Merge(src proto.Message)
- func (*UInt64Value) XXX_MessageName() string
- func (m *UInt64Value) XXX_Size() int
- func (m *UInt64Value) XXX_Unmarshal(b []byte) error
- func (*UInt64Value) XXX_WellKnownType() string
- type Value
- func (this *Value) Compare(that interface{}) int
- func (*Value) Descriptor() ([]byte, []int)
- func (this *Value) Equal(that interface{}) bool
- func (m *Value) GetBoolValue() bool
- func (m *Value) GetKind() isValue_Kind
- func (m *Value) GetListValue() *ListValue
- func (m *Value) GetNullValue() NullValue
- func (m *Value) GetNumberValue() float64
- func (m *Value) GetStringValue() string
- func (m *Value) GetStructValue() *Struct
- func (this *Value) GoString() string
- func (m *Value) Marshal() (dAtA []byte, err error)
- func (m *Value) MarshalTo(dAtA []byte) (int, error)
- func (m *Value) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Value) ProtoMessage()
- func (m *Value) ProtoSize() (n int)
- func (m *Value) Reset()
- func (m *Value) Size() (n int)
- func (this *Value) String() string
- func (m *Value) Unmarshal(dAtA []byte) error
- func (m *Value) XXX_DiscardUnknown()
- func (m *Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Value) XXX_Merge(src proto.Message)
- func (*Value) XXX_MessageName() string
- func (*Value) XXX_OneofWrappers() []interface{}
- func (m *Value) XXX_Size() int
- func (m *Value) XXX_Unmarshal(b []byte) error
- func (*Value) XXX_WellKnownType() string
- type Value_BoolValue
- func (this *Value_BoolValue) Compare(that interface{}) int
- func (this *Value_BoolValue) Equal(that interface{}) bool
- func (this *Value_BoolValue) GoString() string
- func (m *Value_BoolValue) MarshalTo(dAtA []byte) (int, error)
- func (m *Value_BoolValue) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (m *Value_BoolValue) ProtoSize() (n int)
- func (m *Value_BoolValue) Size() (n int)
- func (this *Value_BoolValue) String() string
- type Value_ListValue
- func (this *Value_ListValue) Compare(that interface{}) int
- func (this *Value_ListValue) Equal(that interface{}) bool
- func (this *Value_ListValue) GoString() string
- func (m *Value_ListValue) MarshalTo(dAtA []byte) (int, error)
- func (m *Value_ListValue) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (m *Value_ListValue) ProtoSize() (n int)
- func (m *Value_ListValue) Size() (n int)
- func (this *Value_ListValue) String() string
- type Value_NullValue
- func (this *Value_NullValue) Compare(that interface{}) int
- func (this *Value_NullValue) Equal(that interface{}) bool
- func (this *Value_NullValue) GoString() string
- func (m *Value_NullValue) MarshalTo(dAtA []byte) (int, error)
- func (m *Value_NullValue) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (m *Value_NullValue) ProtoSize() (n int)
- func (m *Value_NullValue) Size() (n int)
- func (this *Value_NullValue) String() string
- type Value_NumberValue
- func (this *Value_NumberValue) Compare(that interface{}) int
- func (this *Value_NumberValue) Equal(that interface{}) bool
- func (this *Value_NumberValue) GoString() string
- func (m *Value_NumberValue) MarshalTo(dAtA []byte) (int, error)
- func (m *Value_NumberValue) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (m *Value_NumberValue) ProtoSize() (n int)
- func (m *Value_NumberValue) Size() (n int)
- func (this *Value_NumberValue) String() string
- type Value_StringValue
- func (this *Value_StringValue) Compare(that interface{}) int
- func (this *Value_StringValue) Equal(that interface{}) bool
- func (this *Value_StringValue) GoString() string
- func (m *Value_StringValue) MarshalTo(dAtA []byte) (int, error)
- func (m *Value_StringValue) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (m *Value_StringValue) ProtoSize() (n int)
- func (m *Value_StringValue) Size() (n int)
- func (this *Value_StringValue) String() string
- type Value_StructValue
- func (this *Value_StructValue) Compare(that interface{}) int
- func (this *Value_StructValue) Equal(that interface{}) bool
- func (this *Value_StructValue) GoString() string
- func (m *Value_StructValue) MarshalTo(dAtA []byte) (int, error)
- func (m *Value_StructValue) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (m *Value_StructValue) ProtoSize() (n int)
- func (m *Value_StructValue) Size() (n int)
- func (this *Value_StructValue) String() string
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthAny = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowAny = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupAny = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthApi = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowApi = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupApi = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthDuration = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowDuration = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupDuration = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthEmpty = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowEmpty = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupEmpty = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthFieldMask = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowFieldMask = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupFieldMask = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthSourceContext = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowSourceContext = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupSourceContext = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthStruct = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowStruct = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupStruct = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthTimestamp = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTimestamp = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTimestamp = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthType = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowType = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupType = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthWrappers = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowWrappers = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupWrappers = fmt.Errorf("proto: unexpected end of group") )
var Field_Cardinality_name = map[int32]string{
0: "CARDINALITY_UNKNOWN",
1: "CARDINALITY_OPTIONAL",
2: "CARDINALITY_REQUIRED",
3: "CARDINALITY_REPEATED",
}
var Field_Cardinality_value = map[string]int32{
"CARDINALITY_UNKNOWN": 0,
"CARDINALITY_OPTIONAL": 1,
"CARDINALITY_REQUIRED": 2,
"CARDINALITY_REPEATED": 3,
}
var Field_Kind_name = map[int32]string{
0: "TYPE_UNKNOWN",
1: "TYPE_DOUBLE",
2: "TYPE_FLOAT",
3: "TYPE_INT64",
4: "TYPE_UINT64",
5: "TYPE_INT32",
6: "TYPE_FIXED64",
7: "TYPE_FIXED32",
8: "TYPE_BOOL",
9: "TYPE_STRING",
10: "TYPE_GROUP",
11: "TYPE_MESSAGE",
12: "TYPE_BYTES",
13: "TYPE_UINT32",
14: "TYPE_ENUM",
15: "TYPE_SFIXED32",
16: "TYPE_SFIXED64",
17: "TYPE_SINT32",
18: "TYPE_SINT64",
}
var Field_Kind_value = map[string]int32{
"TYPE_UNKNOWN": 0,
"TYPE_DOUBLE": 1,
"TYPE_FLOAT": 2,
"TYPE_INT64": 3,
"TYPE_UINT64": 4,
"TYPE_INT32": 5,
"TYPE_FIXED64": 6,
"TYPE_FIXED32": 7,
"TYPE_BOOL": 8,
"TYPE_STRING": 9,
"TYPE_GROUP": 10,
"TYPE_MESSAGE": 11,
"TYPE_BYTES": 12,
"TYPE_UINT32": 13,
"TYPE_ENUM": 14,
"TYPE_SFIXED32": 15,
"TYPE_SFIXED64": 16,
"TYPE_SINT32": 17,
"TYPE_SINT64": 18,
}
var NullValue_name = map[int32]string{
0: "NULL_VALUE",
}
var NullValue_value = map[string]int32{
"NULL_VALUE": 0,
}
var Syntax_name = map[int32]string{
0: "SYNTAX_PROTO2",
1: "SYNTAX_PROTO3",
}
var Syntax_value = map[string]int32{
"SYNTAX_PROTO2": 0,
"SYNTAX_PROTO3": 1,
}
Functions ¶
func AnyMessageName ¶
AnyMessageName returns the name of the message contained in a google.protobuf.Any message.
Note that regular type assertions should be done using the Is function. AnyMessageName is provided for less common use cases like filtering a sequence of Any messages based on a set of allowed message type names.
func DurationFromProto ¶
DurationFromProto converts a Duration to a time.Duration. DurationFromProto returns an error if the Duration is invalid or is too large to be represented in a time.Duration.
func EmptyAny ¶
Empty returns a new proto.Message of the type specified in a google.protobuf.Any message. It returns an error if corresponding message type isn't linked in.
func NewPopulatedStdBool ¶ added in v1.2.0
func NewPopulatedStdBytes ¶ added in v1.2.0
func NewPopulatedStdDouble ¶ added in v1.2.0
func NewPopulatedStdDuration ¶
func NewPopulatedStdFloat ¶ added in v1.2.0
func NewPopulatedStdInt32 ¶ added in v1.2.0
func NewPopulatedStdInt64 ¶ added in v1.2.0
func NewPopulatedStdString ¶ added in v1.2.0
func NewPopulatedStdTime ¶
func NewPopulatedStdUInt32 ¶ added in v1.2.0
func NewPopulatedStdUInt64 ¶ added in v1.2.0
func SizeOfStdBool ¶ added in v1.2.0
func SizeOfStdBytes ¶ added in v1.2.0
func SizeOfStdDouble ¶ added in v1.2.0
func SizeOfStdDuration ¶
func SizeOfStdFloat ¶ added in v1.2.0
func SizeOfStdInt32 ¶ added in v1.2.0
func SizeOfStdInt64 ¶ added in v1.2.0
func SizeOfStdString ¶ added in v1.2.0
func SizeOfStdTime ¶
func SizeOfStdUInt32 ¶ added in v1.2.0
func SizeOfStdUInt64 ¶ added in v1.2.0
func StdBoolMarshal ¶ added in v1.2.0
func StdBoolUnmarshal ¶ added in v1.2.0
func StdBytesMarshal ¶ added in v1.2.0
func StdBytesUnmarshal ¶ added in v1.2.0
func StdDoubleMarshal ¶ added in v1.2.0
func StdDoubleMarshalTo ¶ added in v1.2.0
func StdDoubleUnmarshal ¶ added in v1.2.0
func StdFloatMarshal ¶ added in v1.2.0
func StdFloatMarshalTo ¶ added in v1.2.0
func StdFloatUnmarshal ¶ added in v1.2.0
func StdInt32Marshal ¶ added in v1.2.0
func StdInt32Unmarshal ¶ added in v1.2.0
func StdInt64Marshal ¶ added in v1.2.0
func StdInt64Unmarshal ¶ added in v1.2.0
func StdStringMarshal ¶ added in v1.2.0
func StdStringMarshalTo ¶ added in v1.2.0
func StdStringUnmarshal ¶ added in v1.2.0
func StdUInt32Marshal ¶ added in v1.2.0
func StdUInt32MarshalTo ¶ added in v1.2.0
func StdUInt32Unmarshal ¶ added in v1.2.0
func StdUInt64Marshal ¶ added in v1.2.0
func StdUInt64MarshalTo ¶ added in v1.2.0
func StdUInt64Unmarshal ¶ added in v1.2.0
func TimestampFromProto ¶
TimestampFromProto converts a google.protobuf.Timestamp proto to a time.Time. It returns an error if the argument is invalid.
Unlike most Go functions, if Timestamp returns an error, the first return value is not the zero time.Time. Instead, it is the value obtained from the time.Unix function when passed the contents of the Timestamp, in the UTC locale. This may or may not be a meaningful time; many invalid Timestamps do map to valid time.Times.
A nil Timestamp returns an error. The first return value in that case is undefined.
func TimestampString ¶
TimestampString returns the RFC 3339 string for valid Timestamps. For invalid Timestamps, it returns an error message in parentheses.
func UnmarshalAny ¶
UnmarshalAny parses the protocol buffer representation in a google.protobuf.Any message and places the decoded result in pb. It returns an error if type of contents of Any message does not match type of pb message.
pb can be a proto.Message, or a *DynamicAny.
Types ¶
type Any ¶
type Any struct { // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent // the fully qualified name of the type (as in // `path/google.protobuf.Duration`). The name should be in a canonical form // (e.g., leading "." is not accepted). // // In practice, teams usually precompile into the binary all types that they // expect it to use in the context of Any. However, for URLs which use the // scheme `http`, `https`, or no scheme, one can optionally set up a type // server that maps type URLs to message definitions as follows: // // * If no scheme is provided, `https` is assumed. // * An HTTP GET on the URL must yield a [google.protobuf.Type][] // value in binary format, or produce an error. // * Applications are allowed to cache lookup results based on the // URL, or have them precompiled into a binary to avoid any // lookup. Therefore, binary compatibility needs to be preserved // on changes to types. (Use versioned type names to manage // breaking changes.) // // Note: this functionality is not currently available in the official // protobuf release, and it is not used for type URLs beginning with // type.googleapis.com. // // Schemes other than `http`, `https` (or the empty scheme) might be // used with implementation specific semantics. // TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty" pg:"type_url"` // Must be a valid serialized protocol buffer of the above specified type. Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty" pg:"value"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` }
`Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message.
Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
Example 1: Pack and unpack a message in C++.
Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... }
Example 2: Pack and unpack a message in Java.
Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := ptypes.MarshalAny(foo) ... foo := &pb.Foo{} if err := ptypes.UnmarshalAny(any, foo); err != nil { ... }
The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z".
JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example:
package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": <string>, "lastName": <string> }
If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]):
{ "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" }
func MarshalAny ¶
MarshalAny takes the protocol buffer and encodes it into google.protobuf.Any.
func NewPopulatedAny ¶
func (*Any) Descriptor ¶
func (*Any) GetTypeUrl ¶
func (*Any) MarshalToSizedBuffer ¶ added in v1.4.0
func (*Any) ProtoMessage ¶
func (*Any) ProtoMessage()
func (*Any) XXX_DiscardUnknown ¶ added in v1.1.0
func (m *Any) XXX_DiscardUnknown()
func (*Any) XXX_Marshal ¶ added in v1.1.0
func (*Any) XXX_MessageName ¶ added in v1.1.0
func (*Any) XXX_Unmarshal ¶ added in v1.1.0
func (*Any) XXX_WellKnownType ¶
type Api ¶ added in v1.1.0
type Api struct { // The fully qualified name of this interface, including package name // followed by the interface's simple name. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty" pg:"name"` // The methods of this interface, in unspecified order. Methods []*Method `protobuf:"bytes,2,rep,name=methods,proto3" json:"methods,omitempty" pg:"methods"` // Any metadata attached to the interface. Options []*Option `protobuf:"bytes,3,rep,name=options,proto3" json:"options,omitempty" pg:"options"` // A version string for this interface. If specified, must have the form // `major-version.minor-version`, as in `1.10`. If the minor version is // omitted, it defaults to zero. If the entire version field is empty, the // major version is derived from the package name, as outlined below. If the // field is not empty, the version in the package name will be verified to be // consistent with what is provided here. // // The versioning schema uses [semantic // versioning](http://semver.org) where the major version number // indicates a breaking change and the minor version an additive, // non-breaking change. Both version numbers are signals to users // what to expect from different versions, and should be carefully // chosen based on the product plan. // // The major version is also reflected in the package name of the // interface, which must end in `v<major-version>`, as in // `google.feature.v1`. For major versions 0 and 1, the suffix can // be omitted. Zero major versions must only be used for // experimental, non-GA interfaces. // // Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty" pg:"version"` // Source context for the protocol buffer service represented by this // message. SourceContext *SourceContext `protobuf:"bytes,5,opt,name=source_context,json=sourceContext,proto3" json:"source_context,omitempty" pg:"source_context"` // Included interfaces. See [Mixin][]. Mixins []*Mixin `protobuf:"bytes,6,rep,name=mixins,proto3" json:"mixins,omitempty" pg:"mixins"` // The source syntax of the service. Syntax Syntax `protobuf:"varint,7,opt,name=syntax,proto3,enum=google.protobuf.Syntax" json:"syntax,omitempty" pg:"syntax"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` }
Api is a light-weight descriptor for an API Interface.
Interfaces are also described as "protocol buffer services" in some contexts, such as by the "service" keyword in a .proto file, but they are different from API Services, which represent a concrete implementation of an interface as opposed to simply a description of methods and bindings. They are also sometimes simply referred to as "APIs" in other contexts, such as the name of this message itself. See https://cloud.google.com/apis/design/glossary for detailed terminology.
func NewPopulatedApi ¶ added in v1.1.0
func (*Api) Descriptor ¶ added in v1.1.0
func (*Api) GetMethods ¶ added in v1.1.0
func (*Api) GetOptions ¶ added in v1.1.0
func (*Api) GetSourceContext ¶ added in v1.1.0
func (m *Api) GetSourceContext() *SourceContext
func (*Api) GetVersion ¶ added in v1.1.0
func (*Api) MarshalToSizedBuffer ¶ added in v1.4.0
func (*Api) ProtoMessage ¶ added in v1.1.0
func (*Api) ProtoMessage()
func (*Api) XXX_DiscardUnknown ¶ added in v1.1.0
func (m *Api) XXX_DiscardUnknown()
func (*Api) XXX_Marshal ¶ added in v1.1.0
func (*Api) XXX_MessageName ¶ added in v1.1.0
func (*Api) XXX_Unmarshal ¶ added in v1.1.0
type BoolValue ¶
type BoolValue struct { // The bool value. Value bool `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty" pg:"value"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` }
Wrapper message for `bool`.
The JSON representation for `BoolValue` is JSON `true` and `false`.
func NewPopulatedBoolValue ¶
func (*BoolValue) Descriptor ¶
func (*BoolValue) MarshalToSizedBuffer ¶ added in v1.4.0
func (*BoolValue) ProtoMessage ¶
func (*BoolValue) ProtoMessage()
func (*BoolValue) XXX_DiscardUnknown ¶ added in v1.1.0
func (m *BoolValue) XXX_DiscardUnknown()
func (*BoolValue) XXX_Marshal ¶ added in v1.1.0
func (*BoolValue) XXX_MessageName ¶ added in v1.1.0
func (*BoolValue) XXX_Unmarshal ¶ added in v1.1.0
func (*BoolValue) XXX_WellKnownType ¶
type BytesValue ¶
type BytesValue struct { // The bytes value. Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty" pg:"value"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` }
Wrapper message for `bytes`.
The JSON representation for `BytesValue` is JSON string.
func NewPopulatedBytesValue ¶
func NewPopulatedBytesValue(r randyWrappers, easy bool) *BytesValue
func (*BytesValue) Compare ¶
func (this *BytesValue) Compare(that interface{}) int
func (*BytesValue) Descriptor ¶
func (*BytesValue) Descriptor() ([]byte, []int)
func (*BytesValue) Equal ¶
func (this *BytesValue) Equal(that interface{}) bool
func (*BytesValue) GetValue ¶
func (m *BytesValue) GetValue() []byte
func (*BytesValue) GoString ¶
func (this *BytesValue) GoString() string
func (*BytesValue) Marshal ¶
func (m *BytesValue) Marshal() (dAtA []byte, err error)
func (*BytesValue) MarshalToSizedBuffer ¶ added in v1.4.0
func (m *BytesValue) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*BytesValue) ProtoMessage ¶
func (*BytesValue) ProtoMessage()
func (*BytesValue) ProtoSize ¶ added in v1.2.0
func (m *BytesValue) ProtoSize() (n int)
func (*BytesValue) Reset ¶
func (m *BytesValue) Reset()
func (*BytesValue) Size ¶
func (m *BytesValue) Size() (n int)
func (*BytesValue) String ¶
func (this *BytesValue) String() string
func (*BytesValue) Unmarshal ¶
func (m *BytesValue) Unmarshal(dAtA []byte) error
func (*BytesValue) XXX_DiscardUnknown ¶ added in v1.1.0
func (m *BytesValue) XXX_DiscardUnknown()
func (*BytesValue) XXX_Marshal ¶ added in v1.1.0
func (m *BytesValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BytesValue) XXX_Merge ¶ added in v1.1.0
func (m *BytesValue) XXX_Merge(src proto.Message)
func (*BytesValue) XXX_MessageName ¶ added in v1.1.0
func (*BytesValue) XXX_MessageName() string
func (*BytesValue) XXX_Size ¶ added in v1.1.0
func (m *BytesValue) XXX_Size() int
func (*BytesValue) XXX_Unmarshal ¶ added in v1.1.0
func (m *BytesValue) XXX_Unmarshal(b []byte) error
func (*BytesValue) XXX_WellKnownType ¶
func (*BytesValue) XXX_WellKnownType() string
type DoubleValue ¶
type DoubleValue struct { // The double value. Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty" pg:"value"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` }
Wrapper message for `double`.
The JSON representation for `DoubleValue` is JSON number.
func NewPopulatedDoubleValue ¶
func NewPopulatedDoubleValue(r randyWrappers, easy bool) *DoubleValue
func (*DoubleValue) Compare ¶
func (this *DoubleValue) Compare(that interface{}) int
func (*DoubleValue) Descriptor ¶
func (*DoubleValue) Descriptor() ([]byte, []int)
func (*DoubleValue) Equal ¶
func (this *DoubleValue) Equal(that interface{}) bool
func (*DoubleValue) GetValue ¶
func (m *DoubleValue) GetValue() float64
func (*DoubleValue) GoString ¶
func (this *DoubleValue) GoString() string
func (*DoubleValue) Marshal ¶
func (m *DoubleValue) Marshal() (dAtA []byte, err error)
func (*DoubleValue) MarshalToSizedBuffer ¶ added in v1.4.0
func (m *DoubleValue) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*DoubleValue) ProtoMessage ¶
func (*DoubleValue) ProtoMessage()
func (*DoubleValue) ProtoSize ¶ added in v1.2.0
func (m *DoubleValue) ProtoSize() (n int)
func (*DoubleValue) Reset ¶
func (m *DoubleValue) Reset()
func (*DoubleValue) Size ¶
func (m *DoubleValue) Size() (n int)
func (*DoubleValue) String ¶
func (this *DoubleValue) String() string
func (*DoubleValue) Unmarshal ¶
func (m *DoubleValue) Unmarshal(dAtA []byte) error
func (*DoubleValue) XXX_DiscardUnknown ¶ added in v1.1.0
func (m *DoubleValue) XXX_DiscardUnknown()
func (*DoubleValue) XXX_Marshal ¶ added in v1.1.0
func (m *DoubleValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DoubleValue) XXX_Merge ¶ added in v1.1.0
func (m *DoubleValue) XXX_Merge(src proto.Message)
func (*DoubleValue) XXX_MessageName ¶ added in v1.1.0
func (*DoubleValue) XXX_MessageName() string
func (*DoubleValue) XXX_Size ¶ added in v1.1.0
func (m *DoubleValue) XXX_Size() int
func (*DoubleValue) XXX_Unmarshal ¶ added in v1.1.0
func (m *DoubleValue) XXX_Unmarshal(b []byte) error
func (*DoubleValue) XXX_WellKnownType ¶
func (*DoubleValue) XXX_WellKnownType() string
type Duration ¶
type Duration struct { // Signed seconds of the span of time. Must be from -315,576,000,000 // to +315,576,000,000 inclusive. Note: these bounds are computed from: // 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty" pg:"seconds"` // Signed fractions of a second at nanosecond resolution of the span // of time. Durations less than one second are represented with a 0 // `seconds` field and a positive or negative `nanos` field. For durations // of one second or more, a non-zero value for the `nanos` field must be // of the same sign as the `seconds` field. Must be from -999,999,999 // to +999,999,999 inclusive. Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty" pg:"nanos"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` }
A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years.
Examples ¶
Example 1: Compute Duration from two Timestamps in pseudo code.
Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (durations.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; }
Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; }
Example 3: Compute Duration from datetime.timedelta in Python.
td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td)
JSON Mapping ¶
In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix "s" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should be expressed in JSON format as "3.000000001s", and 3 seconds and 1 microsecond should be expressed in JSON format as "3.000001s".
func DurationProto ¶
DurationProto converts a time.Duration to a Duration.
func NewPopulatedDuration ¶
func (*Duration) Descriptor ¶
func (*Duration) GetSeconds ¶
func (*Duration) MarshalToSizedBuffer ¶ added in v1.4.0
func (*Duration) ProtoMessage ¶
func (*Duration) ProtoMessage()
func (*Duration) XXX_DiscardUnknown ¶ added in v1.1.0
func (m *Duration) XXX_DiscardUnknown()
func (*Duration) XXX_Marshal ¶ added in v1.1.0
func (*Duration) XXX_MessageName ¶ added in v1.1.0
func (*Duration) XXX_Unmarshal ¶ added in v1.1.0
func (*Duration) XXX_WellKnownType ¶
type DynamicAny ¶
DynamicAny is a value that can be passed to UnmarshalAny to automatically allocate a proto.Message for the type specified in a google.protobuf.Any message. The allocated message is stored in the embedded proto.Message.
Example:
var x ptypes.DynamicAny if err := ptypes.UnmarshalAny(a, &x); err != nil { ... } fmt.Printf("unmarshaled message: %v", x.Message)
type Empty ¶
type Empty struct { XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` }
A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance:
service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
The JSON representation for `Empty` is empty JSON object `{}`.
func NewPopulatedEmpty ¶
func (*Empty) Descriptor ¶
func (*Empty) MarshalToSizedBuffer ¶ added in v1.4.0
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) XXX_DiscardUnknown ¶ added in v1.1.0
func (m *Empty) XXX_DiscardUnknown()
func (*Empty) XXX_Marshal ¶ added in v1.1.0
func (*Empty) XXX_MessageName ¶ added in v1.1.0
func (*Empty) XXX_Unmarshal ¶ added in v1.1.0
func (*Empty) XXX_WellKnownType ¶
type Enum ¶ added in v1.1.0
type Enum struct { // Enum type name. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty" pg:"name"` // Enum value definitions. Enumvalue []*EnumValue `protobuf:"bytes,2,rep,name=enumvalue,proto3" json:"enumvalue,omitempty" pg:"enumvalue"` // Protocol buffer options. Options []*Option `protobuf:"bytes,3,rep,name=options,proto3" json:"options,omitempty" pg:"options"` // The source context. SourceContext *SourceContext `protobuf:"bytes,4,opt,name=source_context,json=sourceContext,proto3" json:"source_context,omitempty" pg:"source_context"` // The source syntax. Syntax Syntax `protobuf:"varint,5,opt,name=syntax,proto3,enum=google.protobuf.Syntax" json:"syntax,omitempty" pg:"syntax"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` }
Enum type definition.
func NewPopulatedEnum ¶ added in v1.1.0
func (*Enum) Descriptor ¶ added in v1.1.0
func (*Enum) GetEnumvalue ¶ added in v1.1.0
func (*Enum) GetOptions ¶ added in v1.1.0
func (*Enum) GetSourceContext ¶ added in v1.1.0
func (m *Enum) GetSourceContext() *SourceContext
func (*Enum) MarshalToSizedBuffer ¶ added in v1.4.0
func (*Enum) ProtoMessage ¶ added in v1.1.0
func (*Enum) ProtoMessage()
func (*Enum) XXX_DiscardUnknown ¶ added in v1.1.0
func (m *Enum) XXX_DiscardUnknown()
func (*Enum) XXX_Marshal ¶ added in v1.1.0
func (*Enum) XXX_MessageName ¶ added in v1.1.0
func (*Enum) XXX_Unmarshal ¶ added in v1.1.0
type EnumValue ¶ added in v1.1.0
type EnumValue struct { // Enum value name. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty" pg:"name"` // Enum value number. Number int32 `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty" pg:"number"` // Protocol buffer options. Options []*Option `protobuf:"bytes,3,rep,name=options,proto3" json:"options,omitempty" pg:"options"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` }
Enum value definition.
func NewPopulatedEnumValue ¶ added in v1.1.0
func (*EnumValue) Descriptor ¶ added in v1.1.0
func (*EnumValue) GetOptions ¶ added in v1.1.0
func (*EnumValue) MarshalToSizedBuffer ¶ added in v1.4.0
func (*EnumValue) ProtoMessage ¶ added in v1.1.0
func (*EnumValue) ProtoMessage()
func (*EnumValue) XXX_DiscardUnknown ¶ added in v1.1.0
func (m *EnumValue) XXX_DiscardUnknown()
func (*EnumValue) XXX_Marshal ¶ added in v1.1.0
func (*EnumValue) XXX_MessageName ¶ added in v1.1.0
func (*EnumValue) XXX_Unmarshal ¶ added in v1.1.0
type Field ¶ added in v1.1.0
type Field struct { // The field type. Kind Field_Kind `protobuf:"varint,1,opt,name=kind,proto3,enum=google.protobuf.Field_Kind" json:"kind,omitempty" pg:"kind"` // The field cardinality. Cardinality Field_Cardinality `` /* 132-byte string literal not displayed */ // The field number. Number int32 `protobuf:"varint,3,opt,name=number,proto3" json:"number,omitempty" pg:"number"` // The field name. Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty" pg:"name"` // The field type URL, without the scheme, for message or enumeration // types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`. TypeUrl string `protobuf:"bytes,6,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty" pg:"type_url"` // The index of the field type in `Type.oneofs`, for message or enumeration // types. The first type has index 1; zero means the type is not in the list. OneofIndex int32 `protobuf:"varint,7,opt,name=oneof_index,json=oneofIndex,proto3" json:"oneof_index,omitempty" pg:"oneof_index"` // Whether to use alternative packed wire representation. Packed bool `protobuf:"varint,8,opt,name=packed,proto3" json:"packed,omitempty" pg:"packed"` // The protocol buffer options. Options []*Option `protobuf:"bytes,9,rep,name=options,proto3" json:"options,omitempty" pg:"options"` // The field JSON name. JsonName string `protobuf:"bytes,10,opt,name=json_name,json=jsonName,proto3" json:"json_name,omitempty" pg:"json_name"` // The string value of the default value of this field. Proto2 syntax only. DefaultValue string `protobuf:"bytes,11,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty" pg:"default_value"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` }
A single field of a message type.
func NewPopulatedField ¶ added in v1.1.0
func (*Field) Descriptor ¶ added in v1.1.0
func (*Field) GetCardinality ¶ added in v1.1.0
func (m *Field) GetCardinality() Field_Cardinality
func (*Field) GetDefaultValue ¶ added in v1.1.0
func (*Field) GetJsonName ¶ added in v1.1.0
func (*Field) GetKind ¶ added in v1.1.0
func (m *Field) GetKind() Field_Kind
func (*Field) GetOneofIndex ¶ added in v1.1.0
func (*Field) GetOptions ¶ added in v1.1.0
func (*Field) GetTypeUrl ¶ added in v1.1.0
func (*Field) MarshalToSizedBuffer ¶ added in v1.4.0
func (*Field) ProtoMessage ¶ added in v1.1.0
func (*Field) ProtoMessage()
func (*Field) XXX_DiscardUnknown ¶ added in v1.1.0
func (m *Field) XXX_DiscardUnknown()
func (*Field) XXX_Marshal ¶ added in v1.1.0
func (*Field) XXX_MessageName ¶ added in v1.1.0
func (*Field) XXX_Unmarshal ¶ added in v1.1.0
type FieldMask ¶
type FieldMask struct { // The set of field mask paths. Paths []string `protobuf:"bytes,1,rep,name=paths,proto3" json:"paths,omitempty" pg:"paths"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` }
`FieldMask` represents a set of symbolic field paths, for example:
paths: "f.a" paths: "f.b.d"
Here `f` represents a field in some root message, `a` and `b` fields in the message found in `f`, and `d` a field found in the message in `f.b`.
Field masks are used to specify a subset of fields that should be returned by a get operation or modified by an update operation. Field masks also have a custom JSON encoding (see below).
Field Masks in Projections ¶
When used in the context of a projection, a response message or sub-message is filtered by the API to only contain those fields as specified in the mask. For example, if the mask in the previous example is applied to a response message as follows:
f { a : 22 b { d : 1 x : 2 } y : 13 } z: 8
The result will not contain specific values for fields x,y and z (their value will be set to the default, and omitted in proto text output):
f { a : 22 b { d : 1 } }
A repeated field is not allowed except at the last position of a paths string.
If a FieldMask object is not present in a get operation, the operation applies to all fields (as if a FieldMask of all fields had been specified).
Note that a field mask does not necessarily apply to the top-level response message. In case of a REST get operation, the field mask applies directly to the response, but in case of a REST list operation, the mask instead applies to each individual message in the returned resource list. In case of a REST custom method, other definitions may be used. Where the mask applies will be clearly documented together with its declaration in the API. In any case, the effect on the returned resource/resources is required behavior for APIs.
Field Masks in Update Operations ¶
A field mask in update operations specifies which fields of the targeted resource are going to be updated. The API is required to only change the values of the fields as specified in the mask and leave the others untouched. If a resource is passed in to describe the updated values, the API ignores the values of all fields not covered by the mask.
If a repeated field is specified for an update operation, new values will be appended to the existing repeated field in the target resource. Note that a repeated field is only allowed in the last position of a `paths` string.
If a sub-message is specified in the last position of the field mask for an update operation, then new value will be merged into the existing sub-message in the target resource.
For example, given the target message:
f { b { d: 1 x: 2 } c: [1] }
And an update message:
f { b { d: 10 } c: [2] }
then if the field mask is:
paths: ["f.b", "f.c"]
then the result will be:
f { b { d: 10 x: 2 } c: [1, 2] }
An implementation may provide options to override this default behavior for repeated and message fields.
In order to reset a field's value to the default, the field must be in the mask and set to the default value in the provided resource. Hence, in order to reset all fields of a resource, provide a default instance of the resource and set all fields in the mask, or do not provide a mask as described below.
If a field mask is not present on update, the operation applies to all fields (as if a field mask of all fields has been specified). Note that in the presence of schema evolution, this may mean that fields the client does not know and has therefore not filled into the request will be reset to their default. If this is unwanted behavior, a specific service may require a client to always specify a field mask, producing an error if not.
As with get operations, the location of the resource which describes the updated values in the request message depends on the operation kind. In any case, the effect of the field mask is required to be honored by the API.
## Considerations for HTTP REST
The HTTP kind of an update operation which uses a field mask must be set to PATCH instead of PUT in order to satisfy HTTP semantics (PUT must only be used for full updates).
JSON Encoding of Field Masks ¶
In JSON, a field mask is encoded as a single string where paths are separated by a comma. Fields name in each path are converted to/from lower-camel naming conventions.
As an example, consider the following message declarations:
message Profile { User user = 1; Photo photo = 2; } message User { string display_name = 1; string address = 2; }
In proto a field mask for `Profile` may look as such:
mask { paths: "user.display_name" paths: "photo" }
In JSON, the same mask is represented as below:
{ mask: "user.displayName,photo" }
Field Masks and Oneof Fields ¶
Field masks treat fields in oneofs just as regular fields. Consider the following message:
message SampleMessage { oneof test_oneof { string name = 4; SubMessage sub_message = 9; } }
The field mask can be:
mask { paths: "name" }
Or:
mask { paths: "sub_message" }
Note that oneof type names ("test_oneof" in this case) cannot be used in paths.
## Field Mask Verification
The implementation of any API method which has a FieldMask type field in the request should verify the included field paths, and return an `INVALID_ARGUMENT` error if any path is duplicated or unmappable.
func NewPopulatedFieldMask ¶
func (*FieldMask) Descriptor ¶
func (*FieldMask) MarshalToSizedBuffer ¶ added in v1.4.0
func (*FieldMask) ProtoMessage ¶
func (*FieldMask) ProtoMessage()
func (*FieldMask) XXX_DiscardUnknown ¶ added in v1.1.0
func (m *FieldMask) XXX_DiscardUnknown()
func (*FieldMask) XXX_Marshal ¶ added in v1.1.0
func (*FieldMask) XXX_MessageName ¶ added in v1.1.0
func (*FieldMask) XXX_Unmarshal ¶ added in v1.1.0
type Field_Cardinality ¶ added in v1.1.0
type Field_Cardinality int32
Whether a field is optional, required, or repeated.
const ( // For fields with unknown cardinality. Field_CARDINALITY_UNKNOWN Field_Cardinality = 0 // For optional fields. Field_CARDINALITY_OPTIONAL Field_Cardinality = 1 // For required fields. Proto2 syntax only. Field_CARDINALITY_REQUIRED Field_Cardinality = 2 // For repeated fields. Field_CARDINALITY_REPEATED Field_Cardinality = 3 )
func (Field_Cardinality) EnumDescriptor ¶ added in v1.1.0
func (Field_Cardinality) EnumDescriptor() ([]byte, []int)
func (Field_Cardinality) String ¶ added in v1.1.0
func (x Field_Cardinality) String() string
type Field_Kind ¶ added in v1.1.0
type Field_Kind int32
Basic field types.
const ( // Field type unknown. Field_TYPE_UNKNOWN Field_Kind = 0 // Field type double. Field_TYPE_DOUBLE Field_Kind = 1 // Field type float. Field_TYPE_FLOAT Field_Kind = 2 // Field type int64. Field_TYPE_INT64 Field_Kind = 3 // Field type uint64. Field_TYPE_UINT64 Field_Kind = 4 // Field type int32. Field_TYPE_INT32 Field_Kind = 5 // Field type fixed64. Field_TYPE_FIXED64 Field_Kind = 6 // Field type fixed32. Field_TYPE_FIXED32 Field_Kind = 7 // Field type bool. Field_TYPE_BOOL Field_Kind = 8 // Field type string. Field_TYPE_STRING Field_Kind = 9 // Field type group. Proto2 syntax only, and deprecated. Field_TYPE_GROUP Field_Kind = 10 // Field type message. Field_TYPE_MESSAGE Field_Kind = 11 // Field type bytes. Field_TYPE_BYTES Field_Kind = 12 // Field type uint32. Field_TYPE_UINT32 Field_Kind = 13 // Field type enum. Field_TYPE_ENUM Field_Kind = 14 // Field type sfixed32. Field_TYPE_SFIXED32 Field_Kind = 15 // Field type sfixed64. Field_TYPE_SFIXED64 Field_Kind = 16 // Field type sint32. Field_TYPE_SINT32 Field_Kind = 17 // Field type sint64. Field_TYPE_SINT64 Field_Kind = 18 )
func (Field_Kind) EnumDescriptor ¶ added in v1.1.0
func (Field_Kind) EnumDescriptor() ([]byte, []int)
func (Field_Kind) String ¶ added in v1.1.0
func (x Field_Kind) String() string
type FloatValue ¶
type FloatValue struct { // The float value. Value float32 `protobuf:"fixed32,1,opt,name=value,proto3" json:"value,omitempty" pg:"value"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` }
Wrapper message for `float`.
The JSON representation for `FloatValue` is JSON number.
func NewPopulatedFloatValue ¶
func NewPopulatedFloatValue(r randyWrappers, easy bool) *FloatValue
func (*FloatValue) Compare ¶
func (this *FloatValue) Compare(that interface{}) int
func (*FloatValue) Descriptor ¶
func (*FloatValue) Descriptor() ([]byte, []int)
func (*FloatValue) Equal ¶
func (this *FloatValue) Equal(that interface{}) bool
func (*FloatValue) GetValue ¶
func (m *FloatValue) GetValue() float32
func (*FloatValue) GoString ¶
func (this *FloatValue) GoString() string
func (*FloatValue) Marshal ¶
func (m *FloatValue) Marshal() (dAtA []byte, err error)
func (*FloatValue) MarshalToSizedBuffer ¶ added in v1.4.0
func (m *FloatValue) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*FloatValue) ProtoMessage ¶
func (*FloatValue) ProtoMessage()
func (*FloatValue) ProtoSize ¶ added in v1.2.0
func (m *FloatValue) ProtoSize() (n int)
func (*FloatValue) Reset ¶
func (m *FloatValue) Reset()
func (*FloatValue) Size ¶
func (m *FloatValue) Size() (n int)
func (*FloatValue) String ¶
func (this *FloatValue) String() string
func (*FloatValue) Unmarshal ¶
func (m *FloatValue) Unmarshal(dAtA []byte) error
func (*FloatValue) XXX_DiscardUnknown ¶ added in v1.1.0
func (m *FloatValue) XXX_DiscardUnknown()
func (*FloatValue) XXX_Marshal ¶ added in v1.1.0
func (m *FloatValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*FloatValue) XXX_Merge ¶ added in v1.1.0
func (m *FloatValue) XXX_Merge(src proto.Message)
func (*FloatValue) XXX_MessageName ¶ added in v1.1.0
func (*FloatValue) XXX_MessageName() string
func (*FloatValue) XXX_Size ¶ added in v1.1.0
func (m *FloatValue) XXX_Size() int
func (*FloatValue) XXX_Unmarshal ¶ added in v1.1.0
func (m *FloatValue) XXX_Unmarshal(b []byte) error
func (*FloatValue) XXX_WellKnownType ¶
func (*FloatValue) XXX_WellKnownType() string
type Int32Value ¶
type Int32Value struct { // The int32 value. Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty" pg:"value"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` }
Wrapper message for `int32`.
The JSON representation for `Int32Value` is JSON number.
func NewPopulatedInt32Value ¶
func NewPopulatedInt32Value(r randyWrappers, easy bool) *Int32Value
func (*Int32Value) Compare ¶
func (this *Int32Value) Compare(that interface{}) int
func (*Int32Value) Descriptor ¶
func (*Int32Value) Descriptor() ([]byte, []int)
func (*Int32Value) Equal ¶
func (this *Int32Value) Equal(that interface{}) bool
func (*Int32Value) GetValue ¶
func (m *Int32Value) GetValue() int32
func (*Int32Value) GoString ¶
func (this *Int32Value) GoString() string
func (*Int32Value) Marshal ¶
func (m *Int32Value) Marshal() (dAtA []byte, err error)
func (*Int32Value) MarshalToSizedBuffer ¶ added in v1.4.0
func (m *Int32Value) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Int32Value) ProtoMessage ¶
func (*Int32Value) ProtoMessage()
func (*Int32Value) ProtoSize ¶ added in v1.2.0
func (m *Int32Value) ProtoSize() (n int)
func (*Int32Value) Reset ¶
func (m *Int32Value) Reset()
func (*Int32Value) Size ¶
func (m *Int32Value) Size() (n int)
func (*Int32Value) String ¶
func (this *Int32Value) String() string
func (*Int32Value) Unmarshal ¶
func (m *Int32Value) Unmarshal(dAtA []byte) error
func (*Int32Value) XXX_DiscardUnknown ¶ added in v1.1.0
func (m *Int32Value) XXX_DiscardUnknown()
func (*Int32Value) XXX_Marshal ¶ added in v1.1.0
func (m *Int32Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Int32Value) XXX_Merge ¶ added in v1.1.0
func (m *Int32Value) XXX_Merge(src proto.Message)
func (*Int32Value) XXX_MessageName ¶ added in v1.1.0
func (*Int32Value) XXX_MessageName() string
func (*Int32Value) XXX_Size ¶ added in v1.1.0
func (m *Int32Value) XXX_Size() int
func (*Int32Value) XXX_Unmarshal ¶ added in v1.1.0
func (m *Int32Value) XXX_Unmarshal(b []byte) error
func (*Int32Value) XXX_WellKnownType ¶
func (*Int32Value) XXX_WellKnownType() string
type Int64Value ¶
type Int64Value struct { // The int64 value. Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty" pg:"value"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` }
Wrapper message for `int64`.
The JSON representation for `Int64Value` is JSON string.
func NewPopulatedInt64Value ¶
func NewPopulatedInt64Value(r randyWrappers, easy bool) *Int64Value
func (*Int64Value) Compare ¶
func (this *Int64Value) Compare(that interface{}) int
func (*Int64Value) Descriptor ¶
func (*Int64Value) Descriptor() ([]byte, []int)
func (*Int64Value) Equal ¶
func (this *Int64Value) Equal(that interface{}) bool
func (*Int64Value) GetValue ¶
func (m *Int64Value) GetValue() int64
func (*Int64Value) GoString ¶
func (this *Int64Value) GoString() string
func (*Int64Value) Marshal ¶
func (m *Int64Value) Marshal() (dAtA []byte, err error)
func (*Int64Value) MarshalToSizedBuffer ¶ added in v1.4.0
func (m *Int64Value) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Int64Value) ProtoMessage ¶
func (*Int64Value) ProtoMessage()
func (*Int64Value) ProtoSize ¶ added in v1.2.0
func (m *Int64Value) ProtoSize() (n int)
func (*Int64Value) Reset ¶
func (m *Int64Value) Reset()
func (*Int64Value) Size ¶
func (m *Int64Value) Size() (n int)
func (*Int64Value) String ¶
func (this *Int64Value) String() string
func (*Int64Value) Unmarshal ¶
func (m *Int64Value) Unmarshal(dAtA []byte) error
func (*Int64Value) XXX_DiscardUnknown ¶ added in v1.1.0
func (m *Int64Value) XXX_DiscardUnknown()
func (*Int64Value) XXX_Marshal ¶ added in v1.1.0
func (m *Int64Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Int64Value) XXX_Merge ¶ added in v1.1.0
func (m *Int64Value) XXX_Merge(src proto.Message)
func (*Int64Value) XXX_MessageName ¶ added in v1.1.0
func (*Int64Value) XXX_MessageName() string
func (*Int64Value) XXX_Size ¶ added in v1.1.0
func (m *Int64Value) XXX_Size() int
func (*Int64Value) XXX_Unmarshal ¶ added in v1.1.0
func (m *Int64Value) XXX_Unmarshal(b []byte) error
func (*Int64Value) XXX_WellKnownType ¶
func (*Int64Value) XXX_WellKnownType() string
type ListValue ¶
type ListValue struct { // Repeated field of dynamically typed values. Values []*Value `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty" pg:"values"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` }
`ListValue` is a wrapper around a repeated field of values.
The JSON representation for `ListValue` is JSON array.
func NewPopulatedListValue ¶
func (*ListValue) Descriptor ¶
func (*ListValue) MarshalToSizedBuffer ¶ added in v1.4.0
func (*ListValue) ProtoMessage ¶
func (*ListValue) ProtoMessage()
func (*ListValue) XXX_DiscardUnknown ¶ added in v1.1.0
func (m *ListValue) XXX_DiscardUnknown()
func (*ListValue) XXX_Marshal ¶ added in v1.1.0
func (*ListValue) XXX_MessageName ¶ added in v1.1.0
func (*ListValue) XXX_Unmarshal ¶ added in v1.1.0
func (*ListValue) XXX_WellKnownType ¶
type Method ¶ added in v1.1.0
type Method struct { // The simple name of this method. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty" pg:"name"` // A URL of the input message type. RequestTypeUrl string `` /* 127-byte string literal not displayed */ // If true, the request is streamed. RequestStreaming bool `` /* 133-byte string literal not displayed */ // The URL of the output message type. ResponseTypeUrl string `` /* 131-byte string literal not displayed */ // If true, the response is streamed. ResponseStreaming bool `` /* 137-byte string literal not displayed */ // Any metadata attached to the method. Options []*Option `protobuf:"bytes,6,rep,name=options,proto3" json:"options,omitempty" pg:"options"` // The source syntax of this method. Syntax Syntax `protobuf:"varint,7,opt,name=syntax,proto3,enum=google.protobuf.Syntax" json:"syntax,omitempty" pg:"syntax"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` }
Method represents a method of an API interface.
func NewPopulatedMethod ¶ added in v1.1.0
func (*Method) Descriptor ¶ added in v1.1.0
func (*Method) GetOptions ¶ added in v1.1.0
func (*Method) GetRequestStreaming ¶ added in v1.1.0
func (*Method) GetRequestTypeUrl ¶ added in v1.1.0
func (*Method) GetResponseStreaming ¶ added in v1.1.0
func (*Method) GetResponseTypeUrl ¶ added in v1.1.0
func (*Method) MarshalToSizedBuffer ¶ added in v1.4.0
func (*Method) ProtoMessage ¶ added in v1.1.0
func (*Method) ProtoMessage()
func (*Method) XXX_DiscardUnknown ¶ added in v1.1.0
func (m *Method) XXX_DiscardUnknown()
func (*Method) XXX_Marshal ¶ added in v1.1.0
func (*Method) XXX_MessageName ¶ added in v1.1.0
func (*Method) XXX_Unmarshal ¶ added in v1.1.0
type Mixin ¶ added in v1.1.0
type Mixin struct { // The fully qualified name of the interface which is included. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty" pg:"name"` // If non-empty specifies a path under which inherited HTTP paths // are rooted. Root string `protobuf:"bytes,2,opt,name=root,proto3" json:"root,omitempty" pg:"root"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` }
Declares an API Interface to be included in this interface. The including interface must redeclare all the methods from the included interface, but documentation and options are inherited as follows:
- If after comment and whitespace stripping, the documentation string of the redeclared method is empty, it will be inherited from the original method.
- Each annotation belonging to the service config (http, visibility) which is not set in the redeclared method will be inherited.
- If an http annotation is inherited, the path pattern will be modified as follows. Any version prefix will be replaced by the version of the including interface plus the [root][] path if specified.
Example of a simple mixin:
package google.acl.v1; service AccessControl { // Get the underlying ACL object. rpc GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get = "/v1/{resource=**}:getAcl"; } } package google.storage.v2; service Storage { rpc GetAcl(GetAclRequest) returns (Acl); // Get a data record. rpc GetData(GetDataRequest) returns (Data) { option (google.api.http).get = "/v2/{resource=**}"; } }
Example of a mixin configuration:
apis: - name: google.storage.v2.Storage mixins: - name: google.acl.v1.AccessControl
The mixin construct implies that all methods in `AccessControl` are also declared with same name and request/response types in `Storage`. A documentation generator or annotation processor will see the effective `Storage.GetAcl` method after inherting documentation and annotations as follows:
service Storage { // Get the underlying ACL object. rpc GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get = "/v2/{resource=**}:getAcl"; } ... }
Note how the version in the path pattern changed from `v1` to `v2`.
If the `root` field in the mixin is specified, it should be a relative path under which inherited HTTP paths are placed. Example:
apis: - name: google.storage.v2.Storage mixins: - name: google.acl.v1.AccessControl root: acls
This implies the following inherited HTTP annotation:
service Storage { // Get the underlying ACL object. rpc GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get = "/v2/acls/{resource=**}:getAcl"; } ... }
func NewPopulatedMixin ¶ added in v1.1.0
func (*Mixin) Descriptor ¶ added in v1.1.0
func (*Mixin) MarshalToSizedBuffer ¶ added in v1.4.0
func (*Mixin) ProtoMessage ¶ added in v1.1.0
func (*Mixin) ProtoMessage()
func (*Mixin) XXX_DiscardUnknown ¶ added in v1.1.0
func (m *Mixin) XXX_DiscardUnknown()
func (*Mixin) XXX_Marshal ¶ added in v1.1.0
func (*Mixin) XXX_MessageName ¶ added in v1.1.0
func (*Mixin) XXX_Unmarshal ¶ added in v1.1.0
type NullValue ¶
type NullValue int32
`NullValue` is a singleton enumeration to represent the null value for the `Value` type union.
The JSON representation for `NullValue` is JSON `null`.
const ( // Null value. NullValue_NULL_VALUE NullValue = 0 )
func (NullValue) EnumDescriptor ¶
func (NullValue) XXX_WellKnownType ¶
type Option ¶ added in v1.1.0
type Option struct { // The option's name. For protobuf built-in options (options defined in // descriptor.proto), this is the short name. For example, `"map_entry"`. // For custom options, it should be the fully-qualified name. For example, // `"google.api.http"`. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty" pg:"name"` // The option's value packed in an Any message. If the value is a primitive, // the corresponding wrapper type defined in google/protobuf/wrappers.proto // should be used. If the value is an enum, it should be stored as an int32 // value using the google.protobuf.Int32Value type. Value *Any `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty" pg:"value"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` }
A protocol buffer option, which can be attached to a message, field, enumeration, etc.
func NewPopulatedOption ¶ added in v1.1.0
func (*Option) Descriptor ¶ added in v1.1.0
func (*Option) MarshalToSizedBuffer ¶ added in v1.4.0
func (*Option) ProtoMessage ¶ added in v1.1.0
func (*Option) ProtoMessage()
func (*Option) XXX_DiscardUnknown ¶ added in v1.1.0
func (m *Option) XXX_DiscardUnknown()
func (*Option) XXX_Marshal ¶ added in v1.1.0
func (*Option) XXX_MessageName ¶ added in v1.1.0
func (*Option) XXX_Unmarshal ¶ added in v1.1.0
type SourceContext ¶ added in v1.1.0
type SourceContext struct { // The path-qualified name of the .proto file that contained the associated // protobuf element. For example: `"google/protobuf/source_context.proto"`. FileName string `protobuf:"bytes,1,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty" pg:"file_name"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` }
`SourceContext` represents information about the source of a protobuf element, like the file in which it is defined.
func NewPopulatedSourceContext ¶ added in v1.1.0
func NewPopulatedSourceContext(r randySourceContext, easy bool) *SourceContext
func (*SourceContext) Compare ¶ added in v1.1.0
func (this *SourceContext) Compare(that interface{}) int
func (*SourceContext) Descriptor ¶ added in v1.1.0
func (*SourceContext) Descriptor() ([]byte, []int)
func (*SourceContext) Equal ¶ added in v1.1.0
func (this *SourceContext) Equal(that interface{}) bool
func (*SourceContext) GetFileName ¶ added in v1.1.0
func (m *SourceContext) GetFileName() string
func (*SourceContext) GoString ¶ added in v1.1.0
func (this *SourceContext) GoString() string
func (*SourceContext) Marshal ¶ added in v1.1.0
func (m *SourceContext) Marshal() (dAtA []byte, err error)
func (*SourceContext) MarshalTo ¶ added in v1.1.0
func (m *SourceContext) MarshalTo(dAtA []byte) (int, error)
func (*SourceContext) MarshalToSizedBuffer ¶ added in v1.4.0
func (m *SourceContext) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SourceContext) ProtoMessage ¶ added in v1.1.0
func (*SourceContext) ProtoMessage()
func (*SourceContext) ProtoSize ¶ added in v1.2.0
func (m *SourceContext) ProtoSize() (n int)
func (*SourceContext) Reset ¶ added in v1.1.0
func (m *SourceContext) Reset()
func (*SourceContext) Size ¶ added in v1.1.0
func (m *SourceContext) Size() (n int)
func (*SourceContext) String ¶ added in v1.1.0
func (this *SourceContext) String() string
func (*SourceContext) Unmarshal ¶ added in v1.1.0
func (m *SourceContext) Unmarshal(dAtA []byte) error
func (*SourceContext) XXX_DiscardUnknown ¶ added in v1.1.0
func (m *SourceContext) XXX_DiscardUnknown()
func (*SourceContext) XXX_Marshal ¶ added in v1.1.0
func (m *SourceContext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SourceContext) XXX_Merge ¶ added in v1.1.0
func (m *SourceContext) XXX_Merge(src proto.Message)
func (*SourceContext) XXX_MessageName ¶ added in v1.1.0
func (*SourceContext) XXX_MessageName() string
func (*SourceContext) XXX_Size ¶ added in v1.1.0
func (m *SourceContext) XXX_Size() int
func (*SourceContext) XXX_Unmarshal ¶ added in v1.1.0
func (m *SourceContext) XXX_Unmarshal(b []byte) error
type StringValue ¶
type StringValue struct { // The string value. Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty" pg:"value"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` }
Wrapper message for `string`.
The JSON representation for `StringValue` is JSON string.
func NewPopulatedStringValue ¶
func NewPopulatedStringValue(r randyWrappers, easy bool) *StringValue
func (*StringValue) Compare ¶
func (this *StringValue) Compare(that interface{}) int
func (*StringValue) Descriptor ¶
func (*StringValue) Descriptor() ([]byte, []int)
func (*StringValue) Equal ¶
func (this *StringValue) Equal(that interface{}) bool
func (*StringValue) GetValue ¶
func (m *StringValue) GetValue() string
func (*StringValue) GoString ¶
func (this *StringValue) GoString() string
func (*StringValue) Marshal ¶
func (m *StringValue) Marshal() (dAtA []byte, err error)
func (*StringValue) MarshalToSizedBuffer ¶ added in v1.4.0
func (m *StringValue) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*StringValue) ProtoMessage ¶
func (*StringValue) ProtoMessage()
func (*StringValue) ProtoSize ¶ added in v1.2.0
func (m *StringValue) ProtoSize() (n int)
func (*StringValue) Reset ¶
func (m *StringValue) Reset()
func (*StringValue) Size ¶
func (m *StringValue) Size() (n int)
func (*StringValue) String ¶
func (this *StringValue) String() string
func (*StringValue) Unmarshal ¶
func (m *StringValue) Unmarshal(dAtA []byte) error
func (*StringValue) XXX_DiscardUnknown ¶ added in v1.1.0
func (m *StringValue) XXX_DiscardUnknown()
func (*StringValue) XXX_Marshal ¶ added in v1.1.0
func (m *StringValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StringValue) XXX_Merge ¶ added in v1.1.0
func (m *StringValue) XXX_Merge(src proto.Message)
func (*StringValue) XXX_MessageName ¶ added in v1.1.0
func (*StringValue) XXX_MessageName() string
func (*StringValue) XXX_Size ¶ added in v1.1.0
func (m *StringValue) XXX_Size() int
func (*StringValue) XXX_Unmarshal ¶ added in v1.1.0
func (m *StringValue) XXX_Unmarshal(b []byte) error
func (*StringValue) XXX_WellKnownType ¶
func (*StringValue) XXX_WellKnownType() string
type Struct ¶
type Struct struct { // Unordered map of dynamically typed values. Fields map[string]*Value `` /* 165-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` }
`Struct` represents a structured data value, consisting of fields which map to dynamically typed values. In some languages, `Struct` might be supported by a native representation. For example, in scripting languages like JS a struct is represented as an object. The details of that representation are described together with the proto support for the language.
The JSON representation for `Struct` is JSON object.
func NewPopulatedStruct ¶
func (*Struct) Descriptor ¶
func (*Struct) MarshalToSizedBuffer ¶ added in v1.4.0
func (*Struct) ProtoMessage ¶
func (*Struct) ProtoMessage()
func (*Struct) XXX_DiscardUnknown ¶ added in v1.1.0
func (m *Struct) XXX_DiscardUnknown()
func (*Struct) XXX_Marshal ¶ added in v1.1.0
func (*Struct) XXX_MessageName ¶ added in v1.1.0
func (*Struct) XXX_Unmarshal ¶ added in v1.1.0
func (*Struct) XXX_WellKnownType ¶
type Syntax ¶ added in v1.1.0
type Syntax int32
The syntax in which a protocol buffer element is defined.
func (Syntax) EnumDescriptor ¶ added in v1.1.0
type Timestamp ¶
type Timestamp struct { // Represents seconds of UTC time since Unix epoch // 1970-01-01T00:00:00Z. Must be 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" pg:"seconds"` // 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" pg:"nanos"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` }
A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.
All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear).
The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
Examples ¶
Example 1: Compute Timestamp from POSIX `time()`.
Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0);
Example 2: Compute Timestamp from POSIX `gettimeofday()`.
struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000);
Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build();
Example 5: Compute Timestamp from current time in Python.
timestamp = Timestamp() timestamp.GetCurrentTime()
JSON Mapping ¶
In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).
For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017.
In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D ) to obtain a formatter capable of generating timestamps in this format.
func NewPopulatedTimestamp ¶
func TimestampNow ¶
func TimestampNow() *Timestamp
TimestampNow returns a google.protobuf.Timestamp for the current time.
func TimestampProto ¶
TimestampProto converts the time.Time to a google.protobuf.Timestamp proto. It returns an error if the resulting Timestamp is invalid.
func (*Timestamp) Descriptor ¶
func (*Timestamp) GetSeconds ¶
func (*Timestamp) MarshalToSizedBuffer ¶ added in v1.4.0
func (*Timestamp) ProtoMessage ¶
func (*Timestamp) ProtoMessage()
func (*Timestamp) XXX_DiscardUnknown ¶ added in v1.1.0
func (m *Timestamp) XXX_DiscardUnknown()
func (*Timestamp) XXX_Marshal ¶ added in v1.1.0
func (*Timestamp) XXX_MessageName ¶ added in v1.1.0
func (*Timestamp) XXX_Unmarshal ¶ added in v1.1.0
func (*Timestamp) XXX_WellKnownType ¶
type Type ¶ added in v1.1.0
type Type struct { // The fully qualified message name. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty" pg:"name"` // The list of fields. Fields []*Field `protobuf:"bytes,2,rep,name=fields,proto3" json:"fields,omitempty" pg:"fields"` // The list of types appearing in `oneof` definitions in this type. Oneofs []string `protobuf:"bytes,3,rep,name=oneofs,proto3" json:"oneofs,omitempty" pg:"oneofs"` // The protocol buffer options. Options []*Option `protobuf:"bytes,4,rep,name=options,proto3" json:"options,omitempty" pg:"options"` // The source context. SourceContext *SourceContext `protobuf:"bytes,5,opt,name=source_context,json=sourceContext,proto3" json:"source_context,omitempty" pg:"source_context"` // The source syntax. Syntax Syntax `protobuf:"varint,6,opt,name=syntax,proto3,enum=google.protobuf.Syntax" json:"syntax,omitempty" pg:"syntax"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` }
A protocol buffer message type.
func NewPopulatedType ¶ added in v1.1.0
func (*Type) Descriptor ¶ added in v1.1.0
func (*Type) GetOptions ¶ added in v1.1.0
func (*Type) GetSourceContext ¶ added in v1.1.0
func (m *Type) GetSourceContext() *SourceContext
func (*Type) MarshalToSizedBuffer ¶ added in v1.4.0
func (*Type) ProtoMessage ¶ added in v1.1.0
func (*Type) ProtoMessage()
func (*Type) XXX_DiscardUnknown ¶ added in v1.1.0
func (m *Type) XXX_DiscardUnknown()
func (*Type) XXX_Marshal ¶ added in v1.1.0
func (*Type) XXX_MessageName ¶ added in v1.1.0
func (*Type) XXX_Unmarshal ¶ added in v1.1.0
type UInt32Value ¶
type UInt32Value struct { // The uint32 value. Value uint32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty" pg:"value"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` }
Wrapper message for `uint32`.
The JSON representation for `UInt32Value` is JSON number.
func NewPopulatedUInt32Value ¶
func NewPopulatedUInt32Value(r randyWrappers, easy bool) *UInt32Value
func (*UInt32Value) Compare ¶
func (this *UInt32Value) Compare(that interface{}) int
func (*UInt32Value) Descriptor ¶
func (*UInt32Value) Descriptor() ([]byte, []int)
func (*UInt32Value) Equal ¶
func (this *UInt32Value) Equal(that interface{}) bool
func (*UInt32Value) GetValue ¶
func (m *UInt32Value) GetValue() uint32
func (*UInt32Value) GoString ¶
func (this *UInt32Value) GoString() string
func (*UInt32Value) Marshal ¶
func (m *UInt32Value) Marshal() (dAtA []byte, err error)
func (*UInt32Value) MarshalToSizedBuffer ¶ added in v1.4.0
func (m *UInt32Value) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*UInt32Value) ProtoMessage ¶
func (*UInt32Value) ProtoMessage()
func (*UInt32Value) ProtoSize ¶ added in v1.2.0
func (m *UInt32Value) ProtoSize() (n int)
func (*UInt32Value) Reset ¶
func (m *UInt32Value) Reset()
func (*UInt32Value) Size ¶
func (m *UInt32Value) Size() (n int)
func (*UInt32Value) String ¶
func (this *UInt32Value) String() string
func (*UInt32Value) Unmarshal ¶
func (m *UInt32Value) Unmarshal(dAtA []byte) error
func (*UInt32Value) XXX_DiscardUnknown ¶ added in v1.1.0
func (m *UInt32Value) XXX_DiscardUnknown()
func (*UInt32Value) XXX_Marshal ¶ added in v1.1.0
func (m *UInt32Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*UInt32Value) XXX_Merge ¶ added in v1.1.0
func (m *UInt32Value) XXX_Merge(src proto.Message)
func (*UInt32Value) XXX_MessageName ¶ added in v1.1.0
func (*UInt32Value) XXX_MessageName() string
func (*UInt32Value) XXX_Size ¶ added in v1.1.0
func (m *UInt32Value) XXX_Size() int
func (*UInt32Value) XXX_Unmarshal ¶ added in v1.1.0
func (m *UInt32Value) XXX_Unmarshal(b []byte) error
func (*UInt32Value) XXX_WellKnownType ¶
func (*UInt32Value) XXX_WellKnownType() string
type UInt64Value ¶
type UInt64Value struct { // The uint64 value. Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty" pg:"value"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` }
Wrapper message for `uint64`.
The JSON representation for `UInt64Value` is JSON string.
func NewPopulatedUInt64Value ¶
func NewPopulatedUInt64Value(r randyWrappers, easy bool) *UInt64Value
func (*UInt64Value) Compare ¶
func (this *UInt64Value) Compare(that interface{}) int
func (*UInt64Value) Descriptor ¶
func (*UInt64Value) Descriptor() ([]byte, []int)
func (*UInt64Value) Equal ¶
func (this *UInt64Value) Equal(that interface{}) bool
func (*UInt64Value) GetValue ¶
func (m *UInt64Value) GetValue() uint64
func (*UInt64Value) GoString ¶
func (this *UInt64Value) GoString() string
func (*UInt64Value) Marshal ¶
func (m *UInt64Value) Marshal() (dAtA []byte, err error)
func (*UInt64Value) MarshalToSizedBuffer ¶ added in v1.4.0
func (m *UInt64Value) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*UInt64Value) ProtoMessage ¶
func (*UInt64Value) ProtoMessage()
func (*UInt64Value) ProtoSize ¶ added in v1.2.0
func (m *UInt64Value) ProtoSize() (n int)
func (*UInt64Value) Reset ¶
func (m *UInt64Value) Reset()
func (*UInt64Value) Size ¶
func (m *UInt64Value) Size() (n int)
func (*UInt64Value) String ¶
func (this *UInt64Value) String() string
func (*UInt64Value) Unmarshal ¶
func (m *UInt64Value) Unmarshal(dAtA []byte) error
func (*UInt64Value) XXX_DiscardUnknown ¶ added in v1.1.0
func (m *UInt64Value) XXX_DiscardUnknown()
func (*UInt64Value) XXX_Marshal ¶ added in v1.1.0
func (m *UInt64Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*UInt64Value) XXX_Merge ¶ added in v1.1.0
func (m *UInt64Value) XXX_Merge(src proto.Message)
func (*UInt64Value) XXX_MessageName ¶ added in v1.1.0
func (*UInt64Value) XXX_MessageName() string
func (*UInt64Value) XXX_Size ¶ added in v1.1.0
func (m *UInt64Value) XXX_Size() int
func (*UInt64Value) XXX_Unmarshal ¶ added in v1.1.0
func (m *UInt64Value) XXX_Unmarshal(b []byte) error
func (*UInt64Value) XXX_WellKnownType ¶
func (*UInt64Value) XXX_WellKnownType() string
type Value ¶
type Value struct { // The kind of value. // // Types that are valid to be assigned to Kind: // *Value_NullValue // *Value_NumberValue // *Value_StringValue // *Value_BoolValue // *Value_StructValue // *Value_ListValue Kind isValue_Kind `protobuf_oneof:"kind"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` }
`Value` represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values. A producer of value is expected to set one of that variants, absence of any variant indicates an error.
The JSON representation for `Value` is JSON value.
func NewPopulatedValue ¶
func (*Value) Descriptor ¶
func (*Value) GetBoolValue ¶
func (*Value) GetListValue ¶
func (*Value) GetNullValue ¶
func (*Value) GetNumberValue ¶
func (*Value) GetStringValue ¶
func (*Value) GetStructValue ¶
func (*Value) MarshalToSizedBuffer ¶ added in v1.4.0
func (*Value) ProtoMessage ¶
func (*Value) ProtoMessage()
func (*Value) XXX_DiscardUnknown ¶ added in v1.1.0
func (m *Value) XXX_DiscardUnknown()
func (*Value) XXX_Marshal ¶ added in v1.1.0
func (*Value) XXX_MessageName ¶ added in v1.1.0
func (*Value) XXX_OneofWrappers ¶ added in v1.4.0
func (*Value) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*Value) XXX_Unmarshal ¶ added in v1.1.0
func (*Value) XXX_WellKnownType ¶
type Value_BoolValue ¶
type Value_BoolValue struct {
BoolValue bool `protobuf:"varint,4,opt,name=bool_value,json=boolValue,proto3,oneof" json:"bool_value,omitempty" pg:"bool_value"`
}
func NewPopulatedValue_BoolValue ¶
func NewPopulatedValue_BoolValue(r randyStruct, easy bool) *Value_BoolValue
func (*Value_BoolValue) Compare ¶ added in v1.4.0
func (this *Value_BoolValue) Compare(that interface{}) int
func (*Value_BoolValue) Equal ¶
func (this *Value_BoolValue) Equal(that interface{}) bool
func (*Value_BoolValue) GoString ¶
func (this *Value_BoolValue) GoString() string
func (*Value_BoolValue) MarshalToSizedBuffer ¶ added in v1.4.0
func (m *Value_BoolValue) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Value_BoolValue) ProtoSize ¶ added in v1.2.0
func (m *Value_BoolValue) ProtoSize() (n int)
func (*Value_BoolValue) Size ¶
func (m *Value_BoolValue) Size() (n int)
func (*Value_BoolValue) String ¶
func (this *Value_BoolValue) String() string
type Value_ListValue ¶
type Value_ListValue struct {
ListValue *ListValue `protobuf:"bytes,6,opt,name=list_value,json=listValue,proto3,oneof" json:"list_value,omitempty" pg:"list_value"`
}
func NewPopulatedValue_ListValue ¶
func NewPopulatedValue_ListValue(r randyStruct, easy bool) *Value_ListValue
func (*Value_ListValue) Compare ¶ added in v1.4.0
func (this *Value_ListValue) Compare(that interface{}) int
func (*Value_ListValue) Equal ¶
func (this *Value_ListValue) Equal(that interface{}) bool
func (*Value_ListValue) GoString ¶
func (this *Value_ListValue) GoString() string
func (*Value_ListValue) MarshalToSizedBuffer ¶ added in v1.4.0
func (m *Value_ListValue) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Value_ListValue) ProtoSize ¶ added in v1.2.0
func (m *Value_ListValue) ProtoSize() (n int)
func (*Value_ListValue) Size ¶
func (m *Value_ListValue) Size() (n int)
func (*Value_ListValue) String ¶
func (this *Value_ListValue) String() string
type Value_NullValue ¶
type Value_NullValue struct {
NullValue NullValue `` /* 142-byte string literal not displayed */
}
func NewPopulatedValue_NullValue ¶
func NewPopulatedValue_NullValue(r randyStruct, easy bool) *Value_NullValue
func (*Value_NullValue) Compare ¶ added in v1.4.0
func (this *Value_NullValue) Compare(that interface{}) int
func (*Value_NullValue) Equal ¶
func (this *Value_NullValue) Equal(that interface{}) bool
func (*Value_NullValue) GoString ¶
func (this *Value_NullValue) GoString() string
func (*Value_NullValue) MarshalToSizedBuffer ¶ added in v1.4.0
func (m *Value_NullValue) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Value_NullValue) ProtoSize ¶ added in v1.2.0
func (m *Value_NullValue) ProtoSize() (n int)
func (*Value_NullValue) Size ¶
func (m *Value_NullValue) Size() (n int)
func (*Value_NullValue) String ¶
func (this *Value_NullValue) String() string
type Value_NumberValue ¶
type Value_NumberValue struct {
NumberValue float64 `protobuf:"fixed64,2,opt,name=number_value,json=numberValue,proto3,oneof" json:"number_value,omitempty" pg:"number_value"`
}
func NewPopulatedValue_NumberValue ¶
func NewPopulatedValue_NumberValue(r randyStruct, easy bool) *Value_NumberValue
func (*Value_NumberValue) Compare ¶ added in v1.4.0
func (this *Value_NumberValue) Compare(that interface{}) int
func (*Value_NumberValue) Equal ¶
func (this *Value_NumberValue) Equal(that interface{}) bool
func (*Value_NumberValue) GoString ¶
func (this *Value_NumberValue) GoString() string
func (*Value_NumberValue) MarshalTo ¶
func (m *Value_NumberValue) MarshalTo(dAtA []byte) (int, error)
func (*Value_NumberValue) MarshalToSizedBuffer ¶ added in v1.4.0
func (m *Value_NumberValue) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Value_NumberValue) ProtoSize ¶ added in v1.2.0
func (m *Value_NumberValue) ProtoSize() (n int)
func (*Value_NumberValue) Size ¶
func (m *Value_NumberValue) Size() (n int)
func (*Value_NumberValue) String ¶
func (this *Value_NumberValue) String() string
type Value_StringValue ¶
type Value_StringValue struct {
StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue,proto3,oneof" json:"string_value,omitempty" pg:"string_value"`
}
func NewPopulatedValue_StringValue ¶
func NewPopulatedValue_StringValue(r randyStruct, easy bool) *Value_StringValue
func (*Value_StringValue) Compare ¶ added in v1.4.0
func (this *Value_StringValue) Compare(that interface{}) int
func (*Value_StringValue) Equal ¶
func (this *Value_StringValue) Equal(that interface{}) bool
func (*Value_StringValue) GoString ¶
func (this *Value_StringValue) GoString() string
func (*Value_StringValue) MarshalTo ¶
func (m *Value_StringValue) MarshalTo(dAtA []byte) (int, error)
func (*Value_StringValue) MarshalToSizedBuffer ¶ added in v1.4.0
func (m *Value_StringValue) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Value_StringValue) ProtoSize ¶ added in v1.2.0
func (m *Value_StringValue) ProtoSize() (n int)
func (*Value_StringValue) Size ¶
func (m *Value_StringValue) Size() (n int)
func (*Value_StringValue) String ¶
func (this *Value_StringValue) String() string
type Value_StructValue ¶
type Value_StructValue struct {
StructValue *Struct `protobuf:"bytes,5,opt,name=struct_value,json=structValue,proto3,oneof" json:"struct_value,omitempty" pg:"struct_value"`
}
func NewPopulatedValue_StructValue ¶
func NewPopulatedValue_StructValue(r randyStruct, easy bool) *Value_StructValue
func (*Value_StructValue) Compare ¶ added in v1.4.0
func (this *Value_StructValue) Compare(that interface{}) int
func (*Value_StructValue) Equal ¶
func (this *Value_StructValue) Equal(that interface{}) bool
func (*Value_StructValue) GoString ¶
func (this *Value_StructValue) GoString() string
func (*Value_StructValue) MarshalTo ¶
func (m *Value_StructValue) MarshalTo(dAtA []byte) (int, error)
func (*Value_StructValue) MarshalToSizedBuffer ¶ added in v1.4.0
func (m *Value_StructValue) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Value_StructValue) ProtoSize ¶ added in v1.2.0
func (m *Value_StructValue) ProtoSize() (n int)
func (*Value_StructValue) Size ¶
func (m *Value_StructValue) Size() (n int)
func (*Value_StructValue) String ¶
func (this *Value_StructValue) String() string