riak_dt

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2016 License: Apache-2.0 Imports: 3 Imported by: 13

Documentation

Overview

Package riak_dt is a generated protocol buffer package.

It is generated from these files:

riak_dt.proto

It has these top-level messages:

MapField
MapEntry
DtFetchReq
DtValue
DtFetchResp
CounterOp
SetOp
MapUpdate
MapOp
DtOp
DtUpdateReq
DtUpdateResp

Index

Constants

View Source
const Default_DtFetchReq_IncludeContext bool = true
View Source
const Default_DtUpdateReq_IncludeContext bool = true
View Source
const Default_DtUpdateReq_ReturnBody bool = false

Variables

View Source
var DtFetchResp_DataType_name = map[int32]string{
	1: "COUNTER",
	2: "SET",
	3: "MAP",
}
View Source
var DtFetchResp_DataType_value = map[string]int32{
	"COUNTER": 1,
	"SET":     2,
	"MAP":     3,
}
View Source
var MapField_MapFieldType_name = map[int32]string{
	1: "COUNTER",
	2: "SET",
	3: "REGISTER",
	4: "FLAG",
	5: "MAP",
}
View Source
var MapField_MapFieldType_value = map[string]int32{
	"COUNTER":  1,
	"SET":      2,
	"REGISTER": 3,
	"FLAG":     4,
	"MAP":      5,
}
View Source
var MapUpdate_FlagOp_name = map[int32]string{
	1: "ENABLE",
	2: "DISABLE",
}
View Source
var MapUpdate_FlagOp_value = map[string]int32{
	"ENABLE":  1,
	"DISABLE": 2,
}

Functions

This section is empty.

Types

type CounterOp

