structpb

package
Version: v0.0.0-...-99ece89 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 2, 2018 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package structpb is a generated protocol buffer package.

It is generated from these files:

google/protobuf/struct.proto

It has these top-level messages:

Struct
Value
ListValue

Index

Constants

This section is empty.

Variables

View Source
var NullValue_name = map[int32]string{
	0: "NULL_VALUE",
}
View Source
var NullValue_value = map[string]int32{
	"NULL_VALUE": 0,
}

Functions

This section is empty.

Types

type ListValue

type ListValue struct {
	// Repeated field of dynamically typed values.
	Values []*Value `protobuf:"bytes,1,rep,name=values" json:"values,omitempty"`
}

`ListValue` is a wrapper around a repeated field of values.

The JSON representation for `ListValue` is JSON array.

func (*ListValue) Descriptor

func (*ListValue) Descriptor() ([]byte, []int)

func (*ListValue) GetValues

func (m *ListValue) GetValues() []*Value

func (*ListValue) ProtoMessage

func (*ListValue) ProtoMessage()

func (*ListValue) Reset

func (m *ListValue) Reset()

func (*ListValue) String

func (m *ListValue) String() string

func (*ListValue) XXX_WellKnownType

func (*ListValue) XXX_WellKnownType() string

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) EnumDescriptor() ([]byte, []int)

func (NullValue) String

func (x NullValue) String() string

func (NullValue) XXX_WellKnownType

func (NullValue) XXX_WellKnownType() string

type Struct

type Struct struct {
	// Unordered map of dynamically typed values.
	Fields map[string]*Value `` /* 132-byte string literal not displayed */
}

`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) Descriptor

func (*Struct) Descriptor() ([]byte, []int)

func (*Struct) GetFields

func (m *Struct) GetFields() map[string]*Value

func (*Struct) ProtoMessage

func (*Struct) ProtoMessage()

func (*Struct) Reset

func (m *Struct) Reset()

func (*Struct) String

func (m *Struct) String() string

func (*Struct) XXX_WellKnownType

func (*Struct) 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"`
}

`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) Descriptor

func (*Value) Descriptor() ([]byte, []int)

func (*Value) GetBoolValue

func (m *Value) GetBoolValue() bool

func (*Value) GetKind

func (m *Value) GetKind() isValue_Kind

func (*Value) GetListValue

func (m *Value) GetListValue() *ListValue

func (*Value) GetNullValue

func (m *Value) GetNullValue() NullValue

func (*Value) GetNumberValue

func (m *Value) GetNumberValue() float64

func (*Value) GetStringValue

func (m *Value) GetStringValue() string

func (*Value) GetStructValue

func (m *Value) GetStructValue() *Struct

func (*Value) ProtoMessage

func (*Value) ProtoMessage()

func (*Value) Reset

func (m *Value) Reset()

func (*Value) String

func (m *Value) String() string

func (*Value) XXX_OneofFuncs

func (*Value) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*Value) XXX_WellKnownType

func (*Value) XXX_WellKnownType() string

type Value_BoolValue

type Value_BoolValue struct {
	BoolValue bool `protobuf:"varint,4,opt,name=bool_value,json=boolValue,oneof"`
}

type Value_ListValue

type Value_ListValue struct {
	ListValue *ListValue `protobuf:"bytes,6,opt,name=list_value,json=listValue,oneof"`
}

type Value_NullValue

type Value_NullValue struct {
	NullValue NullValue `protobuf:"varint,1,opt,name=null_value,json=nullValue,enum=google.protobuf.NullValue,oneof"`
}

type Value_NumberValue

type Value_NumberValue struct {
	NumberValue float64 `protobuf:"fixed64,2,opt,name=number_value,json=numberValue,oneof"`
}

type Value_StringValue

type Value_StringValue struct {
	StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue,oneof"`
}

type Value_StructValue

type Value_StructValue struct {
	StructValue *Struct `protobuf:"bytes,5,opt,name=struct_value,json=structValue,oneof"`
}

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL