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) Deserialize(rawBytes []byte) (*Value, error)
- func (m *Value) GetBoolValue() bool
- func (m *Value) GetKind() (x 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 (m *Value) New() *Value
- func (m *Value) Serialize() ([]byte, error)
- func (m *Value) SetBoolValue(v bool)
- func (m *Value) SetListValue(v *ListValue)
- func (m *Value) SetNullValue(v NullValue)
- func (m *Value) SetNumberValue(v float64)
- func (m *Value) SetStringValue(v string)
- func (m *Value) SetStructValue(v *Struct)
- 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 ¶
`ListValue` is a wrapper around a repeated field of values.
The JSON representation for `ListValue` is JSON array.
func (*ListValue) Deserialize ¶
Deserialize unmarshals a ListValue from a slice of bytes.
func (*ListValue) GetValues ¶
GetValues gets the Values of the ListValue. Repeated field of dynamically typed values. Warning: mutating the returned slice will not be reflected in the message. Use the setter to make changes to the slice in the message.
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) Deserialize ¶
Deserialize unmarshals a Struct from a slice of bytes.
func (*Struct) GetFields ¶
GetFields gets the Fields of the Struct. Unordered map of dynamically typed values.
type Value ¶
`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) Deserialize ¶
Deserialize unmarshals a Value from a slice of bytes.
func (*Value) GetBoolValue ¶
GetBoolValue gets the BoolValue of the Value. Represents a boolean value.
func (*Value) GetListValue ¶
GetListValue gets the ListValue of the Value. Represents a repeated `Value`.
func (*Value) GetNullValue ¶
GetNullValue gets the NullValue of the Value. Represents a null value.
func (*Value) GetNumberValue ¶
GetNumberValue gets the NumberValue of the Value. Represents a double value.
func (*Value) GetStringValue ¶
GetStringValue gets the StringValue of the Value. Represents a string value.
func (*Value) GetStructValue ¶
GetStructValue gets the StructValue of the Value. Represents a structured value.
func (*Value) SetBoolValue ¶
SetBoolValue sets the BoolValue of the Value. Represents a boolean value.
func (*Value) SetListValue ¶
SetListValue sets the ListValue of the Value. Represents a repeated `Value`.
func (*Value) SetNullValue ¶
SetNullValue sets the NullValue of the Value. Represents a null value.
func (*Value) SetNumberValue ¶
SetNumberValue sets the NumberValue of the Value. Represents a double value.
func (*Value) SetStringValue ¶
SetStringValue sets the StringValue of the Value. Represents a string value.
func (*Value) SetStructValue ¶
SetStructValue sets the StructValue of the Value. Represents a structured value.
type Value_BoolValue ¶
type Value_BoolValue struct { // Represents a boolean value. BoolValue bool }
type Value_ListValue ¶
type Value_ListValue struct { // Represents a repeated `Value`. ListValue *ListValue }
type Value_NullValue ¶
type Value_NullValue struct { // Represents a null value. NullValue NullValue }
type Value_NumberValue ¶
type Value_NumberValue struct { // Represents a double value. NumberValue float64 }
type Value_StringValue ¶
type Value_StringValue struct { // Represents a string value. StringValue string }
type Value_StructValue ¶
type Value_StructValue struct { // Represents a structured value. StructValue *Struct }