ankadbpb

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2018 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CODE_name = map[int32]string{
	0:     "OK",
	1:     "VAR_PARSE_ERR",
	2:     "LOGIC_ONQUERY_ERR",
	3:     "CTX_CURDB_ERR",
	4:     "PROTOBUF_ENCODE_ERR",
	5:     "DB_PUT_ERR",
	6:     "RESULT_NO_DATA",
	7:     "RESULT_DATA_INVALID",
	8:     "INPUTOBJ_PARSE_ERR",
	9:     "ONQUERYSTREAM_ERR",
	10:    "CTX_ANKADB_ERR",
	11:    "TIMEZONE_ERR",
	12:    "CTX_SNAPSHOTMGR_ERR",
	13:    "MAKE_SNAPSHOT_ERR",
	14:    "QUERY_PARAM_ERR",
	200:   "LOADFILE_INVALID_FILEREADSIZE",
	10000: "INIT_NEW_DBMGR_ERR",
	10001: "INIT_NEW_GRPCSERV_ERR",
	10002: "INIT_NEW_HTTPSERV_ERR",
	100:   "HTTP_BODY_PARSE_ERR",
	101:   "HTTP_NO_QUERY",
	102:   "HTTP_VARIABLE_ERR",
	20000: "CLIENT_NO_CONN",
	30000: "INVALID_CODE",
	50000: "QUERY_INVALID_RESULT_DATA_OBJ",
	50001: "QUERY_INVALID_RESULT_DATA_MSG",
	50002: "QUERY_ERR_MSG_TO_JSON",
}
View Source
var CODE_value = map[string]int32{
	"OK":                            0,
	"VAR_PARSE_ERR":                 1,
	"LOGIC_ONQUERY_ERR":             2,
	"CTX_CURDB_ERR":                 3,
	"PROTOBUF_ENCODE_ERR":           4,
	"DB_PUT_ERR":                    5,
	"RESULT_NO_DATA":                6,
	"RESULT_DATA_INVALID":           7,
	"INPUTOBJ_PARSE_ERR":            8,
	"ONQUERYSTREAM_ERR":             9,
	"CTX_ANKADB_ERR":                10,
	"TIMEZONE_ERR":                  11,
	"CTX_SNAPSHOTMGR_ERR":           12,
	"MAKE_SNAPSHOT_ERR":             13,
	"QUERY_PARAM_ERR":               14,
	"LOADFILE_INVALID_FILEREADSIZE": 200,
	"INIT_NEW_DBMGR_ERR":            10000,
	"INIT_NEW_GRPCSERV_ERR":         10001,
	"INIT_NEW_HTTPSERV_ERR":         10002,
	"HTTP_BODY_PARSE_ERR":           100,
	"HTTP_NO_QUERY":                 101,
	"HTTP_VARIABLE_ERR":             102,
	"CLIENT_NO_CONN":                20000,
	"INVALID_CODE":                  30000,
	"QUERY_INVALID_RESULT_DATA_OBJ": 50000,
	"QUERY_INVALID_RESULT_DATA_MSG": 50001,
	"QUERY_ERR_MSG_TO_JSON":         50002,
}

Functions

func RegisterAnkaDBServServer

func RegisterAnkaDBServServer(s *grpc.Server, srv AnkaDBServServer)

Types

type AnkaDBServClient

type AnkaDBServClient interface {
	Query(ctx context.Context, in *Query, opts ...grpc.CallOption) (*ReplyQuery, error)
	QueryStream(ctx context.Context, in *Query, opts ...grpc.CallOption) (AnkaDBServ_QueryStreamClient, error)
}

AnkaDBServClient is the client API for AnkaDBServ service.

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

func NewAnkaDBServClient

func NewAnkaDBServClient(cc *grpc.ClientConn) AnkaDBServClient

type AnkaDBServServer

