Documentation ¶
Index ¶
- Variables
- func RegisterGreeterServer(s *grpc.Server, srv GreeterServer)
- type Attri
- func (*Attri) Descriptor() ([]byte, []int)
- func (m *Attri) GetAuthor() string
- func (m *Attri) GetTime() string
- func (m *Attri) GetTitle() string
- func (m *Attri) GetTs() int64
- func (m *Attri) Marshal() (dAtA []byte, err error)
- func (m *Attri) MarshalTo(dAtA []byte) (int, error)
- func (*Attri) ProtoMessage()
- func (m *Attri) Reset()
- func (m *Attri) Size() (n int)
- func (m *Attri) String() string
- func (m *Attri) Unmarshal(dAtA []byte) error
- func (m *Attri) XXX_DiscardUnknown()
- func (m *Attri) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Attri) XXX_Merge(src proto.Message)
- func (m *Attri) XXX_Size() int
- func (m *Attri) XXX_Unmarshal(b []byte) error
- type DeleteReq
- func (*DeleteReq) Descriptor() ([]byte, []int)
- func (m *DeleteReq) GetDocId() string
- func (m *DeleteReq) Marshal() (dAtA []byte, err error)
- func (m *DeleteReq) MarshalTo(dAtA []byte) (int, error)
- func (*DeleteReq) ProtoMessage()
- func (m *DeleteReq) Reset()
- func (m *DeleteReq) Size() (n int)
- func (m *DeleteReq) String() string
- func (m *DeleteReq) Unmarshal(dAtA []byte) error
- func (m *DeleteReq) XXX_DiscardUnknown()
- func (m *DeleteReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *DeleteReq) XXX_Merge(src proto.Message)
- func (m *DeleteReq) XXX_Size() int
- func (m *DeleteReq) XXX_Unmarshal(b []byte) error
- type DocReq
- func (*DocReq) Descriptor() ([]byte, []int)
- func (m *DocReq) GetAttri() []byte
- func (m *DocReq) GetContent() string
- func (m *DocReq) GetDocId() string
- func (m *DocReq) GetFields() []byte
- func (m *DocReq) GetForceUpdate() bool
- func (m *DocReq) GetLabels() []string
- func (m *DocReq) GetTokens() []*TokenData
- func (m *DocReq) Marshal() (dAtA []byte, err error)
- func (m *DocReq) MarshalTo(dAtA []byte) (int, error)
- func (*DocReq) ProtoMessage()
- func (m *DocReq) Reset()
- func (m *DocReq) Size() (n int)
- func (m *DocReq) String() string
- func (m *DocReq) Unmarshal(dAtA []byte) error
- func (m *DocReq) XXX_DiscardUnknown()
- func (m *DocReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *DocReq) XXX_Merge(src proto.Message)
- func (m *DocReq) XXX_Size() int
- func (m *DocReq) XXX_Unmarshal(b []byte) error
- type Expr
- func (*Expr) Descriptor() ([]byte, []int)
- func (m *Expr) GetMust() []string
- func (m *Expr) GetNotIn() []string
- func (m *Expr) GetShould() []string
- func (m *Expr) Marshal() (dAtA []byte, err error)
- func (m *Expr) MarshalTo(dAtA []byte) (int, error)
- func (*Expr) ProtoMessage()
- func (m *Expr) Reset()
- func (m *Expr) Size() (n int)
- func (m *Expr) String() string
- func (m *Expr) Unmarshal(dAtA []byte) error
- func (m *Expr) XXX_DiscardUnknown()
- func (m *Expr) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Expr) XXX_Merge(src proto.Message)
- func (m *Expr) XXX_Size() int
- func (m *Expr) XXX_Unmarshal(b []byte) error
- type GreeterClient
- type GreeterServer
- type HeartReq
- func (*HeartReq) Descriptor() ([]byte, []int)
- func (m *HeartReq) GetMsg() int32
- func (m *HeartReq) Marshal() (dAtA []byte, err error)
- func (m *HeartReq) MarshalTo(dAtA []byte) (int, error)
- func (*HeartReq) ProtoMessage()
- func (m *HeartReq) Reset()
- func (m *HeartReq) Size() (n int)
- func (m *HeartReq) String() string
- func (m *HeartReq) Unmarshal(dAtA []byte) error
- func (m *HeartReq) XXX_DiscardUnknown()
- func (m *HeartReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *HeartReq) XXX_Merge(src proto.Message)
- func (m *HeartReq) XXX_Size() int
- func (m *HeartReq) XXX_Unmarshal(b []byte) error
- type Logic
- func (*Logic) Descriptor() ([]byte, []int)
- func (m *Logic) GetExpr() *Expr
- func (m *Logic) GetMust() bool
- func (m *Logic) GetNotIn() bool
- func (m *Logic) GetShould() bool
- func (m *Logic) Marshal() (dAtA []byte, err error)
- func (m *Logic) MarshalTo(dAtA []byte) (int, error)
- func (*Logic) ProtoMessage()
- func (m *Logic) Reset()
- func (m *Logic) Size() (n int)
- func (m *Logic) String() string
- func (m *Logic) Unmarshal(dAtA []byte) error
- func (m *Logic) XXX_DiscardUnknown()
- func (m *Logic) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Logic) XXX_Merge(src proto.Message)
- func (m *Logic) XXX_Size() int
- func (m *Logic) XXX_Unmarshal(b []byte) error
- type Reply
- func (*Reply) Descriptor() ([]byte, []int)
- func (m *Reply) GetResult() int32
- func (m *Reply) Marshal() (dAtA []byte, err error)
- func (m *Reply) MarshalTo(dAtA []byte) (int, error)
- func (*Reply) ProtoMessage()
- func (m *Reply) Reset()
- func (m *Reply) Size() (n int)
- func (m *Reply) String() string
- func (m *Reply) Unmarshal(dAtA []byte) error
- func (m *Reply) XXX_DiscardUnknown()
- func (m *Reply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Reply) XXX_Merge(src proto.Message)
- func (m *Reply) XXX_Size() int
- func (m *Reply) XXX_Unmarshal(b []byte) error
- type SearchReply
- func (*SearchReply) Descriptor() ([]byte, []int)
- func (m *SearchReply) GetCode() int32
- func (m *SearchReply) GetDocs() []*Text
- func (m *SearchReply) GetLen() int32
- func (m *SearchReply) GetTimestamp() int64
- func (m *SearchReply) Marshal() (dAtA []byte, err error)
- func (m *SearchReply) MarshalTo(dAtA []byte) (int, error)
- func (*SearchReply) ProtoMessage()
- func (m *SearchReply) Reset()
- func (m *SearchReply) Size() (n int)
- func (m *SearchReply) String() string
- func (m *SearchReply) Unmarshal(dAtA []byte) error
- func (m *SearchReply) XXX_DiscardUnknown()
- func (m *SearchReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *SearchReply) XXX_Merge(src proto.Message)
- func (m *SearchReply) XXX_Size() int
- func (m *SearchReply) XXX_Unmarshal(b []byte) error
- type SearchReq
- func (*SearchReq) Descriptor() ([]byte, []int)
- func (m *SearchReq) GetDocIds() map[string]bool
- func (m *SearchReq) GetId() string
- func (m *SearchReq) GetLogic() *Logic
- func (m *SearchReq) GetMaxOutputs() int32
- func (m *SearchReq) GetOutputOffset() int32
- func (m *SearchReq) GetQuery() string
- func (m *SearchReq) GetTime() string
- func (m *SearchReq) Marshal() (dAtA []byte, err error)
- func (m *SearchReq) MarshalTo(dAtA []byte) (int, error)
- func (*SearchReq) ProtoMessage()
- func (m *SearchReq) Reset()
- func (m *SearchReq) Size() (n int)
- func (m *SearchReq) String() string
- func (m *SearchReq) Unmarshal(dAtA []byte) error
- func (m *SearchReq) XXX_DiscardUnknown()
- func (m *SearchReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *SearchReq) XXX_Merge(src proto.Message)
- func (m *SearchReq) XXX_Size() int
- func (m *SearchReq) XXX_Unmarshal(b []byte) error
- type Text
- func (*Text) Descriptor() ([]byte, []int)
- func (m *Text) GetAttri() *Attri
- func (m *Text) GetContent() string
- func (m *Text) GetId() string
- func (m *Text) Marshal() (dAtA []byte, err error)
- func (m *Text) MarshalTo(dAtA []byte) (int, error)
- func (*Text) ProtoMessage()
- func (m *Text) Reset()
- func (m *Text) Size() (n int)
- func (m *Text) String() string
- func (m *Text) Unmarshal(dAtA []byte) error
- func (m *Text) XXX_DiscardUnknown()
- func (m *Text) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Text) XXX_Merge(src proto.Message)
- func (m *Text) XXX_Size() int
- func (m *Text) XXX_Unmarshal(b []byte) error
- type TokenData
- func (*TokenData) Descriptor() ([]byte, []int)
- func (m *TokenData) GetLocations() []int32
- func (m *TokenData) GetText() string
- func (m *TokenData) Marshal() (dAtA []byte, err error)
- func (m *TokenData) MarshalTo(dAtA []byte) (int, error)
- func (*TokenData) ProtoMessage()
- func (m *TokenData) Reset()
- func (m *TokenData) Size() (n int)
- func (m *TokenData) String() string
- func (m *TokenData) Unmarshal(dAtA []byte) error
- func (m *TokenData) XXX_DiscardUnknown()
- func (m *TokenData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *TokenData) XXX_Merge(src proto.Message)
- func (m *TokenData) XXX_Size() int
- func (m *TokenData) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthDoc = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowDoc = fmt.Errorf("proto: integer overflow") )
Functions ¶
func RegisterGreeterServer ¶
func RegisterGreeterServer(s *grpc.Server, srv GreeterServer)
Types ¶
type Attri ¶
type Attri struct { Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` Author string `protobuf:"bytes,2,opt,name=author,proto3" json:"author,omitempty"` Time string `protobuf:"bytes,3,opt,name=time,proto3" json:"time,omitempty"` Ts int64 `protobuf:"varint,4,opt,name=ts,proto3" json:"ts,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Attri) Descriptor ¶
func (*Attri) ProtoMessage ¶
func (*Attri) ProtoMessage()
func (*Attri) XXX_DiscardUnknown ¶
func (m *Attri) XXX_DiscardUnknown()
func (*Attri) XXX_Marshal ¶
func (*Attri) XXX_Unmarshal ¶
type DeleteReq ¶
type DeleteReq struct { DocId string `protobuf:"bytes,1,opt,name=doc_id,json=docId,proto3" json:"doc_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*DeleteReq) Descriptor ¶
func (*DeleteReq) ProtoMessage ¶
func (*DeleteReq) ProtoMessage()
func (*DeleteReq) XXX_DiscardUnknown ¶
func (m *DeleteReq) XXX_DiscardUnknown()
func (*DeleteReq) XXX_Marshal ¶
func (*DeleteReq) XXX_Unmarshal ¶
type DocReq ¶
type DocReq struct { // uint64 doc_id = 1; DocId string `protobuf:"bytes,1,opt,name=doc_id,json=docId,proto3" json:"doc_id,omitempty"` Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` Attri []byte `protobuf:"bytes,3,opt,name=attri,proto3" json:"attri,omitempty"` Tokens []*TokenData `protobuf:"bytes,4,rep,name=tokens" json:"tokens,omitempty"` Labels []string `protobuf:"bytes,5,rep,name=labels" json:"labels,omitempty"` Fields []byte `protobuf:"bytes,6,opt,name=fields,proto3" json:"fields,omitempty"` ForceUpdate bool `protobuf:"varint,7,opt,name=forceUpdate,proto3" json:"forceUpdate,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The request message containing the user's name.
func (*DocReq) Descriptor ¶
func (*DocReq) GetContent ¶
func (*DocReq) GetForceUpdate ¶
func (*DocReq) ProtoMessage ¶
func (*DocReq) ProtoMessage()
func (*DocReq) XXX_DiscardUnknown ¶
func (m *DocReq) XXX_DiscardUnknown()
func (*DocReq) XXX_Marshal ¶
func (*DocReq) XXX_Unmarshal ¶
type Expr ¶
type Expr struct { // mustLabels, with the query that must exist Must []string `protobuf:"bytes,1,rep,name=must" json:"must,omitempty"` // shouldLabels, there is one can exist Should []string `protobuf:"bytes,2,rep,name=should" json:"should,omitempty"` // notInLabels, not included NotIn []string `protobuf:"bytes,3,rep,name=notIn" json:"notIn,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
LogicExpr logic expression options
func (*Expr) Descriptor ¶
func (*Expr) ProtoMessage ¶
func (*Expr) ProtoMessage()
func (*Expr) XXX_DiscardUnknown ¶
func (m *Expr) XXX_DiscardUnknown()
func (*Expr) XXX_Unmarshal ¶
type GreeterClient ¶
type GreeterClient interface { // Sends a greeting HeartBeat(ctx context.Context, in *HeartReq, opts ...grpc.CallOption) (*Reply, error) DocInx(ctx context.Context, in *DocReq, opts ...grpc.CallOption) (*Reply, error) Delete(ctx context.Context, in *DeleteReq, opts ...grpc.CallOption) (*Reply, error) Search(ctx context.Context, in *SearchReq, opts ...grpc.CallOption) (*SearchReply, error) }
GreeterClient is the client API for Greeter service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewGreeterClient ¶
func NewGreeterClient(cc *grpc.ClientConn) GreeterClient
type GreeterServer ¶
type GreeterServer interface { // Sends a greeting HeartBeat(context.Context, *HeartReq) (*Reply, error) DocInx(context.Context, *DocReq) (*Reply, error) Delete(context.Context, *DeleteReq) (*Reply, error) Search(context.Context, *SearchReq) (*SearchReply, error) }
GreeterServer is the server API for Greeter service.
type HeartReq ¶
type HeartReq struct { Msg int32 `protobuf:"varint,1,opt,name=msg,proto3" json:"msg,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*HeartReq) Descriptor ¶
func (*HeartReq) ProtoMessage ¶
func (*HeartReq) ProtoMessage()
func (*HeartReq) XXX_DiscardUnknown ¶
func (m *HeartReq) XXX_DiscardUnknown()
func (*HeartReq) XXX_Marshal ¶
func (*HeartReq) XXX_Unmarshal ¶
type Logic ¶
type Logic struct { // 与查询, 必须都存在 Must bool `protobuf:"varint,1,opt,name=must,proto3" json:"must,omitempty"` // 或查询, 有一个存在即可 Should bool `protobuf:"varint,2,opt,name=should,proto3" json:"should,omitempty"` // 非查询, 不包含 NotIn bool `protobuf:"varint,3,opt,name=notIn,proto3" json:"notIn,omitempty"` Expr *Expr `protobuf:"bytes,4,opt,name=expr" json:"expr,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Logic) Descriptor ¶
func (*Logic) ProtoMessage ¶
func (*Logic) ProtoMessage()
func (*Logic) XXX_DiscardUnknown ¶
func (m *Logic) XXX_DiscardUnknown()
func (*Logic) XXX_Marshal ¶
func (*Logic) XXX_Unmarshal ¶
type Reply ¶
type Reply struct { Result int32 `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
0 succeed, 1 fail
func (*Reply) Descriptor ¶
func (*Reply) ProtoMessage ¶
func (*Reply) ProtoMessage()
func (*Reply) XXX_DiscardUnknown ¶
func (m *Reply) XXX_DiscardUnknown()
func (*Reply) XXX_Marshal ¶
func (*Reply) XXX_Unmarshal ¶
type SearchReply ¶
type SearchReply struct { Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Len int32 `protobuf:"varint,2,opt,name=len,proto3" json:"len,omitempty"` Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Docs []*Text `protobuf:"bytes,4,rep,name=docs" json:"docs,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SearchReply) Descriptor ¶
func (*SearchReply) Descriptor() ([]byte, []int)
func (*SearchReply) GetCode ¶
func (m *SearchReply) GetCode() int32
func (*SearchReply) GetDocs ¶
func (m *SearchReply) GetDocs() []*Text
func (*SearchReply) GetLen ¶
func (m *SearchReply) GetLen() int32
func (*SearchReply) GetTimestamp ¶
func (m *SearchReply) GetTimestamp() int64
func (*SearchReply) Marshal ¶
func (m *SearchReply) Marshal() (dAtA []byte, err error)
func (*SearchReply) ProtoMessage ¶
func (*SearchReply) ProtoMessage()
func (*SearchReply) Reset ¶
func (m *SearchReply) Reset()
func (*SearchReply) Size ¶
func (m *SearchReply) Size() (n int)
func (*SearchReply) String ¶
func (m *SearchReply) String() string
func (*SearchReply) Unmarshal ¶
func (m *SearchReply) Unmarshal(dAtA []byte) error
func (*SearchReply) XXX_DiscardUnknown ¶
func (m *SearchReply) XXX_DiscardUnknown()
func (*SearchReply) XXX_Marshal ¶
func (m *SearchReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SearchReply) XXX_Merge ¶
func (dst *SearchReply) XXX_Merge(src proto.Message)
func (*SearchReply) XXX_Size ¶
func (m *SearchReply) XXX_Size() int
func (*SearchReply) XXX_Unmarshal ¶
func (m *SearchReply) XXX_Unmarshal(b []byte) error
type SearchReq ¶
type SearchReq struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Query string `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"` OutputOffset int32 `protobuf:"varint,3,opt,name=outputOffset,proto3" json:"outputOffset,omitempty"` MaxOutputs int32 `protobuf:"varint,4,opt,name=maxOutputs,proto3" json:"maxOutputs,omitempty"` Time string `protobuf:"bytes,5,opt,name=time,proto3" json:"time,omitempty"` DocIds map[string]bool `` /* 147-byte string literal not displayed */ Logic *Logic `protobuf:"bytes,7,opt,name=logic" json:"logic,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SearchReq) Descriptor ¶
func (*SearchReq) GetMaxOutputs ¶
func (*SearchReq) GetOutputOffset ¶
func (*SearchReq) ProtoMessage ¶
func (*SearchReq) ProtoMessage()
func (*SearchReq) XXX_DiscardUnknown ¶
func (m *SearchReq) XXX_DiscardUnknown()
func (*SearchReq) XXX_Marshal ¶
func (*SearchReq) XXX_Unmarshal ¶
type Text ¶
type Text struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // uint64 id = 1; Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` Attri *Attri `protobuf:"bytes,3,opt,name=attri" json:"attri,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Text) Descriptor ¶
func (*Text) GetContent ¶
func (*Text) ProtoMessage ¶
func (*Text) ProtoMessage()
func (*Text) XXX_DiscardUnknown ¶
func (m *Text) XXX_DiscardUnknown()
func (*Text) XXX_Unmarshal ¶
type TokenData ¶
type TokenData struct { Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` Locations []int32 `protobuf:"varint,2,rep,packed,name=locations" json:"locations,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*TokenData) Descriptor ¶
func (*TokenData) GetLocations ¶
func (*TokenData) ProtoMessage ¶
func (*TokenData) ProtoMessage()
func (*TokenData) XXX_DiscardUnknown ¶
func (m *TokenData) XXX_DiscardUnknown()
func (*TokenData) XXX_Marshal ¶
func (*TokenData) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.