gravity_api_querykit

package
v0.2.28 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DataType_name = map[int32]string{
	0: "BOOLEAN",
	1: "BINARY",
	2: "STRING",
	3: "UINT64",
	4: "INT64",
	5: "FLOAT64",
	6: "ARRAY",
	7: "MAP",
}
View Source
var DataType_value = map[string]int32{
	"BOOLEAN": 0,
	"BINARY":  1,
	"STRING":  2,
	"UINT64":  3,
	"INT64":   4,
	"FLOAT64": 5,
	"ARRAY":   6,
	"MAP":     7,
}
View Source
var Operator_name = map[int32]string{
	0: "EQUAL",
	1: "GREATER_THAN",
	2: "GREATER_EQUAL",
	3: "LESS_THAN",
	4: "LESS_EQUAL",
	5: "AND",
	6: "OR",
	7: "NOT_EQUAL",
	8: "IS_EXIST",
}
View Source
var Operator_value = map[string]int32{
	"EQUAL":         0,
	"GREATER_THAN":  1,
	"GREATER_EQUAL": 2,
	"LESS_THAN":     3,
	"LESS_EQUAL":    4,
	"AND":           5,
	"OR":            6,
	"NOT_EQUAL":     7,
	"IS_EXIST":      8,
}

Functions

func RegisterQueryKitServer

func RegisterQueryKitServer(s *grpc.Server, srv QueryKitServer)

Types

type ArrayValue

