kvdbrpc

package
v0.1.30 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2021 License: CC0-1.0, CC0-1.0, CC0-1.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Condition_CondType_name = map[int32]string{
	0: "UNDEFINED",
	1: "AND",
	2: "BETWEEN",
	3: "BOOL",
	4: "IN",
	5: "LEAF",
	6: "NOTBETWEEN",
	7: "NOTIN",
	8: "OR",
	9: "IS",
}
View Source
var Condition_CondType_value = map[string]int32{
	"UNDEFINED":  0,
	"AND":        1,
	"BETWEEN":    2,
	"BOOL":       3,
	"IN":         4,
	"LEAF":       5,
	"NOTBETWEEN": 6,
	"NOTIN":      7,
	"OR":         8,
	"IS":         9,
}
View Source
var LeafOperator_LeafType_name = map[int32]string{
	0: "UNDEFINED",
	1: "EQ",
	2: "NE",
	3: "GT",
	4: "LT",
	5: "GE",
	6: "LE",
}
View Source
var LeafOperator_LeafType_value = map[string]int32{
	"UNDEFINED": 0,
	"EQ":        1,
	"NE":        2,
	"GT":        3,
	"LT":        4,
	"GE":        5,
	"LE":        6,
}
View Source
var Value_Type_name = map[int32]string{
	0:  "UNDEFINED",
	1:  "INT",
	2:  "INT8",
	3:  "INT16",
	4:  "INT32",
	5:  "INT64",
	6:  "UINT",
	7:  "UINT8",
	8:  "UINT16",
	9:  "UINT32",
	10: "UINT64",
	11: "BOOL",
	12: "FLOAT64",
	13: "STRING",
	14: "BYTESLICE",
}
View Source
var Value_Type_value = map[string]int32{
	"UNDEFINED": 0,
	"INT":       1,
	"INT8":      2,
	"INT16":     3,
	"INT32":     4,
	"INT64":     5,
	"UINT":      6,
	"UINT8":     7,
	"UINT16":    8,
	"UINT32":    9,
	"UINT64":    10,
	"BOOL":      11,
	"FLOAT64":   12,
	"STRING":    13,
	"BYTESLICE": 14,
}

Functions

func RegisterKvdbServer

func RegisterKvdbServer(s *grpc.Server, srv KvdbServer)

func ScanRecord

func ScanRecord(dst record.Record, src *Record) error

ScanRecord scans the contents of "src" into "dst". Any previously set keys or values in "dst" will be deleted or overwritten.

func ToCondition

func ToCondition(c *Condition) (condition.Condition, error)

ToCondition converts a *Condition to a condition.Condition

func ToConditionAndReplacement

func ToConditionAndReplacement(cr *ConditionAndReplacement) (condition.Condition, record.Record, error)

ToConditionAndReplacement converts a *ConditionAndReplacement to a condition.Condition and a record.Record.

func ToConditionTemplateOrderAndLimit

func ToConditionTemplateOrderAndLimit(ctol *ConditionTemplateOrderAndLimit) (condition.Condition, record.Record, sort.OrderBy, int64, error)

ToConditionTemplateOrderAndLimit converts a *ConditionTemplateOrderAndLimit to a condition.Condition, a record.Record, a sort.Order, and an int64.

func ToConditions

func ToConditions(mc *ManyConditions) ([]condition.Condition, error)

ToConditions converts a *ManyConditions to a slice of condition.Conditions

func ToDirection

func ToDirection(d *Direction) sort.Direction

ToDirection converts a *Direction to a sort.Direction

func ToIndex

func ToIndex(idx *Index) string

ToIndex converts a *Index to a string.

func ToIndices

func ToIndices(il *IndexList) []string

ToIndices converts a *IndexList to a slice of strings.

func ToInt64

func ToInt64(nr *NumberOfRecords) int64

ToInt64 converts a *NumberOfRecords to an int64.

func ToKey added in v0.1.29

func ToKey(key *Key) string

ToKey converts a *Key to a string.

func ToKeys added in v0.1.29

func ToKeys(kl *KeyList) []string

ToKeys converts a *KeyList to a slice of strings.

func ToLHSBool

func ToLHSBool(m *LhsBool) (string, bool, error)

ToLHSBool converts a *LhsBool to a string and a bool.

func ToLHSLowerUpper

func ToLHSLowerUpper(ul *LhsLowerUpper) (lhs string, lower interface{}, upper interface{}, err error)

ToLHSLowerUpper converts a *LhsLowerUpper to a string and a pair of interface{}s.

func ToLHSValues

func ToLHSValues(m *LhsManyValues) (string, []interface{}, error)

ToLHSValues converts a *LhsManyValues to a string and a slice of interface{}s.

func ToLeafOp

func ToLeafOp(op *LeafOperator) (*condition.LeafOp, error)

ToLeafOp converts a *LeafOperator to a *condition.LeafOp

func ToName

func ToName(n *Name) string

ToName converts a *Name to a string.

func ToNameAndTemplate

func ToNameAndTemplate(nt *NameAndTemplate) (string, record.Record, error)

ToNameAndTemplate converts a *NameAndTemplate to a string and a record.Record.

func ToOrder

func ToOrder(s *Order) sort.Order

ToOrder converts a *Order to a sort.Order.

func ToOrderBy

func ToOrderBy(S *OrderBy) sort.OrderBy

ToOrderBy converts a *OrderBy to a sort.OrderBy.

func ToRecord

func ToRecord(r *Record) (record.Record, error)

ToRecord converts a *Record to a record.Record

func ToSrcAndDst added in v0.1.29

func ToSrcAndDst(sd *SrcAndDstNames) (string, string)

ToSrcAndDst converts a *SrcAndDstNames to a pair of strings.

func ToTableNames

func ToTableNames(tn *TableNames) ([]string, error)

ToTableNames converts a *TableNames to a slice of strings.

Types

type Condition

