ankadbpb

package
v0.3.35 Latest Latest
Warning

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

Go to latest
Published: May 7, 2021 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterAnkaDBServServer

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

Types

type AnkaDBServClient

type AnkaDBServClient interface {
	// query in graphQL
	Query(ctx context.Context, in *Query, opts ...grpc.CallOption) (*ReplyQuery, error)
	// query in graphQL
	SetQueryTemplate(ctx context.Context, in *QueryTemplate, opts ...grpc.CallOption) (*ReplyQueryTemplate, error)
	// get
	Get(ctx context.Context, in *GetValue, opts ...grpc.CallOption) (*ReplyGetValue, error)
	// set
	Set(ctx context.Context, in *SetValue, opts ...grpc.CallOption) (*ReplySetValue, 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 in graphQL
	Query(context.Context, *Query) (*ReplyQuery, error)
	// query in graphQL
	SetQueryTemplate(context.Context, *QueryTemplate) (*ReplyQueryTemplate, error)
	// get
	Get(context.Context, *GetValue) (*ReplyGetValue, error)
	// set
	Set(context.Context, *SetValue) (*ReplySetValue, error)
}

AnkaDBServServer is the server API for AnkaDBServ service.

type GetValue added in v0.3.13

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

key-value的get请求 get value in key-value

func (*GetValue) Descriptor added in v0.3.13

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

func (*GetValue) GetKey added in v0.3.13

func (m *GetValue) GetKey() string

func (*GetValue) GetNameDB added in v0.3.13

func (m *GetValue) GetNameDB() string

func (*GetValue) ProtoMessage added in v0.3.13

func (*GetValue) ProtoMessage()

func (*GetValue) Reset added in v0.3.13

func (m *GetValue) Reset()

func (*GetValue) String added in v0.3.13

func (m *GetValue) String() string

func (*GetValue) XXX_DiscardUnknown added in v0.3.13

func (m *GetValue) XXX_DiscardUnknown()

func (*GetValue) XXX_Marshal added in v0.3.13

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

func (*GetValue) XXX_Merge added in v0.3.13

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

func (*GetValue) XXX_Size added in v0.3.13

func (m *GetValue) XXX_Size() int

func (*GetValue) XXX_Unmarshal added in v0.3.13

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

type Query

type Query struct {
	QueryData string `protobuf:"bytes,1,opt,name=queryData,proto3" json:"queryData,omitempty"`
	VarData   string `protobuf:"bytes,2,opt,name=varData,proto3" json:"varData,omitempty"`
	// 如果queryTemplateName不为空,表示会更新queryTemplate
	// 注意,queryTemplateName要唯一
	// 也可以只给queryTemplateName,不给queryData
	// 如果同时给queryData和queryTemplateName,效率会低于只传queryTemplateName
	// If the queryTemplateName is not empty, it means that the queryTemplate will be updated.
	// Note the queryTemplateName is unique
	// can also only give queryTemplateName, not to queryData
	// If you give queryData and queryTemplateName at the same time,
	// the efficiency will be lower than only the queryTemplateName
	QueryTemplateName    string   `protobuf:"bytes,3,opt,name=queryTemplateName,proto3" json:"queryTemplateName,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

graphQL请求 graphQL query

func (*Query) Descriptor

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

func (*Query) GetQueryData

func (m *Query) GetQueryData() string

func (*Query) GetQueryTemplateName added in v0.3.26

func (m *Query) GetQueryTemplateName() 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 QueryTemplate added in v0.3.26

type QueryTemplate struct {
	// 注意,queryTemplateName要唯一
	// Note the queryTemplateName is unique
	QueryTemplateName    string   `protobuf:"bytes,1,opt,name=queryTemplateName,proto3" json:"queryTemplateName,omitempty"`
	QueryData            string   `protobuf:"bytes,2,opt,name=queryData,proto3" json:"queryData,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

设置graphQL请求模板 set graphQL query template

func (*QueryTemplate) Descriptor added in v0.3.26

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

func (*QueryTemplate) GetQueryData added in v0.3.26

func (m *QueryTemplate) GetQueryData() string

func (*QueryTemplate) GetQueryTemplateName added in v0.3.26

func (m *QueryTemplate) GetQueryTemplateName() string

func (*QueryTemplate) ProtoMessage added in v0.3.26

func (*QueryTemplate) ProtoMessage()

func (*QueryTemplate) Reset added in v0.3.26

func (m *QueryTemplate) Reset()

func (*QueryTemplate) String added in v0.3.26

func (m *QueryTemplate) String() string

func (*QueryTemplate) XXX_DiscardUnknown added in v0.3.26

func (m *QueryTemplate) XXX_DiscardUnknown()

func (*QueryTemplate) XXX_Marshal added in v0.3.26

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

func (*QueryTemplate) XXX_Merge added in v0.3.26

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

func (*QueryTemplate) XXX_Size added in v0.3.26

func (m *QueryTemplate) XXX_Size() int

func (*QueryTemplate) XXX_Unmarshal added in v0.3.26

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

type ReplyGetValue added in v0.3.13

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

key-value的get请求的返回 reply of get value in key-value

func (*ReplyGetValue) Descriptor added in v0.3.13

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

func (*ReplyGetValue) GetErr added in v0.3.13

func (m *ReplyGetValue) GetErr() string

func (*ReplyGetValue) GetValue added in v0.3.13

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

func (*ReplyGetValue) ProtoMessage added in v0.3.13

func (*ReplyGetValue) ProtoMessage()

func (*ReplyGetValue) Reset added in v0.3.13

func (m *ReplyGetValue) Reset()

func (*ReplyGetValue) String added in v0.3.13

func (m *ReplyGetValue) String() string

func (*ReplyGetValue) XXX_DiscardUnknown added in v0.3.13

func (m *ReplyGetValue) XXX_DiscardUnknown()

func (*ReplyGetValue) XXX_Marshal added in v0.3.13

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

func (*ReplyGetValue) XXX_Merge added in v0.3.13

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

func (*ReplyGetValue) XXX_Size added in v0.3.13

func (m *ReplyGetValue) XXX_Size() int

func (*ReplyGetValue) XXX_Unmarshal added in v0.3.13

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

type ReplyQuery

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

graphQL请求的返回 reply of graphQL query

func (*ReplyQuery) Descriptor

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

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 ReplyQueryTemplate added in v0.3.26

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

设置graphQL请求模板的返回 reply of QueryTemplate

func (*ReplyQueryTemplate) Descriptor added in v0.3.26

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

func (*ReplyQueryTemplate) GetErr added in v0.3.26

func (m *ReplyQueryTemplate) GetErr() string

func (*ReplyQueryTemplate) ProtoMessage added in v0.3.26

func (*ReplyQueryTemplate) ProtoMessage()

func (*ReplyQueryTemplate) Reset added in v0.3.26

func (m *ReplyQueryTemplate) Reset()

func (*ReplyQueryTemplate) String added in v0.3.26

func (m *ReplyQueryTemplate) String() string

func (*ReplyQueryTemplate) XXX_DiscardUnknown added in v0.3.26

func (m *ReplyQueryTemplate) XXX_DiscardUnknown()

func (*ReplyQueryTemplate) XXX_Marshal added in v0.3.26

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

func (*ReplyQueryTemplate) XXX_Merge added in v0.3.26

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

func (*ReplyQueryTemplate) XXX_Size added in v0.3.26

func (m *ReplyQueryTemplate) XXX_Size() int

func (*ReplyQueryTemplate) XXX_Unmarshal added in v0.3.26

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

type ReplySetValue added in v0.3.13

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

key-value的set请求的返回 reply of set value in key-value

func (*ReplySetValue) Descriptor added in v0.3.13

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

func (*ReplySetValue) GetErr added in v0.3.13

func (m *ReplySetValue) GetErr() string

func (*ReplySetValue) ProtoMessage added in v0.3.13

func (*ReplySetValue) ProtoMessage()

func (*ReplySetValue) Reset added in v0.3.13

func (m *ReplySetValue) Reset()

func (*ReplySetValue) String added in v0.3.13

func (m *ReplySetValue) String() string

func (*ReplySetValue) XXX_DiscardUnknown added in v0.3.13

func (m *ReplySetValue) XXX_DiscardUnknown()

func (*ReplySetValue) XXX_Marshal added in v0.3.13

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

func (*ReplySetValue) XXX_Merge added in v0.3.13

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

func (*ReplySetValue) XXX_Size added in v0.3.13

func (m *ReplySetValue) XXX_Size() int

func (*ReplySetValue) XXX_Unmarshal added in v0.3.13

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

type SetValue added in v0.3.13

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

key-value的set请求 set value in key-value

func (*SetValue) Descriptor added in v0.3.13

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

func (*SetValue) GetKey added in v0.3.13

func (m *SetValue) GetKey() string

func (*SetValue) GetNameDB added in v0.3.13

func (m *SetValue) GetNameDB() string

func (*SetValue) GetValue added in v0.3.13

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

func (*SetValue) ProtoMessage added in v0.3.13

func (*SetValue) ProtoMessage()

func (*SetValue) Reset added in v0.3.13

func (m *SetValue) Reset()

func (*SetValue) String added in v0.3.13

func (m *SetValue) String() string

func (*SetValue) XXX_DiscardUnknown added in v0.3.13

func (m *SetValue) XXX_DiscardUnknown()

func (*SetValue) XXX_Marshal added in v0.3.13

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

func (*SetValue) XXX_Merge added in v0.3.13

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

func (*SetValue) XXX_Size added in v0.3.13

func (m *SetValue) XXX_Size() int

func (*SetValue) XXX_Unmarshal added in v0.3.13

func (m *SetValue) 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