type ArrayValue struct {
	Elements             []*Value `protobuf:"bytes,1,rep,name=elements,proto3" json:"elements,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ArrayValue) Descriptor

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

func (*ArrayValue) GetElements

func (m *ArrayValue) GetElements() []*Value

func (*ArrayValue) ProtoMessage

func (*ArrayValue) ProtoMessage()

func (*ArrayValue) Reset

func (m *ArrayValue) Reset()

func (*ArrayValue) String

func (m *ArrayValue) String() string

func (*ArrayValue) XXX_DiscardUnknown

func (m *ArrayValue) XXX_DiscardUnknown()

func (*ArrayValue) XXX_Marshal

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

func (*ArrayValue) XXX_Merge

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

func (*ArrayValue) XXX_Size

func (m *ArrayValue) XXX_Size() int

func (*ArrayValue) XXX_Unmarshal

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

type Condition

type Condition struct {
	Name                 string       `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Value                *Value       `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	Operator             Operator     `protobuf:"varint,3,opt,name=operator,proto3,enum=gravity.api.querykit.Operator" json:"operator,omitempty"`
	Conditions           []*Condition `protobuf:"bytes,4,rep,name=conditions,proto3" json:"conditions,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*Condition) Descriptor

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

func (*Condition) GetConditions

func (m *Condition) GetConditions() []*Condition

func (*Condition) GetName

func (m *Condition) GetName() string

func (*Condition) GetOperator

func (m *Condition) GetOperator() Operator

func (*Condition) GetValue

func (m *Condition) GetValue() *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_Size

func (m *Condition) XXX_Size() int

func (*Condition) XXX_Unmarshal

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

type DataType

type DataType int32
const (
	DataType_BOOLEAN DataType = 0
	DataType_BINARY  DataType = 1
	DataType_STRING  DataType = 2
	DataType_UINT64  DataType = 3
	DataType_INT64   DataType = 4
	DataType_FLOAT64 DataType = 5
	DataType_ARRAY   DataType = 6
	DataType_MAP     DataType = 7
)

func (DataType) EnumDescriptor

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

func (DataType) String

func (x DataType) String() string

type Field

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

func (*Field) Descriptor

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

func (*Field) GetName

func (m *Field) GetName() string

func (*Field) GetValue

func (m *Field) GetValue() *Value

func (*Field) ProtoMessage

func (*Field) ProtoMessage()

func (*Field) Reset

func (m *Field) Reset()

func (*Field) String

func (m *Field) String() string

func (*Field) XXX_DiscardUnknown

func (m *Field) XXX_DiscardUnknown()

func (*Field) XXX_Marshal

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

func (*Field) XXX_Merge

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

func (*Field) XXX_Size

func (m *Field) XXX_Size() int

func (*Field) XXX_Unmarshal

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

type MapValue

type MapValue struct {
	Fields               []*Field `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*MapValue) Descriptor

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

func (*MapValue) GetFields

func (m *MapValue) GetFields() []*Field

func (*MapValue) ProtoMessage

func (*MapValue) ProtoMessage()

func (*MapValue) Reset

func (m *MapValue) Reset()

func (*MapValue) String

func (m *MapValue) String() string

func (*MapValue) XXX_DiscardUnknown

func (m *MapValue) XXX_DiscardUnknown()

func (*MapValue) XXX_Marshal

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

func (*MapValue) XXX_Merge

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

func (*MapValue) XXX_Size

func (m *MapValue) XXX_Size() int

func (*MapValue) XXX_Unmarshal

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

type Operator

type Operator int32
const (
	Operator_EQUAL         Operator = 0
	Operator_GREATER_THAN  Operator = 1
	Operator_GREATER_EQUAL Operator = 2
	Operator_LESS_THAN     Operator = 3
	Operator_LESS_EQUAL    Operator = 4
	Operator_AND           Operator = 5
	Operator_OR            Operator = 6
	Operator_NOT_EQUAL     Operator = 7
	Operator_IS_EXIST      Operator = 8
)

func (Operator) EnumDescriptor

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

func (Operator) String

func (x Operator) String() string

type QueryKitClient

type QueryKitClient interface {
	Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryReply, error)
}

QueryKitClient is the client API for QueryKit service.

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

func NewQueryKitClient

func NewQueryKitClient(cc *grpc.ClientConn) QueryKitClient

type QueryKitServer

type QueryKitServer interface {
	Query(context.Context, *QueryRequest) (*QueryReply, error)
}

QueryKitServer is the server API for QueryKit service.

type QueryReply

type QueryReply struct {
	Success              bool      `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	Reason               string    `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"`
	Records              []*Record `protobuf:"bytes,3,rep,name=records,proto3" json:"records,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

func (*QueryReply) Descriptor

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

func (*QueryReply) GetReason

func (m *QueryReply) GetReason() string

func (*QueryReply) GetRecords

func (m *QueryReply) GetRecords() []*Record

func (*QueryReply) GetSuccess

func (m *QueryReply) GetSuccess() bool

func (*QueryReply) ProtoMessage

func (*QueryReply) ProtoMessage()

func (*QueryReply) Reset

func (m *QueryReply) Reset()

func (*QueryReply) String

func (m *QueryReply) String() string

func (*QueryReply) XXX_DiscardUnknown

func (m *QueryReply) XXX_DiscardUnknown()

func (*QueryReply) XXX_Marshal

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

func (*QueryReply) XXX_Merge

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

func (*QueryReply) XXX_Size

func (m *QueryReply) XXX_Size() int

func (*QueryReply) XXX_Unmarshal

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

type QueryRequest

type QueryRequest struct {
	Table                string     `protobuf:"bytes,1,opt,name=table,proto3" json:"table,omitempty"`
	Condition            *Condition `protobuf:"bytes,2,opt,name=condition,proto3" json:"condition,omitempty"`
	Limit                int64      `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
	Offset               int64      `protobuf:"varint,4,opt,name=offset,proto3" json:"offset,omitempty"`
	OrderBy              string     `protobuf:"bytes,5,opt,name=orderBy,proto3" json:"orderBy,omitempty"`
	Descending           bool       `protobuf:"varint,6,opt,name=descending,proto3" json:"descending,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

func (*QueryRequest) Descriptor

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

func (*QueryRequest) GetCondition

func (m *QueryRequest) GetCondition() *Condition

func (*QueryRequest) GetDescending

func (m *QueryRequest) GetDescending() bool

func (*QueryRequest) GetLimit

func (m *QueryRequest) GetLimit() int64

func (*QueryRequest) GetOffset

func (m *QueryRequest) GetOffset() int64

func (*QueryRequest) GetOrderBy

func (m *QueryRequest) GetOrderBy() string

func (*QueryRequest) GetTable

func (m *QueryRequest) GetTable() string

func (*QueryRequest) ProtoMessage

func (*QueryRequest) ProtoMessage()

func (*QueryRequest) Reset

func (m *QueryRequest) Reset()

func (*QueryRequest) String

func (m *QueryRequest) String() string

func (*QueryRequest) XXX_DiscardUnknown

func (m *QueryRequest) XXX_DiscardUnknown()

func (*QueryRequest) XXX_Marshal

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

func (*QueryRequest) XXX_Merge

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

func (*QueryRequest) XXX_Size

func (m *QueryRequest) XXX_Size() int

func (*QueryRequest) XXX_Unmarshal

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

type Record

type Record struct {
	Fields               []*Field `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Record) Descriptor

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

func (*Record) GetFields

func (m *Record) GetFields() []*Field

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 UnimplementedQueryKitServer

type UnimplementedQueryKitServer struct {
}

UnimplementedQueryKitServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryKitServer) Query

type Value

type Value struct {
	Type                 DataType    `protobuf:"varint,1,opt,name=type,proto3,enum=gravity.api.querykit.DataType" json:"type,omitempty"`
	Value                []byte      `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	Map                  *MapValue   `protobuf:"bytes,3,opt,name=map,proto3" json:"map,omitempty"`
	Array                *ArrayValue `protobuf:"bytes,4,opt,name=array,proto3" json:"array,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (*Value) Descriptor

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

func (*Value) GetArray

func (m *Value) GetArray() *ArrayValue

func (*Value) GetMap

func (m *Value) GetMap() *MapValue

func (*Value) GetType

func (m *Value) GetType() DataType

func (*Value) GetValue

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

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_Size

func (m *Value) XXX_Size() int

func (*Value) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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