type AnkaDBServServer interface {
	Query(context.Context, *Query) (*ReplyQuery, error)
	QueryStream(*Query, AnkaDBServ_QueryStreamServer) error
}

AnkaDBServServer is the server API for AnkaDBServ service.

type AnkaDBServ_QueryStreamClient

type AnkaDBServ_QueryStreamClient interface {
	Recv() (*ReplyQuery, error)
	grpc.ClientStream
}

type AnkaDBServ_QueryStreamServer

type AnkaDBServ_QueryStreamServer interface {
	Send(*ReplyQuery) error
	grpc.ServerStream
}

type CODE

type CODE int32
const (
	CODE_OK                            CODE = 0
	CODE_VAR_PARSE_ERR                 CODE = 1
	CODE_LOGIC_ONQUERY_ERR             CODE = 2
	CODE_CTX_CURDB_ERR                 CODE = 3
	CODE_PROTOBUF_ENCODE_ERR           CODE = 4
	CODE_DB_PUT_ERR                    CODE = 5
	CODE_RESULT_NO_DATA                CODE = 6
	CODE_RESULT_DATA_INVALID           CODE = 7
	CODE_INPUTOBJ_PARSE_ERR            CODE = 8
	CODE_ONQUERYSTREAM_ERR             CODE = 9
	CODE_CTX_ANKADB_ERR                CODE = 10
	CODE_TIMEZONE_ERR                  CODE = 11
	CODE_CTX_SNAPSHOTMGR_ERR           CODE = 12
	CODE_MAKE_SNAPSHOT_ERR             CODE = 13
	CODE_QUERY_PARAM_ERR               CODE = 14
	CODE_LOADFILE_INVALID_FILEREADSIZE CODE = 200
	CODE_INIT_NEW_DBMGR_ERR            CODE = 10000
	CODE_INIT_NEW_GRPCSERV_ERR         CODE = 10001
	CODE_INIT_NEW_HTTPSERV_ERR         CODE = 10002
	CODE_HTTP_BODY_PARSE_ERR           CODE = 100
	CODE_HTTP_NO_QUERY                 CODE = 101
	CODE_HTTP_VARIABLE_ERR             CODE = 102
	CODE_CLIENT_NO_CONN                CODE = 20000
	CODE_INVALID_CODE                  CODE = 30000
	CODE_QUERY_INVALID_RESULT_DATA_OBJ CODE = 50000
	CODE_QUERY_INVALID_RESULT_DATA_MSG CODE = 50001
	CODE_QUERY_ERR_MSG_TO_JSON         CODE = 50002
)

func (CODE) EnumDescriptor

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

func (CODE) String

func (x CODE) String() string

type Query