type CounterOp struct {
	Increment        *int64 `protobuf:"zigzag64,1,opt,name=increment" json:"increment,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

An operation to update a Counter, either on its own or inside a Map. The `increment` field can be positive or negative. When absent, the meaning is an increment by 1.

func (*CounterOp) Descriptor added in v1.7.0

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

func (*CounterOp) GetIncrement

func (m *CounterOp) GetIncrement() int64

func (*CounterOp) ProtoMessage

func (*CounterOp) ProtoMessage()

func (*CounterOp) Reset

func (m *CounterOp) Reset()

func (*CounterOp) String

func (m *CounterOp) String() string

type DtFetchReq

type DtFetchReq struct {
	// The identifier: bucket, key and bucket-type
	Bucket []byte `protobuf:"bytes,1,req,name=bucket" json:"bucket,omitempty"`
	Key    []byte `protobuf:"bytes,2,req,name=key" json:"key,omitempty"`
	Type   []byte `protobuf:"bytes,3,req,name=type" json:"type,omitempty"`
	// Request options
	R            *uint32 `protobuf:"varint,4,opt,name=r" json:"r,omitempty"`
	Pr           *uint32 `protobuf:"varint,5,opt,name=pr" json:"pr,omitempty"`
	BasicQuorum  *bool   `protobuf:"varint,6,opt,name=basic_quorum" json:"basic_quorum,omitempty"`
	NotfoundOk   *bool   `protobuf:"varint,7,opt,name=notfound_ok" json:"notfound_ok,omitempty"`
	Timeout      *uint32 `protobuf:"varint,8,opt,name=timeout" json:"timeout,omitempty"`
	SloppyQuorum *bool   `protobuf:"varint,9,opt,name=sloppy_quorum" json:"sloppy_quorum,omitempty"`
	NVal         *uint32 `protobuf:"varint,10,opt,name=n_val" json:"n_val,omitempty"`
	// For read-only requests or context-free operations, you can set
	// this to false to reduce the size of the response payload.
	IncludeContext   *bool  `protobuf:"varint,11,opt,name=include_context,def=1" json:"include_context,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

The equivalent of KV's "RpbGetReq", results in a DtFetchResp. The request-time options are limited to ones that are relevant to structured data-types.

func (*DtFetchReq) BucketIsRequired

func (m *DtFetchReq) BucketIsRequired() bool

func (*DtFetchReq) Descriptor added in v1.7.0

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

func (*DtFetchReq) GetBasicQuorum

func (m *DtFetchReq) GetBasicQuorum() bool

func (*DtFetchReq) GetBucket

func (m *DtFetchReq) GetBucket() []byte

func (*DtFetchReq) GetIncludeContext

func (m *DtFetchReq) GetIncludeContext() bool

func (*DtFetchReq) GetKey

func (m *DtFetchReq) GetKey() []byte

func (*DtFetchReq) GetNVal

func (m *DtFetchReq) GetNVal() uint32

func (*DtFetchReq) GetNotfoundOk

func (m *DtFetchReq) GetNotfoundOk() bool

func (*DtFetchReq) GetPr

func (m *DtFetchReq) GetPr() uint32

func (*DtFetchReq) GetR

func (m *DtFetchReq) GetR() uint32

func (*DtFetchReq) GetSloppyQuorum

func (m *DtFetchReq) GetSloppyQuorum() bool

func (*DtFetchReq) GetTimeout

func (m *DtFetchReq) GetTimeout() uint32

func (*DtFetchReq) GetType

func (m *DtFetchReq) GetType() []byte

func (*DtFetchReq) KeyIsRequired

func (m *DtFetchReq) KeyIsRequired() bool

func (*DtFetchReq) ProtoMessage

func (*DtFetchReq) ProtoMessage()

func (*DtFetchReq) Reset

func (m *DtFetchReq) Reset()

func (*DtFetchReq) SetType

func (m *DtFetchReq) SetType(bt []byte)

func (*DtFetchReq) String

func (m *DtFetchReq) String() string

type DtFetchResp

type DtFetchResp struct {
	Context          []byte                `protobuf:"bytes,1,opt,name=context" json:"context,omitempty"`
	Type             *DtFetchResp_DataType `protobuf:"varint,2,req,name=type,enum=DtFetchResp_DataType" json:"type,omitempty"`
	Value            *DtValue              `protobuf:"bytes,3,opt,name=value" json:"value,omitempty"`
	XXX_unrecognized []byte                `json:"-"`
}

The response to a "Fetch" request. If the `include_context` option is specified, an opaque "context" value will be returned along with the user-friendly data. When sending an "Update" request, the client should send this context as well, similar to how one would send a vclock for KV updates. The `type` field indicates which value type to expect. When the `value` field is missing from the message, the client should interpret it as a "not found".

func (*DtFetchResp) Descriptor added in v1.7.0

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

func (*DtFetchResp) GetContext

func (m *DtFetchResp) GetContext() []byte

func (*DtFetchResp) GetType

func (m *DtFetchResp) GetType() DtFetchResp_DataType

func (*DtFetchResp) GetValue

func (m *DtFetchResp) GetValue() *DtValue

func (*DtFetchResp) ProtoMessage

func (*DtFetchResp) ProtoMessage()

func (*DtFetchResp) Reset

func (m *DtFetchResp) Reset()

func (*DtFetchResp) String

func (m *DtFetchResp) String() string

type DtFetchResp_DataType

type DtFetchResp_DataType int32
const (
	DtFetchResp_COUNTER DtFetchResp_DataType = 1
	DtFetchResp_SET     DtFetchResp_DataType = 2
	DtFetchResp_MAP     DtFetchResp_DataType = 3
)

func (DtFetchResp_DataType) Enum

func (DtFetchResp_DataType) EnumDescriptor added in v1.7.0

func (DtFetchResp_DataType) EnumDescriptor() ([]byte, []int)

func (DtFetchResp_DataType) String

func (x DtFetchResp_DataType) String() string

func (*DtFetchResp_DataType) UnmarshalJSON

func (x *DtFetchResp_DataType) UnmarshalJSON(data []byte) error

type DtOp

type DtOp struct {
	CounterOp        *CounterOp `protobuf:"bytes,1,opt,name=counter_op" json:"counter_op,omitempty"`
	SetOp            *SetOp     `protobuf:"bytes,2,opt,name=set_op" json:"set_op,omitempty"`
	MapOp            *MapOp     `protobuf:"bytes,3,opt,name=map_op" json:"map_op,omitempty"`
	XXX_unrecognized []byte     `json:"-"`
}

A "union" type for update operations. The included operation depends on the datatype being updated.

func (*DtOp) Descriptor added in v1.7.0

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

func (*DtOp) GetCounterOp

func (m *DtOp) GetCounterOp() *CounterOp

func (*DtOp) GetMapOp

func (m *DtOp) GetMapOp() *MapOp

func (*DtOp) GetSetOp

func (m *DtOp) GetSetOp() *SetOp

func (*DtOp) ProtoMessage

func (*DtOp) ProtoMessage()

func (*DtOp) Reset

func (m *DtOp) Reset()

func (*DtOp) String

func (m *DtOp) String() string

type DtUpdateReq

type DtUpdateReq struct {
	// The identifier
	Bucket []byte `protobuf:"bytes,1,req,name=bucket" json:"bucket,omitempty"`
	Key    []byte `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"`
	Type   []byte `protobuf:"bytes,3,req,name=type" json:"type,omitempty"`
	// Opaque update-context
	Context []byte `protobuf:"bytes,4,opt,name=context" json:"context,omitempty"`
	// The operations
	Op *DtOp `protobuf:"bytes,5,req,name=op" json:"op,omitempty"`
	// Request options
	W                *uint32 `protobuf:"varint,6,opt,name=w" json:"w,omitempty"`
	Dw               *uint32 `protobuf:"varint,7,opt,name=dw" json:"dw,omitempty"`
	Pw               *uint32 `protobuf:"varint,8,opt,name=pw" json:"pw,omitempty"`
	ReturnBody       *bool   `protobuf:"varint,9,opt,name=return_body,def=0" json:"return_body,omitempty"`
	Timeout          *uint32 `protobuf:"varint,10,opt,name=timeout" json:"timeout,omitempty"`
	SloppyQuorum     *bool   `protobuf:"varint,11,opt,name=sloppy_quorum" json:"sloppy_quorum,omitempty"`
	NVal             *uint32 `protobuf:"varint,12,opt,name=n_val" json:"n_val,omitempty"`
	IncludeContext   *bool   `protobuf:"varint,13,opt,name=include_context,def=1" json:"include_context,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

The equivalent of KV's "RpbPutReq", results in an empty response or "DtUpdateResp" if `return_body` is specified, or the key is assigned by the server. The request-time options are limited to ones that are relevant to structured data-types.

func (*DtUpdateReq) BucketIsRequired

func (m *DtUpdateReq) BucketIsRequired() bool

func (*DtUpdateReq) Descriptor added in v1.7.0

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

func (*DtUpdateReq) GetBucket

func (m *DtUpdateReq) GetBucket() []byte

func (*DtUpdateReq) GetContext

func (m *DtUpdateReq) GetContext() []byte

func (*DtUpdateReq) GetDw

func (m *DtUpdateReq) GetDw() uint32

func (*DtUpdateReq) GetIncludeContext

func (m *DtUpdateReq) GetIncludeContext() bool

func (*DtUpdateReq) GetKey

func (m *DtUpdateReq) GetKey() []byte

func (*DtUpdateReq) GetNVal

func (m *DtUpdateReq) GetNVal() uint32

func (*DtUpdateReq) GetOp

func (m *DtUpdateReq) GetOp() *DtOp

func (*DtUpdateReq) GetPw

func (m *DtUpdateReq) GetPw() uint32

func (*DtUpdateReq) GetReturnBody

func (m *DtUpdateReq) GetReturnBody() bool

func (*DtUpdateReq) GetSloppyQuorum

func (m *DtUpdateReq) GetSloppyQuorum() bool

func (*DtUpdateReq) GetTimeout

func (m *DtUpdateReq) GetTimeout() uint32

func (*DtUpdateReq) GetType

func (m *DtUpdateReq) GetType() []byte

func (*DtUpdateReq) GetW

func (m *DtUpdateReq) GetW() uint32

func (*DtUpdateReq) KeyIsRequired

func (m *DtUpdateReq) KeyIsRequired() bool

func (*DtUpdateReq) ProtoMessage

func (*DtUpdateReq) ProtoMessage()

func (*DtUpdateReq) Reset

func (m *DtUpdateReq) Reset()

func (*DtUpdateReq) SetType

func (m *DtUpdateReq) SetType(bt []byte)

func (*DtUpdateReq) String

func (m *DtUpdateReq) String() string

type DtUpdateResp

type DtUpdateResp struct {
	// The key, if assigned by the server
	Key []byte `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"`
	// The opaque update context and value, if return_body was set.
	Context          []byte      `protobuf:"bytes,2,opt,name=context" json:"context,omitempty"`
	CounterValue     *int64      `protobuf:"zigzag64,3,opt,name=counter_value" json:"counter_value,omitempty"`
	SetValue         [][]byte    `protobuf:"bytes,4,rep,name=set_value" json:"set_value,omitempty"`
	MapValue         []*MapEntry `protobuf:"bytes,5,rep,name=map_value" json:"map_value,omitempty"`
	XXX_unrecognized []byte      `json:"-"`
}

The equivalent of KV's "RpbPutResp", contains the assigned key if it was assigned by the server, and the resulting value and context if return_body was set.

func (*DtUpdateResp) Descriptor added in v1.7.0

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

func (*DtUpdateResp) GetContext

func (m *DtUpdateResp) GetContext() []byte

func (*DtUpdateResp) GetCounterValue

func (m *DtUpdateResp) GetCounterValue() int64

func (*DtUpdateResp) GetKey

func (m *DtUpdateResp) GetKey() []byte

func (*DtUpdateResp) GetMapValue

func (m *DtUpdateResp) GetMapValue() []*MapEntry

func (*DtUpdateResp) GetSetValue

func (m *DtUpdateResp) GetSetValue() [][]byte

func (*DtUpdateResp) ProtoMessage

func (*DtUpdateResp) ProtoMessage()

func (*DtUpdateResp) Reset

func (m *DtUpdateResp) Reset()

func (*DtUpdateResp) String

func (m *DtUpdateResp) String() string

type DtValue

type DtValue struct {
	CounterValue     *int64      `protobuf:"zigzag64,1,opt,name=counter_value" json:"counter_value,omitempty"`
	SetValue         [][]byte    `protobuf:"bytes,2,rep,name=set_value" json:"set_value,omitempty"`
	MapValue         []*MapEntry `protobuf:"bytes,3,rep,name=map_value" json:"map_value,omitempty"`
	XXX_unrecognized []byte      `json:"-"`
}

The value of the fetched data type. If present in the response, then empty values (sets, maps) should be treated as such.

func (*DtValue) Descriptor added in v1.7.0

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

func (*DtValue) GetCounterValue

func (m *DtValue) GetCounterValue() int64

func (*DtValue) GetMapValue

func (m *DtValue) GetMapValue() []*MapEntry

func (*DtValue) GetSetValue

func (m *DtValue) GetSetValue() [][]byte

func (*DtValue) ProtoMessage

func (*DtValue) ProtoMessage()

func (*DtValue) Reset

func (m *DtValue) Reset()

func (*DtValue) String

func (m *DtValue) String() string

type MapEntry

type MapEntry struct {
	Field            *MapField   `protobuf:"bytes,1,req,name=field" json:"field,omitempty"`
	CounterValue     *int64      `protobuf:"zigzag64,2,opt,name=counter_value" json:"counter_value,omitempty"`
	SetValue         [][]byte    `protobuf:"bytes,3,rep,name=set_value" json:"set_value,omitempty"`
	RegisterValue    []byte      `protobuf:"bytes,4,opt,name=register_value" json:"register_value,omitempty"`
	FlagValue        *bool       `protobuf:"varint,5,opt,name=flag_value" json:"flag_value,omitempty"`
	MapValue         []*MapEntry `protobuf:"bytes,6,rep,name=map_value" json:"map_value,omitempty"`
	XXX_unrecognized []byte      `json:"-"`
}

An entry in a map is a pair of a field-name and value. The type defined in the field determines which value type is expected.

func (*MapEntry) Descriptor added in v1.7.0

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

func (*MapEntry) GetCounterValue

func (m *MapEntry) GetCounterValue() int64

func (*MapEntry) GetField

func (m *MapEntry) GetField() *MapField

func (*MapEntry) GetFlagValue

func (m *MapEntry) GetFlagValue() bool

func (*MapEntry) GetMapValue

func (m *MapEntry) GetMapValue() []*MapEntry

func (*MapEntry) GetRegisterValue

func (m *MapEntry) GetRegisterValue() []byte

func (*MapEntry) GetSetValue

func (m *MapEntry) GetSetValue() [][]byte

func (*MapEntry) ProtoMessage

func (*MapEntry) ProtoMessage()

func (*MapEntry) Reset

func (m *MapEntry) Reset()

func (*MapEntry) String

func (m *MapEntry) String() string

type MapField

type MapField struct {
	Name             []byte                 `protobuf:"bytes,1,req,name=name" json:"name,omitempty"`
	Type             *MapField_MapFieldType `protobuf:"varint,2,req,name=type,enum=MapField_MapFieldType" json:"type,omitempty"`
	XXX_unrecognized []byte                 `json:"-"`
}

Field names in maps are composed of a binary identifier and a type. This is so that two clients can create fields with the same name but different types, and they converge independently.

func (*MapField) Descriptor added in v1.7.0

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

func (*MapField) GetName

func (m *MapField) GetName() []byte

func (*MapField) GetType

func (m *MapField) GetType() MapField_MapFieldType

func (*MapField) ProtoMessage

func (*MapField) ProtoMessage()

func (*MapField) Reset

func (m *MapField) Reset()

func (*MapField) String

func (m *MapField) String() string

type MapField_MapFieldType

type MapField_MapFieldType int32

The types that can be stored in a map are limited to counters, sets, registers, flags, and maps.

const (
	MapField_COUNTER  MapField_MapFieldType = 1
	MapField_SET      MapField_MapFieldType = 2
	MapField_REGISTER MapField_MapFieldType = 3
	MapField_FLAG     MapField_MapFieldType = 4
	MapField_MAP      MapField_MapFieldType = 5
)

func (MapField_MapFieldType) Enum

func (MapField_MapFieldType) EnumDescriptor added in v1.7.0

func (MapField_MapFieldType) EnumDescriptor() ([]byte, []int)

func (MapField_MapFieldType) String

func (x MapField_MapFieldType) String() string

func (*MapField_MapFieldType) UnmarshalJSON

func (x *MapField_MapFieldType) UnmarshalJSON(data []byte) error

type MapOp

type MapOp struct {
	//
	//  REMOVE removes a field and value from the Map.
	// UPDATE applies type-specific
	// operations to the values stored in the Map.
	Removes          []*MapField  `protobuf:"bytes,1,rep,name=removes" json:"removes,omitempty"`
	Updates          []*MapUpdate `protobuf:"bytes,2,rep,name=updates" json:"updates,omitempty"`
	XXX_unrecognized []byte       `json:"-"`
}

An operation to update a Map. All operations apply to individual fields in the Map.

func (*MapOp) Descriptor added in v1.7.0

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

func (*MapOp) GetRemoves

func (m *MapOp) GetRemoves() []*MapField

func (*MapOp) GetUpdates

func (m *MapOp) GetUpdates() []*MapUpdate

func (*MapOp) ProtoMessage

func (*MapOp) ProtoMessage()

func (*MapOp) Reset

func (m *MapOp) Reset()

func (*MapOp) String

func (m *MapOp) String() string

type MapUpdate

type MapUpdate struct {
	Field     *MapField  `protobuf:"bytes,1,req,name=field" json:"field,omitempty"`
	CounterOp *CounterOp `protobuf:"bytes,2,opt,name=counter_op" json:"counter_op,omitempty"`
	SetOp     *SetOp     `protobuf:"bytes,3,opt,name=set_op" json:"set_op,omitempty"`
	//
	// There is only one operation on a register, which is to set its
	// value, therefore the "operation" is the new value.
	RegisterOp       []byte            `protobuf:"bytes,4,opt,name=register_op" json:"register_op,omitempty"`
	FlagOp           *MapUpdate_FlagOp `protobuf:"varint,5,opt,name=flag_op,enum=MapUpdate_FlagOp" json:"flag_op,omitempty"`
	MapOp            *MapOp            `protobuf:"bytes,6,opt,name=map_op" json:"map_op,omitempty"`
	XXX_unrecognized []byte            `json:"-"`
}

An operation to be applied to a value stored in a Map -- the contents of an UPDATE operation. The operation field that is present depends on the type of the field to which it is applied.

func (*MapUpdate) Descriptor added in v1.7.0

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

func (*MapUpdate) GetCounterOp

func (m *MapUpdate) GetCounterOp() *CounterOp

func (*MapUpdate) GetField

func (m *MapUpdate) GetField() *MapField

func (*MapUpdate) GetFlagOp

func (m *MapUpdate) GetFlagOp() MapUpdate_FlagOp

func (*MapUpdate) GetMapOp

func (m *MapUpdate) GetMapOp() *MapOp

func (*MapUpdate) GetRegisterOp

func (m *MapUpdate) GetRegisterOp() []byte

func (*MapUpdate) GetSetOp

func (m *MapUpdate) GetSetOp() *SetOp

func (*MapUpdate) ProtoMessage

func (*MapUpdate) ProtoMessage()

func (*MapUpdate) Reset

func (m *MapUpdate) Reset()

func (*MapUpdate) String

func (m *MapUpdate) String() string

type MapUpdate_FlagOp

type MapUpdate_FlagOp int32

Flags only exist inside Maps and can only be enabled or disabled, and there are no arguments to the operations.

const (
	MapUpdate_ENABLE  MapUpdate_FlagOp = 1
	MapUpdate_DISABLE MapUpdate_FlagOp = 2
)

func (MapUpdate_FlagOp) Enum

func (MapUpdate_FlagOp) EnumDescriptor added in v1.7.0

func (MapUpdate_FlagOp) EnumDescriptor() ([]byte, []int)

func (MapUpdate_FlagOp) String

func (x MapUpdate_FlagOp) String() string

func (*MapUpdate_FlagOp) UnmarshalJSON

func (x *MapUpdate_FlagOp) UnmarshalJSON(data []byte) error

type SetOp

type SetOp struct {
	Adds             [][]byte `protobuf:"bytes,1,rep,name=adds" json:"adds,omitempty"`
	Removes          [][]byte `protobuf:"bytes,2,rep,name=removes" json:"removes,omitempty"`
	XXX_unrecognized []byte   `json:"-"`
}

An operation to update a Set, either on its own or inside a Map. Set members are opaque binary values, you can only add or remove them from a Set.

func (*SetOp) Descriptor added in v1.7.0

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

func (*SetOp) GetAdds

func (m *SetOp) GetAdds() [][]byte

func (*SetOp) GetRemoves

func (m *SetOp) GetRemoves() [][]byte

func (*SetOp) ProtoMessage

func (*SetOp) ProtoMessage()

func (*SetOp) Reset

func (m *SetOp) Reset()

func (*SetOp) String

func (m *SetOp) String() string

Jump to

Keyboard shortcuts

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