Documentation ¶
Overview ¶
Package structpb is a generated protocol buffer package.
It is generated from these files:
struct/struct.proto
It has these top-level messages:
Struct Value ListValue
Index ¶
- Variables
- type ListValue
- type NullValue
- type Struct
- type Value
- func (m *Value) GetBoolValue() (x bool)
- func (m *Value) GetKind() (x isValue_Kind)
- func (m *Value) GetListValue() (x *ListValue)
- func (m *Value) GetNullValue() (x NullValue)
- func (m *Value) GetNumberValue() (x float64)
- func (m *Value) GetStringValue() (x string)
- func (m *Value) GetStructValue() (x *Struct)
- func (m *Value) Marshal() []byte
- func (m *Value) MarshalToWriter(writer jspb.Writer)
- func (m *Value) Unmarshal(rawBytes []byte) (*Value, error)
- func (m *Value) UnmarshalFromReader(reader jspb.Reader) *Value
- type Value_BoolValue
- type Value_ListValue
- type Value_NullValue
- type Value_NumberValue
- type Value_StringValue
- type Value_StructValue
Constants ¶
This section is empty.
Variables ¶
var NullValue_name = map[int]string{
0: "NULL_VALUE",
}
var NullValue_value = map[string]int{
"NULL_VALUE": 0,
}
Functions ¶
This section is empty.
Types ¶
type ListValue ¶
type ListValue struct { // Repeated field of dynamically typed values. Values []*Value }
`ListValue` is a wrapper around a repeated field of values.
The JSON representation for `ListValue` is JSON array.
func (*ListValue) MarshalToWriter ¶
MarshalToWriter marshals ListValue to the provided writer.
type NullValue ¶
type NullValue int
`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 )
type Struct ¶
`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 (*Struct) MarshalToWriter ¶
MarshalToWriter marshals Struct to the provided writer.
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 }
`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 (*Value) GetBoolValue ¶
GetBoolValue gets the BoolValue of the Value.
func (*Value) GetKind ¶
func (m *Value) GetKind() (x isValue_Kind)
GetKind gets the Kind of the Value.
func (*Value) GetListValue ¶
GetListValue gets the ListValue of the Value.
func (*Value) GetNullValue ¶
GetNullValue gets the NullValue of the Value.
func (*Value) GetNumberValue ¶
GetNumberValue gets the NumberValue of the Value.
func (*Value) GetStringValue ¶
GetStringValue gets the StringValue of the Value.
func (*Value) GetStructValue ¶
GetStructValue gets the StructValue of the Value.
func (*Value) MarshalToWriter ¶
MarshalToWriter marshals Value to the provided writer.
type Value_BoolValue ¶
type Value_BoolValue struct { // Represents a boolean value. BoolValue bool }
Value_BoolValue is assignable to Kind
type Value_ListValue ¶
type Value_ListValue struct { // Represents a repeated `Value`. ListValue *ListValue }
Value_ListValue is assignable to Kind
type Value_NullValue ¶
type Value_NullValue struct { // Represents a null value. NullValue NullValue }
Value_NullValue is assignable to Kind
type Value_NumberValue ¶
type Value_NumberValue struct { // Represents a double value. NumberValue float64 }
Value_NumberValue is assignable to Kind
type Value_StringValue ¶
type Value_StringValue struct { // Represents a string value. StringValue string }
Value_StringValue is assignable to Kind
type Value_StructValue ¶
type Value_StructValue struct { // Represents a structured value. StructValue *Struct }
Value_StructValue is assignable to Kind