type Query struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Deprecated: Do not use.
	QueryData            string   `protobuf:"bytes,2,opt,name=queryData,proto3" json:"queryData,omitempty"`
	VarData              string   `protobuf:"bytes,3,opt,name=varData,proto3" json:"varData,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Query) Descriptor

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

func (*Query) GetName deprecated

func (m *Query) GetName() string

Deprecated: Do not use.

func (*Query) GetQueryData

func (m *Query) GetQueryData() string

func (*Query) GetVarData

func (m *Query) GetVarData() string

func (*Query) ProtoMessage

func (*Query) ProtoMessage()

func (*Query) Reset

func (m *Query) Reset()

func (*Query) String

func (m *Query) String() string

func (*Query) XXX_DiscardUnknown

func (m *Query) XXX_DiscardUnknown()

func (*Query) XXX_Marshal

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

func (*Query) XXX_Merge

func (dst *Query) XXX_Merge(src proto.Message)

func (*Query) XXX_Size

func (m *Query) XXX_Size() int

func (*Query) XXX_Unmarshal

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

type ReplyQuery

type ReplyQuery struct {
	Code                 CODE     `protobuf:"varint,1,opt,name=code,proto3,enum=ankadbpb.CODE" json:"code,omitempty"`
	Err                  string   `protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"`
	Result               string   `protobuf:"bytes,3,opt,name=result,proto3" json:"result,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ReplyQuery) Descriptor

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

func (*ReplyQuery) GetCode

func (m *ReplyQuery) GetCode() CODE

func (*ReplyQuery) GetErr

func (m *ReplyQuery) GetErr() string

func (*ReplyQuery) GetResult

func (m *ReplyQuery) GetResult() string

func (*ReplyQuery) ProtoMessage

func (*ReplyQuery) ProtoMessage()

func (*ReplyQuery) Reset

func (m *ReplyQuery) Reset()

func (*ReplyQuery) String

func (m *ReplyQuery) String() string

func (*ReplyQuery) XXX_DiscardUnknown

func (m *ReplyQuery) XXX_DiscardUnknown()

func (*ReplyQuery) XXX_Marshal

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

func (*ReplyQuery) XXX_Merge

func (dst *ReplyQuery) XXX_Merge(src proto.Message)

func (*ReplyQuery) XXX_Size

func (m *ReplyQuery) XXX_Size() int

func (*ReplyQuery) XXX_Unmarshal

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

type Snapshot

type Snapshot struct {
	SnapshotID           int64    `protobuf:"varint,1,opt,name=snapshotID,proto3" json:"snapshotID,omitempty"`
	Keys                 []string `protobuf:"bytes,2,rep,name=keys,proto3" json:"keys,omitempty"`
	CreateTime           int64    `protobuf:"varint,3,opt,name=createTime,proto3" json:"createTime,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Snapshot) Descriptor

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

func (*Snapshot) GetCreateTime

func (m *Snapshot) GetCreateTime() int64

func (*Snapshot) GetKeys

func (m *Snapshot) GetKeys() []string

func (*Snapshot) GetSnapshotID

func (m *Snapshot) GetSnapshotID() int64

func (*Snapshot) ProtoMessage

func (*Snapshot) ProtoMessage()

func (*Snapshot) Reset

func (m *Snapshot) Reset()

func (*Snapshot) String

func (m *Snapshot) String() string

func (*Snapshot) XXX_DiscardUnknown

func (m *Snapshot) XXX_DiscardUnknown()

func (*Snapshot) XXX_Marshal

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

func (*Snapshot) XXX_Merge

func (dst *Snapshot) XXX_Merge(src proto.Message)

func (*Snapshot) XXX_Size

func (m *Snapshot) XXX_Size() int

func (*Snapshot) XXX_Unmarshal

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

type SnapshotMgr

type SnapshotMgr struct {
	MaxSnapshotID        int64    `protobuf:"varint,1,opt,name=maxSnapshotID,proto3" json:"maxSnapshotID,omitempty"`
	Snapshots            []int64  `protobuf:"varint,2,rep,packed,name=snapshots,proto3" json:"snapshots,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SnapshotMgr) Descriptor

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

func (*SnapshotMgr) GetMaxSnapshotID

func (m *SnapshotMgr) GetMaxSnapshotID() int64

func (*SnapshotMgr) GetSnapshots

func (m *SnapshotMgr) GetSnapshots() []int64

func (*SnapshotMgr) ProtoMessage

func (*SnapshotMgr) ProtoMessage()

func (*SnapshotMgr) Reset

func (m *SnapshotMgr) Reset()

func (*SnapshotMgr) String

func (m *SnapshotMgr) String() string

func (*SnapshotMgr) XXX_DiscardUnknown

func (m *SnapshotMgr) XXX_DiscardUnknown()

func (*SnapshotMgr) XXX_Marshal

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

func (*SnapshotMgr) XXX_Merge

func (dst *SnapshotMgr) XXX_Merge(src proto.Message)

func (*SnapshotMgr) XXX_Size

func (m *SnapshotMgr) XXX_Size() int

func (*SnapshotMgr) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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