type Condition struct {
	Type Condition_CondType `protobuf:"varint,1,opt,name=type,proto3,enum=kvdb.Condition_CondType" json:"type,omitempty"`
	// Types that are valid to be assigned to Value:
	//	*Condition_ManyConditionsValue
	//	*Condition_LhsLowerUpperValue
	//	*Condition_BoolValue
	//	*Condition_LhsManyValuesValue
	//	*Condition_LeafValue
	//	*Condition_LhsBoolValue
	Value                isCondition_Value `protobuf_oneof:"value"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

Condition describes a condition

func FromCondition

func FromCondition(c condition.Condition) (*Condition, error)

FromCondition converts a condition.Condition to a *Condition

func (*Condition) Descriptor

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

func (*Condition) GetBoolValue

func (m *Condition) GetBoolValue() bool

func (*Condition) GetLeafValue

func (m *Condition) GetLeafValue() *LeafOperator

func (*Condition) GetLhsBoolValue

func (m *Condition) GetLhsBoolValue() *LhsBool

func (*Condition) GetLhsLowerUpperValue

func (m *Condition) GetLhsLowerUpperValue() *LhsLowerUpper

func (*Condition) GetLhsManyValuesValue

func (m *Condition) GetLhsManyValuesValue() *LhsManyValues

func (*Condition) GetManyConditionsValue

func (m *Condition) GetManyConditionsValue() *ManyConditions

func (*Condition) GetType

func (m *Condition) GetType() Condition_CondType

func (*Condition) GetValue

func (m *Condition) GetValue() isCondition_Value

func (*Condition) ProtoMessage

func (*Condition) ProtoMessage()

func (*Condition) Reset

func (m *Condition) Reset()

func (*Condition) String

func (m *Condition) String() string

func (*Condition) XXX_DiscardUnknown

func (m *Condition) XXX_DiscardUnknown()

func (*Condition) XXX_Marshal

func (m *Condition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Condition) XXX_Merge

func (m *Condition) XXX_Merge(src proto.Message)

func (*Condition) XXX_OneofWrappers

func (*Condition) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*Condition) XXX_Size

func (m *Condition) XXX_Size() int

func (*Condition) XXX_Unmarshal

func (m *Condition) XXX_Unmarshal(b []byte) error

type ConditionAndReplacement

type ConditionAndReplacement struct {
	Condition            *Condition `protobuf:"bytes,1,opt,name=condition,proto3" json:"condition,omitempty"`
	Replacement          *Record    `protobuf:"bytes,2,opt,name=replacement,proto3" json:"replacement,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

ConditionAndReplacement describes the condition to match against and the replacement values.

func FromConditionAndReplacement

func FromConditionAndReplacement(cond condition.Condition, replacement record.Record) (*ConditionAndReplacement, error)

FromConditionAndReplacement converts a condition.Condition and a record.Record to a *ConditionAndReplacement

func (*ConditionAndReplacement) Descriptor

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

func (*ConditionAndReplacement) GetCondition

func (m *ConditionAndReplacement) GetCondition() *Condition

func (*ConditionAndReplacement) GetReplacement

func (m *ConditionAndReplacement) GetReplacement() *Record

func (*ConditionAndReplacement) ProtoMessage

func (*ConditionAndReplacement) ProtoMessage()

func (*ConditionAndReplacement) Reset

func (m *ConditionAndReplacement) Reset()

func (*ConditionAndReplacement) String

func (m *ConditionAndReplacement) String() string

func (*ConditionAndReplacement) XXX_DiscardUnknown

func (m *ConditionAndReplacement) XXX_DiscardUnknown()

func (*ConditionAndReplacement) XXX_Marshal

func (m *ConditionAndReplacement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConditionAndReplacement) XXX_Merge

func (m *ConditionAndReplacement) XXX_Merge(src proto.Message)

func (*ConditionAndReplacement) XXX_Size

func (m *ConditionAndReplacement) XXX_Size() int

func (*ConditionAndReplacement) XXX_Unmarshal

func (m *ConditionAndReplacement) XXX_Unmarshal(b []byte) error

type ConditionTemplateOrderAndLimit

type ConditionTemplateOrderAndLimit struct {
	Condition            *Condition `protobuf:"bytes,1,opt,name=condition,proto3" json:"condition,omitempty"`
	Template             *Record    `protobuf:"bytes,2,opt,name=template,proto3" json:"template,omitempty"`
	Order                *OrderBy   `protobuf:"bytes,3,opt,name=order,proto3" json:"order,omitempty"`
	Limit                int64      `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

ConditionTemplateOrderAndLimit is the argument for a SelectWhereLimit task.

func FromConditionTemplateOrderAndLimit

func FromConditionTemplateOrderAndLimit(cond condition.Condition, template record.Record, order sort.OrderBy, limit int64) (*ConditionTemplateOrderAndLimit, error)

FromConditionTemplateOrderAndLimit converts a condition.Condition, a record.Record, a sort.Order, and an int64 to a *ConditionTemplateOrderAndLimit.

func (*ConditionTemplateOrderAndLimit) Descriptor

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

func (*ConditionTemplateOrderAndLimit) GetCondition

func (m *ConditionTemplateOrderAndLimit) GetCondition() *Condition

func (*ConditionTemplateOrderAndLimit) GetLimit

func (m *ConditionTemplateOrderAndLimit) GetLimit() int64

func (*ConditionTemplateOrderAndLimit) GetOrder

func (m *ConditionTemplateOrderAndLimit) GetOrder() *OrderBy

func (*ConditionTemplateOrderAndLimit) GetTemplate

func (m *ConditionTemplateOrderAndLimit) GetTemplate() *Record

func (*ConditionTemplateOrderAndLimit) ProtoMessage

func (*ConditionTemplateOrderAndLimit) ProtoMessage()

func (*ConditionTemplateOrderAndLimit) Reset

func (m *ConditionTemplateOrderAndLimit) Reset()

func (*ConditionTemplateOrderAndLimit) String

func (*ConditionTemplateOrderAndLimit) XXX_DiscardUnknown

func (m *ConditionTemplateOrderAndLimit) XXX_DiscardUnknown()

func (*ConditionTemplateOrderAndLimit) XXX_Marshal

func (m *ConditionTemplateOrderAndLimit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConditionTemplateOrderAndLimit) XXX_Merge

func (m *ConditionTemplateOrderAndLimit) XXX_Merge(src proto.Message)

func (*ConditionTemplateOrderAndLimit) XXX_Size

func (m *ConditionTemplateOrderAndLimit) XXX_Size() int

func (*ConditionTemplateOrderAndLimit) XXX_Unmarshal

func (m *ConditionTemplateOrderAndLimit) XXX_Unmarshal(b []byte) error

type Condition_BoolValue

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

type Condition_CondType

type Condition_CondType int32

CondType enumerates the possible condition types

const (
	Condition_UNDEFINED  Condition_CondType = 0
	Condition_AND        Condition_CondType = 1
	Condition_BETWEEN    Condition_CondType = 2
	Condition_BOOL       Condition_CondType = 3
	Condition_IN         Condition_CondType = 4
	Condition_LEAF       Condition_CondType = 5
	Condition_NOTBETWEEN Condition_CondType = 6
	Condition_NOTIN      Condition_CondType = 7
	Condition_OR         Condition_CondType = 8
	Condition_IS         Condition_CondType = 9
)

func (Condition_CondType) EnumDescriptor

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

func (Condition_CondType) String

func (x Condition_CondType) String() string

type Condition_LeafValue

type Condition_LeafValue struct {
	LeafValue *LeafOperator `protobuf:"bytes,6,opt,name=leaf_value,json=leafValue,proto3,oneof"`
}

type Condition_LhsBoolValue

type Condition_LhsBoolValue struct {
	LhsBoolValue *LhsBool `protobuf:"bytes,7,opt,name=lhs_bool_value,json=lhsBoolValue,proto3,oneof"`
}

type Condition_LhsLowerUpperValue

type Condition_LhsLowerUpperValue struct {
	LhsLowerUpperValue *LhsLowerUpper `protobuf:"bytes,3,opt,name=lhs_lower_upper_value,json=lhsLowerUpperValue,proto3,oneof"`
}

type Condition_LhsManyValuesValue

type Condition_LhsManyValuesValue struct {
	LhsManyValuesValue *LhsManyValues `protobuf:"bytes,5,opt,name=lhs_many_values_value,json=lhsManyValuesValue,proto3,oneof"`
}

type Condition_ManyConditionsValue

type Condition_ManyConditionsValue struct {
	ManyConditionsValue *ManyConditions `protobuf:"bytes,2,opt,name=many_conditions_value,json=manyConditionsValue,proto3,oneof"`
}

type Direction

type Direction struct {
	Direction            bool     `protobuf:"varint,1,opt,name=direction,proto3" json:"direction,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Direction represents a direction for a sort order

func FromDirection

func FromDirection(d sort.Direction) *Direction

FromDirection converts a sort.Direction to a *Direction

func (*Direction) Descriptor

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

func (*Direction) GetDirection

func (m *Direction) GetDirection() bool

func (*Direction) ProtoMessage

func (*Direction) ProtoMessage()

func (*Direction) Reset

func (m *Direction) Reset()

func (*Direction) String

func (m *Direction) String() string

func (*Direction) XXX_DiscardUnknown

func (m *Direction) XXX_DiscardUnknown()

func (*Direction) XXX_Marshal

func (m *Direction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Direction) XXX_Merge

func (m *Direction) XXX_Merge(src proto.Message)

func (*Direction) XXX_Size

func (m *Direction) XXX_Size() int

func (*Direction) XXX_Unmarshal

func (m *Direction) XXX_Unmarshal(b []byte) error

type Index

type Index struct {
	Index                string   `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Index describes the name of an index.

func FromIndex

func FromIndex(index string) *Index

FromIndex converts a string to a *Index.

func (*Index) Descriptor

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

func (*Index) GetIndex

func (m *Index) GetIndex() string

func (*Index) ProtoMessage

func (*Index) ProtoMessage()

func (*Index) Reset

func (m *Index) Reset()

func (*Index) String

func (m *Index) String() string

func (*Index) XXX_DiscardUnknown

func (m *Index) XXX_DiscardUnknown()

func (*Index) XXX_Marshal

func (m *Index) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Index) XXX_Merge

func (m *Index) XXX_Merge(src proto.Message)

func (*Index) XXX_Size

func (m *Index) XXX_Size() int

func (*Index) XXX_Unmarshal

func (m *Index) XXX_Unmarshal(b []byte) error

type IndexList

type IndexList struct {
	List                 []*Index `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

IndexList is a list of indices.

func FromIndices

func FromIndices(indices []string) *IndexList

FromIndices converts a slice of strings to a *IndexList.

func (*IndexList) Descriptor

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

func (*IndexList) GetList

func (m *IndexList) GetList() []*Index

func (*IndexList) ProtoMessage

func (*IndexList) ProtoMessage()

func (*IndexList) Reset

func (m *IndexList) Reset()

func (*IndexList) String

func (m *IndexList) String() string

func (*IndexList) XXX_DiscardUnknown

func (m *IndexList) XXX_DiscardUnknown()

func (*IndexList) XXX_Marshal

func (m *IndexList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*IndexList) XXX_Merge

func (m *IndexList) XXX_Merge(src proto.Message)

func (*IndexList) XXX_Size

func (m *IndexList) XXX_Size() int

func (*IndexList) XXX_Unmarshal

func (m *IndexList) XXX_Unmarshal(b []byte) error

type Key added in v0.1.29

type Key struct {
	Key                  string   `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Key describes a key.

func FromKey added in v0.1.29

func FromKey(key string) *Key

FromKey converts a string to a *Key.

func (*Key) Descriptor added in v0.1.29

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

func (*Key) GetKey added in v0.1.29

func (m *Key) GetKey() string

func (*Key) ProtoMessage added in v0.1.29

func (*Key) ProtoMessage()

func (*Key) Reset added in v0.1.29

func (m *Key) Reset()

func (*Key) String added in v0.1.29

func (m *Key) String() string

func (*Key) XXX_DiscardUnknown added in v0.1.29

func (m *Key) XXX_DiscardUnknown()

func (*Key) XXX_Marshal added in v0.1.29

func (m *Key) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Key) XXX_Merge added in v0.1.29

func (m *Key) XXX_Merge(src proto.Message)

func (*Key) XXX_Size added in v0.1.29

func (m *Key) XXX_Size() int

func (*Key) XXX_Unmarshal added in v0.1.29

func (m *Key) XXX_Unmarshal(b []byte) error

type KeyList added in v0.1.29

type KeyList struct {
	List                 []*Key   `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

KeyList is a list of keys.

func FromKeys added in v0.1.29

func FromKeys(keys []string) *KeyList

FromKeys converts a slice of strings to a *KeyList.

func (*KeyList) Descriptor added in v0.1.29

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

func (*KeyList) GetList added in v0.1.29

func (m *KeyList) GetList() []*Key

func (*KeyList) ProtoMessage added in v0.1.29

func (*KeyList) ProtoMessage()

func (*KeyList) Reset added in v0.1.29

func (m *KeyList) Reset()

func (*KeyList) String added in v0.1.29

func (m *KeyList) String() string

func (*KeyList) XXX_DiscardUnknown added in v0.1.29

func (m *KeyList) XXX_DiscardUnknown()

func (*KeyList) XXX_Marshal added in v0.1.29

func (m *KeyList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*KeyList) XXX_Merge added in v0.1.29

func (m *KeyList) XXX_Merge(src proto.Message)

func (*KeyList) XXX_Size added in v0.1.29

func (m *KeyList) XXX_Size() int

func (*KeyList) XXX_Unmarshal added in v0.1.29

func (m *KeyList) XXX_Unmarshal(b []byte) error

type KvdbClient

type KvdbClient interface {
	// ListTables returns the tables in the database.
	ListTables(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*TableNames, error)
	// CreateTable creates a table with the given name and template.
	CreateTable(ctx context.Context, in *NameAndTemplate, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// DescribeTable returns a best-guess template for the data in the table.
	DescribeTable(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Record, error)
	// DeleteTable deletes the table with the given name.
	DeleteTable(ctx context.Context, in *Name, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// RenameTable changes the name of a table in the database.
	RenameTable(ctx context.Context, in *SrcAndDstNames, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// CountWhere returns the number of records in the table that match the
	// given condition.
	CountWhere(ctx context.Context, in *Condition, opts ...grpc.CallOption) (*NumberOfRecords, error)
	// Insert inserts the records from stream into the table.
	Insert(ctx context.Context, opts ...grpc.CallOption) (Kvdb_InsertClient, error)
	// UpdateWhere updates all records in the table that match the given
	// condition by setting all keys present in the given record to the
	// corresponding values. Returns the number of records updated.
	UpdateWhere(ctx context.Context, in *ConditionAndReplacement, opts ...grpc.CallOption) (*NumberOfRecords, error)
	// SelectWhereLimit returns a stream of records matching the given
	// condition. The returned records will be in the form specified by the
	// given template. If the given limit is non-negative then at most that
	// many records will be returned.
	SelectWhereLimit(ctx context.Context, in *ConditionTemplateOrderAndLimit, opts ...grpc.CallOption) (Kvdb_SelectWhereLimitClient, error)
	// DeleteWhere deletes those records in the table that match the given
	// condition. Returns the number of records deleted.
	DeleteWhere(ctx context.Context, in *Condition, opts ...grpc.CallOption) (*NumberOfRecords, error)
	// AddIndex adds an index on the given key.
	AddIndex(ctx context.Context, in *Index, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// AddUniqueIndex adds an index on the given key and the constraint that,
	// for each value of this key, there is at most one record with that value.
	AddUniqueIndex(ctx context.Context, in *Index, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// DeleteIndex deletes the index on the given key.
	DeleteIndex(ctx context.Context, in *Index, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// ListIndices lists the keys for which indices are present.
	ListIndices(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*IndexList, error)
	// AddKeys updates each record r in the table, adding any keys in the given
	// record that are not already present along with the corresponding values. Any
	// keys that are already present in r will be left unmodified.
	AddKeys(ctx context.Context, in *Record, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// DeleteKeys updates all records in the table, deleting the specified keys if
	// present.
	DeleteKeys(ctx context.Context, in *KeyList, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

KvdbClient is the client API for Kvdb service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewKvdbClient

func NewKvdbClient(cc *grpc.ClientConn) KvdbClient

type KvdbServer

type KvdbServer interface {
	// ListTables returns the tables in the database.
	ListTables(context.Context, *emptypb.Empty) (*TableNames, error)
	// CreateTable creates a table with the given name and template.
	CreateTable(context.Context, *NameAndTemplate) (*emptypb.Empty, error)
	// DescribeTable returns a best-guess template for the data in the table.
	DescribeTable(context.Context, *emptypb.Empty) (*Record, error)
	// DeleteTable deletes the table with the given name.
	DeleteTable(context.Context, *Name) (*emptypb.Empty, error)
	// RenameTable changes the name of a table in the database.
	RenameTable(context.Context, *SrcAndDstNames) (*emptypb.Empty, error)
	// CountWhere returns the number of records in the table that match the
	// given condition.
	CountWhere(context.Context, *Condition) (*NumberOfRecords, error)
	// Insert inserts the records from stream into the table.
	Insert(Kvdb_InsertServer) error
	// UpdateWhere updates all records in the table that match the given
	// condition by setting all keys present in the given record to the
	// corresponding values. Returns the number of records updated.
	UpdateWhere(context.Context, *ConditionAndReplacement) (*NumberOfRecords, error)
	// SelectWhereLimit returns a stream of records matching the given
	// condition. The returned records will be in the form specified by the
	// given template. If the given limit is non-negative then at most that
	// many records will be returned.
	SelectWhereLimit(*ConditionTemplateOrderAndLimit, Kvdb_SelectWhereLimitServer) error
	// DeleteWhere deletes those records in the table that match the given
	// condition. Returns the number of records deleted.
	DeleteWhere(context.Context, *Condition) (*NumberOfRecords, error)
	// AddIndex adds an index on the given key.
	AddIndex(context.Context, *Index) (*emptypb.Empty, error)
	// AddUniqueIndex adds an index on the given key and the constraint that,
	// for each value of this key, there is at most one record with that value.
	AddUniqueIndex(context.Context, *Index) (*emptypb.Empty, error)
	// DeleteIndex deletes the index on the given key.
	DeleteIndex(context.Context, *Index) (*emptypb.Empty, error)
	// ListIndices lists the keys for which indices are present.
	ListIndices(context.Context, *emptypb.Empty) (*IndexList, error)
	// AddKeys updates each record r in the table, adding any keys in the given
	// record that are not already present along with the corresponding values. Any
	// keys that are already present in r will be left unmodified.
	AddKeys(context.Context, *Record) (*emptypb.Empty, error)
	// DeleteKeys updates all records in the table, deleting the specified keys if
	// present.
	DeleteKeys(context.Context, *KeyList) (*emptypb.Empty, error)
}

KvdbServer is the server API for Kvdb service.

type Kvdb_InsertClient

type Kvdb_InsertClient interface {
	Send(*Record) error
	CloseAndRecv() (*emptypb.Empty, error)
	grpc.ClientStream
}

type Kvdb_InsertServer

type Kvdb_InsertServer interface {
	SendAndClose(*emptypb.Empty) error
	Recv() (*Record, error)
	grpc.ServerStream
}

type Kvdb_SelectWhereLimitClient

type Kvdb_SelectWhereLimitClient interface {
	Recv() (*Record, error)
	grpc.ClientStream
}

type Kvdb_SelectWhereLimitServer

type Kvdb_SelectWhereLimitServer interface {
	Send(*Record) error
	grpc.ServerStream
}

type LeafOperator

type LeafOperator struct {
	Lhs                  string                `protobuf:"bytes,1,opt,name=lhs,proto3" json:"lhs,omitempty"`
	Opcode               LeafOperator_LeafType `protobuf:"varint,2,opt,name=opcode,proto3,enum=kvdb.LeafOperator_LeafType" json:"opcode,omitempty"`
	Rhs                  *Value                `protobuf:"bytes,3,opt,name=rhs,proto3" json:"rhs,omitempty"`
	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
	XXX_unrecognized     []byte                `json:"-"`
	XXX_sizecache        int32                 `json:"-"`
}

LeafOperator represents an operator of the form "lhs op rhs" where lhs is a key and rhs is a value.

func FromLeafOp

func FromLeafOp(c *condition.LeafOp) (*LeafOperator, error)

FromLeafOp converts a *condition.LeafOp to a *LeafOperator

func (*LeafOperator) Descriptor

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

func (*LeafOperator) GetLhs

func (m *LeafOperator) GetLhs() string

func (*LeafOperator) GetOpcode

func (m *LeafOperator) GetOpcode() LeafOperator_LeafType

func (*LeafOperator) GetRhs

func (m *LeafOperator) GetRhs() *Value

func (*LeafOperator) ProtoMessage

func (*LeafOperator) ProtoMessage()

func (*LeafOperator) Reset

func (m *LeafOperator) Reset()

func (*LeafOperator) String

func (m *LeafOperator) String() string

func (*LeafOperator) XXX_DiscardUnknown

func (m *LeafOperator) XXX_DiscardUnknown()

func (*LeafOperator) XXX_Marshal

func (m *LeafOperator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LeafOperator) XXX_Merge

func (m *LeafOperator) XXX_Merge(src proto.Message)

func (*LeafOperator) XXX_Size

func (m *LeafOperator) XXX_Size() int

func (*LeafOperator) XXX_Unmarshal

func (m *LeafOperator) XXX_Unmarshal(b []byte) error

type LeafOperator_LeafType

type LeafOperator_LeafType int32

LeafType enumerates the possible leaf operators

const (
	LeafOperator_UNDEFINED LeafOperator_LeafType = 0
	LeafOperator_EQ        LeafOperator_LeafType = 1
	LeafOperator_NE        LeafOperator_LeafType = 2
	LeafOperator_GT        LeafOperator_LeafType = 3
	LeafOperator_LT        LeafOperator_LeafType = 4
	LeafOperator_GE        LeafOperator_LeafType = 5
	LeafOperator_LE        LeafOperator_LeafType = 6
)

func (LeafOperator_LeafType) EnumDescriptor

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

func (LeafOperator_LeafType) String

func (x LeafOperator_LeafType) String() string

type LhsBool

type LhsBool struct {
	Lhs                  string   `protobuf:"bytes,1,opt,name=lhs,proto3" json:"lhs,omitempty"`
	BoolValue            bool     `protobuf:"varint,2,opt,name=bool_value,json=boolValue,proto3" json:"bool_value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

LhsBool represents an IS condition

func FromLHSBool

func FromLHSBool(lhs string, b bool) *LhsBool

FromLHSBool converts a string and a slice of interface{} to a *LhsBool

func (*LhsBool) Descriptor

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

func (*LhsBool) GetBoolValue

func (m *LhsBool) GetBoolValue() bool

func (*LhsBool) GetLhs

func (m *LhsBool) GetLhs() string

func (*LhsBool) ProtoMessage

func (*LhsBool) ProtoMessage()

func (*LhsBool) Reset

func (m *LhsBool) Reset()

func (*LhsBool) String

func (m *LhsBool) String() string

func (*LhsBool) XXX_DiscardUnknown

func (m *LhsBool) XXX_DiscardUnknown()

func (*LhsBool) XXX_Marshal

func (m *LhsBool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LhsBool) XXX_Merge

func (m *LhsBool) XXX_Merge(src proto.Message)

func (*LhsBool) XXX_Size

func (m *LhsBool) XXX_Size() int

func (*LhsBool) XXX_Unmarshal

func (m *LhsBool) XXX_Unmarshal(b []byte) error

type LhsLowerUpper

type LhsLowerUpper struct {
	Lhs                  string   `protobuf:"bytes,1,opt,name=lhs,proto3" json:"lhs,omitempty"`
	Lower                *Value   `protobuf:"bytes,2,opt,name=lower,proto3" json:"lower,omitempty"`
	Upper                *Value   `protobuf:"bytes,3,opt,name=upper,proto3" json:"upper,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

LhsLowerUpper represents a BETWEEN or NOT BETWEEN condition

func FromLHSLowerUpper

func FromLHSLowerUpper(lhs string, lower interface{}, upper interface{}) (*LhsLowerUpper, error)

FromLHSLowerUpper converts a string and a pair of interface{}s to a *LhsLowerUpper

func (*LhsLowerUpper) Descriptor

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

func (*LhsLowerUpper) GetLhs

func (m *LhsLowerUpper) GetLhs() string

func (*LhsLowerUpper) GetLower

func (m *LhsLowerUpper) GetLower() *Value

func (*LhsLowerUpper) GetUpper

func (m *LhsLowerUpper) GetUpper() *Value

func (*LhsLowerUpper) ProtoMessage

func (*LhsLowerUpper) ProtoMessage()

func (*LhsLowerUpper) Reset

func (m *LhsLowerUpper) Reset()

func (*LhsLowerUpper) String

func (m *LhsLowerUpper) String() string

func (*LhsLowerUpper) XXX_DiscardUnknown

func (m *LhsLowerUpper) XXX_DiscardUnknown()

func (*LhsLowerUpper) XXX_Marshal

func (m *LhsLowerUpper) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LhsLowerUpper) XXX_Merge

func (m *LhsLowerUpper) XXX_Merge(src proto.Message)

func (*LhsLowerUpper) XXX_Size

func (m *LhsLowerUpper) XXX_Size() int

func (*LhsLowerUpper) XXX_Unmarshal

func (m *LhsLowerUpper) XXX_Unmarshal(b []byte) error

type LhsManyValues

type LhsManyValues struct {
	Lhs                  string   `protobuf:"bytes,1,opt,name=lhs,proto3" json:"lhs,omitempty"`
	Value                []*Value `protobuf:"bytes,2,rep,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

LhsManyValues represents an IN or NOT IN condition

func FromLHSValues

func FromLHSValues(lhs string, vs []interface{}) (*LhsManyValues, error)

FromLHSValues converts a string and a slice of interface{} to a *LhsManyValues

func (*LhsManyValues) Descriptor

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

func (*LhsManyValues) GetLhs

func (m *LhsManyValues) GetLhs() string

func (*LhsManyValues) GetValue

func (m *LhsManyValues) GetValue() []*Value

func (*LhsManyValues) ProtoMessage

func (*LhsManyValues) ProtoMessage()

func (*LhsManyValues) Reset

func (m *LhsManyValues) Reset()

func (*LhsManyValues) String

func (m *LhsManyValues) String() string

func (*LhsManyValues) XXX_DiscardUnknown

func (m *LhsManyValues) XXX_DiscardUnknown()

func (*LhsManyValues) XXX_Marshal

func (m *LhsManyValues) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LhsManyValues) XXX_Merge

func (m *LhsManyValues) XXX_Merge(src proto.Message)

func (*LhsManyValues) XXX_Size

func (m *LhsManyValues) XXX_Size() int

func (*LhsManyValues) XXX_Unmarshal

func (m *LhsManyValues) XXX_Unmarshal(b []byte) error

type ManyConditions

type ManyConditions struct {
	Cond                 []*Condition `protobuf:"bytes,1,rep,name=cond,proto3" json:"cond,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

ManyConditions represents a sequence of conditions

func FromConditions

func FromConditions(cs []condition.Condition) (*ManyConditions, error)

FromConditions converts a slice of condition.Conditions to a *ManyConditions

func (*ManyConditions) Descriptor

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

func (*ManyConditions) GetCond

func (m *ManyConditions) GetCond() []*Condition

func (*ManyConditions) ProtoMessage

func (*ManyConditions) ProtoMessage()

func (*ManyConditions) Reset

func (m *ManyConditions) Reset()

func (*ManyConditions) String

func (m *ManyConditions) String() string

func (*ManyConditions) XXX_DiscardUnknown

func (m *ManyConditions) XXX_DiscardUnknown()

func (*ManyConditions) XXX_Marshal

func (m *ManyConditions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ManyConditions) XXX_Merge

func (m *ManyConditions) XXX_Merge(src proto.Message)

func (*ManyConditions) XXX_Size

func (m *ManyConditions) XXX_Size() int

func (*ManyConditions) XXX_Unmarshal

func (m *ManyConditions) XXX_Unmarshal(b []byte) error

type Name

type Name struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Name describes the name of a table.

func FromName

func FromName(name string) *Name

FromName converts a string to a *Name.

func (*Name) Descriptor

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

func (*Name) GetName

func (m *Name) GetName() string

func (*Name) ProtoMessage

func (*Name) ProtoMessage()

func (*Name) Reset

func (m *Name) Reset()

func (*Name) String

func (m *Name) String() string

func (*Name) XXX_DiscardUnknown

func (m *Name) XXX_DiscardUnknown()

func (*Name) XXX_Marshal

func (m *Name) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Name) XXX_Merge

func (m *Name) XXX_Merge(src proto.Message)

func (*Name) XXX_Size

func (m *Name) XXX_Size() int

func (*Name) XXX_Unmarshal

func (m *Name) XXX_Unmarshal(b []byte) error

type NameAndTemplate

type NameAndTemplate struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Template             *Record  `protobuf:"bytes,2,opt,name=template,proto3" json:"template,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

NameAndTemplate describes the name and template for a table.

func FromNameAndTemplate

func FromNameAndTemplate(name string, template record.Record) (*NameAndTemplate, error)

FromNameAndTemplate converts a string and a record.Record to a *NameAndTemplate.

func (*NameAndTemplate) Descriptor

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

func (*NameAndTemplate) GetName

func (m *NameAndTemplate) GetName() string

func (*NameAndTemplate) GetTemplate

func (m *NameAndTemplate) GetTemplate() *Record

func (*NameAndTemplate) ProtoMessage

func (*NameAndTemplate) ProtoMessage()

func (*NameAndTemplate) Reset

func (m *NameAndTemplate) Reset()

func (*NameAndTemplate) String

func (m *NameAndTemplate) String() string

func (*NameAndTemplate) XXX_DiscardUnknown

func (m *NameAndTemplate) XXX_DiscardUnknown()

func (*NameAndTemplate) XXX_Marshal

func (m *NameAndTemplate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NameAndTemplate) XXX_Merge

func (m *NameAndTemplate) XXX_Merge(src proto.Message)

func (*NameAndTemplate) XXX_Size

func (m *NameAndTemplate) XXX_Size() int

func (*NameAndTemplate) XXX_Unmarshal

func (m *NameAndTemplate) XXX_Unmarshal(b []byte) error

type NumberOfRecords

type NumberOfRecords struct {
	N                    int64    `protobuf:"varint,1,opt,name=n,proto3" json:"n,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

NumberOfRecords is the result of performing a task whose result is the number of records.

func FromInt64

func FromInt64(n int64) *NumberOfRecords

FromInt64 converts an int64 to a *NumberOfRecords.

func (*NumberOfRecords) Descriptor

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

func (*NumberOfRecords) GetN

func (m *NumberOfRecords) GetN() int64

func (*NumberOfRecords) ProtoMessage

func (*NumberOfRecords) ProtoMessage()

func (*NumberOfRecords) Reset

func (m *NumberOfRecords) Reset()

func (*NumberOfRecords) String

func (m *NumberOfRecords) String() string

func (*NumberOfRecords) XXX_DiscardUnknown

func (m *NumberOfRecords) XXX_DiscardUnknown()

func (*NumberOfRecords) XXX_Marshal

func (m *NumberOfRecords) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NumberOfRecords) XXX_Merge

func (m *NumberOfRecords) XXX_Merge(src proto.Message)

func (*NumberOfRecords) XXX_Size

func (m *NumberOfRecords) XXX_Size() int

func (*NumberOfRecords) XXX_Unmarshal

func (m *NumberOfRecords) XXX_Unmarshal(b []byte) error

type Order

type Order struct {
	Key                  string     `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Direction            *Direction `protobuf:"bytes,2,opt,name=direction,proto3" json:"direction,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

Order represents a sort order

func FromOrder

func FromOrder(s sort.Order) *Order

FromOrder converts a sort.Order to a *Order.

func (*Order) Descriptor

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

func (*Order) GetDirection

func (m *Order) GetDirection() *Direction

func (*Order) GetKey

func (m *Order) GetKey() string

func (*Order) ProtoMessage

func (*Order) ProtoMessage()

func (*Order) Reset

func (m *Order) Reset()

func (*Order) String

func (m *Order) String() string

func (*Order) XXX_DiscardUnknown

func (m *Order) XXX_DiscardUnknown()

func (*Order) XXX_Marshal

func (m *Order) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Order) XXX_Merge

func (m *Order) XXX_Merge(src proto.Message)

func (*Order) XXX_Size

func (m *Order) XXX_Size() int

func (*Order) XXX_Unmarshal

func (m *Order) XXX_Unmarshal(b []byte) error

type OrderBy

type OrderBy struct {
	Order                []*Order `protobuf:"bytes,1,rep,name=order,proto3" json:"order,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

OrderBy represents a sequence of sort orders

func FromOrderBy

func FromOrderBy(S sort.OrderBy) *OrderBy

FromOrderBy converts a sort.OrderBy to a *OrderBy.

func (*OrderBy) Descriptor

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

func (*OrderBy) GetOrder

func (m *OrderBy) GetOrder() []*Order

func (*OrderBy) ProtoMessage

func (*OrderBy) ProtoMessage()

func (*OrderBy) Reset

func (m *OrderBy) Reset()

func (*OrderBy) String

func (m *OrderBy) String() string

func (*OrderBy) XXX_DiscardUnknown

func (m *OrderBy) XXX_DiscardUnknown()

func (*OrderBy) XXX_Marshal

func (m *OrderBy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*OrderBy) XXX_Merge

func (m *OrderBy) XXX_Merge(src proto.Message)

func (*OrderBy) XXX_Size

func (m *OrderBy) XXX_Size() int

func (*OrderBy) XXX_Unmarshal

func (m *OrderBy) XXX_Unmarshal(b []byte) error

type Record

type Record struct {
	Values               map[string]*Value `` /* 153-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

Record is the type defining a record in a table. The keys of the map are the keys of the record, and the values of the map are the values of the record.

func FromRecord

func FromRecord(r record.Record) (*Record, error)

FromRecord converts a record.Record to a *Record.

func (*Record) Descriptor

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

func (*Record) GetValues

func (m *Record) GetValues() map[string]*Value

func (*Record) ProtoMessage

func (*Record) ProtoMessage()

func (*Record) Reset

func (m *Record) Reset()

func (*Record) String

func (m *Record) String() string

func (*Record) XXX_DiscardUnknown

func (m *Record) XXX_DiscardUnknown()

func (*Record) XXX_Marshal

func (m *Record) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Record) XXX_Merge

func (m *Record) XXX_Merge(src proto.Message)

func (*Record) XXX_Size

func (m *Record) XXX_Size() int

func (*Record) XXX_Unmarshal

func (m *Record) XXX_Unmarshal(b []byte) error

type SrcAndDstNames added in v0.1.29

type SrcAndDstNames struct {
	Src                  string   `protobuf:"bytes,1,opt,name=src,proto3" json:"src,omitempty"`
	Dst                  string   `protobuf:"bytes,2,opt,name=dst,proto3" json:"dst,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

SrcAndDstNames describes a pair of table names.

func FromSrcAndDst added in v0.1.29

func FromSrcAndDst(src string, dst string) *SrcAndDstNames

FromSrcAndDst converts a pair of strings to a *SrcAndDstNames.

func (*SrcAndDstNames) Descriptor added in v0.1.29

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

func (*SrcAndDstNames) GetDst added in v0.1.29

func (m *SrcAndDstNames) GetDst() string

func (*SrcAndDstNames) GetSrc added in v0.1.29

func (m *SrcAndDstNames) GetSrc() string

func (*SrcAndDstNames) ProtoMessage added in v0.1.29

func (*SrcAndDstNames) ProtoMessage()

func (*SrcAndDstNames) Reset added in v0.1.29

func (m *SrcAndDstNames) Reset()

func (*SrcAndDstNames) String added in v0.1.29

func (m *SrcAndDstNames) String() string

func (*SrcAndDstNames) XXX_DiscardUnknown added in v0.1.29

func (m *SrcAndDstNames) XXX_DiscardUnknown()

func (*SrcAndDstNames) XXX_Marshal added in v0.1.29

func (m *SrcAndDstNames) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SrcAndDstNames) XXX_Merge added in v0.1.29

func (m *SrcAndDstNames) XXX_Merge(src proto.Message)

func (*SrcAndDstNames) XXX_Size added in v0.1.29

func (m *SrcAndDstNames) XXX_Size() int

func (*SrcAndDstNames) XXX_Unmarshal added in v0.1.29

func (m *SrcAndDstNames) XXX_Unmarshal(b []byte) error

type TableNames

type TableNames struct {
	Name                 []string `protobuf:"bytes,1,rep,name=name,proto3" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

TableNames encodes a list of table names.

func (*TableNames) Descriptor

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

func (*TableNames) GetName

func (m *TableNames) GetName() []string

func (*TableNames) ProtoMessage

func (*TableNames) ProtoMessage()

func (*TableNames) Reset

func (m *TableNames) Reset()

func (*TableNames) String

func (m *TableNames) String() string

func (*TableNames) XXX_DiscardUnknown

func (m *TableNames) XXX_DiscardUnknown()

func (*TableNames) XXX_Marshal

func (m *TableNames) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TableNames) XXX_Merge

func (m *TableNames) XXX_Merge(src proto.Message)

func (*TableNames) XXX_Size

func (m *TableNames) XXX_Size() int

func (*TableNames) XXX_Unmarshal

func (m *TableNames) XXX_Unmarshal(b []byte) error

type UnimplementedKvdbServer

type UnimplementedKvdbServer struct {
}

UnimplementedKvdbServer can be embedded to have forward compatible implementations.

func (*UnimplementedKvdbServer) AddIndex

func (*UnimplementedKvdbServer) AddIndex(ctx context.Context, req *Index) (*emptypb.Empty, error)

func (*UnimplementedKvdbServer) AddKeys added in v0.1.29

func (*UnimplementedKvdbServer) AddUniqueIndex

func (*UnimplementedKvdbServer) AddUniqueIndex(ctx context.Context, req *Index) (*emptypb.Empty, error)

func (*UnimplementedKvdbServer) CountWhere

func (*UnimplementedKvdbServer) CreateTable

func (*UnimplementedKvdbServer) DeleteIndex

func (*UnimplementedKvdbServer) DeleteIndex(ctx context.Context, req *Index) (*emptypb.Empty, error)

func (*UnimplementedKvdbServer) DeleteKeys added in v0.1.29

func (*UnimplementedKvdbServer) DeleteKeys(ctx context.Context, req *KeyList) (*emptypb.Empty, error)

func (*UnimplementedKvdbServer) DeleteTable

func (*UnimplementedKvdbServer) DeleteTable(ctx context.Context, req *Name) (*emptypb.Empty, error)

func (*UnimplementedKvdbServer) DeleteWhere

func (*UnimplementedKvdbServer) DescribeTable

func (*UnimplementedKvdbServer) DescribeTable(ctx context.Context, req *emptypb.Empty) (*Record, error)

func (*UnimplementedKvdbServer) Insert

func (*UnimplementedKvdbServer) ListIndices

func (*UnimplementedKvdbServer) ListIndices(ctx context.Context, req *emptypb.Empty) (*IndexList, error)

func (*UnimplementedKvdbServer) ListTables

func (*UnimplementedKvdbServer) RenameTable added in v0.1.29

func (*UnimplementedKvdbServer) SelectWhereLimit

func (*UnimplementedKvdbServer) UpdateWhere

type Value

type Value struct {
	Type Value_Type `protobuf:"varint,1,opt,name=type,proto3,enum=kvdb.Value_Type" json:"type,omitempty"`
	// Types that are valid to be assigned to Value:
	//	*Value_Int32Value
	//	*Value_Int64Value
	//	*Value_Uint32Value
	//	*Value_Uint64Value
	//	*Value_BoolValue
	//	*Value_DoubleValue
	//	*Value_StringValue
	//	*Value_BytesValue
	Value                isValue_Value `protobuf_oneof:"value"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

Value describes a value in a record.

func (*Value) Descriptor

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

func (*Value) GetBoolValue

func (m *Value) GetBoolValue() bool

func (*Value) GetBytesValue

func (m *Value) GetBytesValue() []byte

func (*Value) GetDoubleValue

func (m *Value) GetDoubleValue() float64

func (*Value) GetInt32Value

func (m *Value) GetInt32Value() int32

func (*Value) GetInt64Value

func (m *Value) GetInt64Value() int64

func (*Value) GetStringValue

func (m *Value) GetStringValue() string

func (*Value) GetType

func (m *Value) GetType() Value_Type

func (*Value) GetUint32Value

func (m *Value) GetUint32Value() uint32

func (*Value) GetUint64Value

func (m *Value) GetUint64Value() uint64

func (*Value) GetValue

func (m *Value) GetValue() isValue_Value

func (*Value) ProtoMessage

func (*Value) ProtoMessage()

func (*Value) Reset

func (m *Value) Reset()

func (*Value) String

func (m *Value) String() string

func (*Value) XXX_DiscardUnknown

func (m *Value) XXX_DiscardUnknown()

func (*Value) XXX_Marshal

func (m *Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Value) XXX_Merge

func (m *Value) XXX_Merge(src proto.Message)

func (*Value) XXX_OneofWrappers

func (*Value) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*Value) XXX_Size

func (m *Value) XXX_Size() int

func (*Value) XXX_Unmarshal

func (m *Value) XXX_Unmarshal(b []byte) error

type Value_BoolValue

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

type Value_BytesValue

type Value_BytesValue struct {
	BytesValue []byte `protobuf:"bytes,9,opt,name=bytes_value,json=bytesValue,proto3,oneof"`
}

type Value_DoubleValue

type Value_DoubleValue struct {
	DoubleValue float64 `protobuf:"fixed64,7,opt,name=double_value,json=doubleValue,proto3,oneof"`
}

type Value_Int32Value

type Value_Int32Value struct {
	Int32Value int32 `protobuf:"varint,2,opt,name=int32_value,json=int32Value,proto3,oneof"`
}

type Value_Int64Value

type Value_Int64Value struct {
	Int64Value int64 `protobuf:"varint,3,opt,name=int64_value,json=int64Value,proto3,oneof"`
}

type Value_StringValue

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

type Value_Type

type Value_Type int32

Type enumerates the possible value types

const (
	Value_UNDEFINED Value_Type = 0
	Value_INT       Value_Type = 1
	Value_INT8      Value_Type = 2
	Value_INT16     Value_Type = 3
	Value_INT32     Value_Type = 4
	Value_INT64     Value_Type = 5
	Value_UINT      Value_Type = 6
	Value_UINT8     Value_Type = 7
	Value_UINT16    Value_Type = 8
	Value_UINT32    Value_Type = 9
	Value_UINT64    Value_Type = 10
	Value_BOOL      Value_Type = 11
	Value_FLOAT64   Value_Type = 12
	Value_STRING    Value_Type = 13
	Value_BYTESLICE Value_Type = 14
)

func (Value_Type) EnumDescriptor

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

func (Value_Type) String

func (x Value_Type) String() string

type Value_Uint32Value

type Value_Uint32Value struct {
	Uint32Value uint32 `protobuf:"varint,4,opt,name=uint32_value,json=uint32Value,proto3,oneof"`
}

type Value_Uint64Value

type Value_Uint64Value struct {
	Uint64Value uint64 `protobuf:"varint,5,opt,name=uint64_value,json=uint64Value,proto3,oneof"`
}

Jump to

Keyboard shortcuts

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