doc

package
v0.0.0-...-ff1c243 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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) Descriptor() ([]byte, []int)

func (*Attri) GetAuthor

func (m *Attri) GetAuthor() string

func (*Attri) GetTime

func (m *Attri) GetTime() string

func (*Attri) GetTitle

func (m *Attri) GetTitle() string

func (*Attri) GetTs

func (m *Attri) GetTs() int64

func (*Attri) Marshal

func (m *Attri) Marshal() (dAtA []byte, err error)

func (*Attri) MarshalTo

func (m *Attri) MarshalTo(dAtA []byte) (int, error)

func (*Attri) ProtoMessage

func (*Attri) ProtoMessage()

func (*Attri) Reset

func (m *Attri) Reset()

func (*Attri) Size

func (m *Attri) Size() (n int)

func (*Attri) String

func (m *Attri) String() string

func (*Attri) Unmarshal

func (m *Attri) Unmarshal(dAtA []byte) error

func (*Attri) XXX_DiscardUnknown

func (m *Attri) XXX_DiscardUnknown()

func (*Attri) XXX_Marshal

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

func (*Attri) XXX_Merge

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

func (*Attri) XXX_Size

func (m *Attri) XXX_Size() int

func (*Attri) XXX_Unmarshal

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

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) Descriptor() ([]byte, []int)

func (*DeleteReq) GetDocId

func (m *DeleteReq) GetDocId() string

func (*DeleteReq) Marshal

func (m *DeleteReq) Marshal() (dAtA []byte, err error)

func (*DeleteReq) MarshalTo

func (m *DeleteReq) MarshalTo(dAtA []byte) (int, error)

func (*DeleteReq) ProtoMessage

func (*DeleteReq) ProtoMessage()

func (*DeleteReq) Reset

func (m *DeleteReq) Reset()

func (*DeleteReq) Size

func (m *DeleteReq) Size() (n int)

func (*DeleteReq) String

func (m *DeleteReq) String() string

func (*DeleteReq) Unmarshal

func (m *DeleteReq) Unmarshal(dAtA []byte) error

func (*DeleteReq) XXX_DiscardUnknown

func (m *DeleteReq) XXX_DiscardUnknown()

func (*DeleteReq) XXX_Marshal

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

func (*DeleteReq) XXX_Merge

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

func (*DeleteReq) XXX_Size

func (m *DeleteReq) XXX_Size() int

func (*DeleteReq) XXX_Unmarshal

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

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) Descriptor() ([]byte, []int)

func (*DocReq) GetAttri

func (m *DocReq) GetAttri() []byte

func (*DocReq) GetContent

func (m *DocReq) GetContent() string

func (*DocReq) GetDocId

func (m *DocReq) GetDocId() string

func (*DocReq) GetFields

func (m *DocReq) GetFields() []byte

func (*DocReq) GetForceUpdate

func (m *DocReq) GetForceUpdate() bool

func (*DocReq) GetLabels

func (m *DocReq) GetLabels() []string

func (*DocReq) GetTokens

func (m *DocReq) GetTokens() []*TokenData

func (*DocReq) Marshal

func (m *DocReq) Marshal() (dAtA []byte, err error)

func (*DocReq) MarshalTo

func (m *DocReq) MarshalTo(dAtA []byte) (int, error)

func (*DocReq) ProtoMessage

func (*DocReq) ProtoMessage()

func (*DocReq) Reset

func (m *DocReq) Reset()

func (*DocReq) Size

func (m *DocReq) Size() (n int)

func (*DocReq) String

func (m *DocReq) String() string

func (*DocReq) Unmarshal

func (m *DocReq) Unmarshal(dAtA []byte) error

func (*DocReq) XXX_DiscardUnknown

func (m *DocReq) XXX_DiscardUnknown()

func (*DocReq) XXX_Marshal

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

func (*DocReq) XXX_Merge

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

func (*DocReq) XXX_Size

func (m *DocReq) XXX_Size() int

func (*DocReq) XXX_Unmarshal

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

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) Descriptor() ([]byte, []int)

func (*Expr) GetMust

func (m *Expr) GetMust() []string

func (*Expr) GetNotIn

func (m *Expr) GetNotIn() []string

func (*Expr) GetShould

func (m *Expr) GetShould() []string

func (*Expr) Marshal

func (m *Expr) Marshal() (dAtA []byte, err error)

func (*Expr) MarshalTo

func (m *Expr) MarshalTo(dAtA []byte) (int, error)

func (*Expr) ProtoMessage

func (*Expr) ProtoMessage()

func (*Expr) Reset

func (m *Expr) Reset()

func (*Expr) Size

func (m *Expr) Size() (n int)

func (*Expr) String

func (m *Expr) String() string

func (*Expr) Unmarshal

func (m *Expr) Unmarshal(dAtA []byte) error

func (*Expr) XXX_DiscardUnknown

func (m *Expr) XXX_DiscardUnknown()

func (*Expr) XXX_Marshal

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

func (*Expr) XXX_Merge

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

func (*Expr) XXX_Size

func (m *Expr) XXX_Size() int

func (*Expr) XXX_Unmarshal

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

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) Descriptor() ([]byte, []int)

func (*HeartReq) GetMsg

func (m *HeartReq) GetMsg() int32

func (*HeartReq) Marshal

func (m *HeartReq) Marshal() (dAtA []byte, err error)

func (*HeartReq) MarshalTo

func (m *HeartReq) MarshalTo(dAtA []byte) (int, error)

func (*HeartReq) ProtoMessage

func (*HeartReq) ProtoMessage()

func (*HeartReq) Reset

func (m *HeartReq) Reset()

func (*HeartReq) Size

func (m *HeartReq) Size() (n int)

func (*HeartReq) String

func (m *HeartReq) String() string

func (*HeartReq) Unmarshal

func (m *HeartReq) Unmarshal(dAtA []byte) error

func (*HeartReq) XXX_DiscardUnknown

func (m *HeartReq) XXX_DiscardUnknown()

func (*HeartReq) XXX_Marshal

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

func (*HeartReq) XXX_Merge

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

func (*HeartReq) XXX_Size

func (m *HeartReq) XXX_Size() int

func (*HeartReq) XXX_Unmarshal

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

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) Descriptor() ([]byte, []int)

func (*Logic) GetExpr

func (m *Logic) GetExpr() *Expr

func (*Logic) GetMust

func (m *Logic) GetMust() bool

func (*Logic) GetNotIn

func (m *Logic) GetNotIn() bool

func (*Logic) GetShould

func (m *Logic) GetShould() bool

func (*Logic) Marshal

func (m *Logic) Marshal() (dAtA []byte, err error)

func (*Logic) MarshalTo

func (m *Logic) MarshalTo(dAtA []byte) (int, error)

func (*Logic) ProtoMessage

func (*Logic) ProtoMessage()

func (*Logic) Reset

func (m *Logic) Reset()

func (*Logic) Size

func (m *Logic) Size() (n int)

func (*Logic) String

func (m *Logic) String() string

func (*Logic) Unmarshal

func (m *Logic) Unmarshal(dAtA []byte) error

func (*Logic) XXX_DiscardUnknown

func (m *Logic) XXX_DiscardUnknown()

func (*Logic) XXX_Marshal

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

func (*Logic) XXX_Merge

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

func (*Logic) XXX_Size

func (m *Logic) XXX_Size() int

func (*Logic) XXX_Unmarshal

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

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) Descriptor() ([]byte, []int)

func (*Reply) GetResult

func (m *Reply) GetResult() int32

func (*Reply) Marshal

func (m *Reply) Marshal() (dAtA []byte, err error)

func (*Reply) MarshalTo

func (m *Reply) MarshalTo(dAtA []byte) (int, error)

func (*Reply) ProtoMessage

func (*Reply) ProtoMessage()

func (*Reply) Reset

func (m *Reply) Reset()

func (*Reply) Size

func (m *Reply) Size() (n int)

func (*Reply) String

func (m *Reply) String() string

func (*Reply) Unmarshal

func (m *Reply) Unmarshal(dAtA []byte) error

func (*Reply) XXX_DiscardUnknown

func (m *Reply) XXX_DiscardUnknown()

func (*Reply) XXX_Marshal

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

func (*Reply) XXX_Merge

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

func (*Reply) XXX_Size

func (m *Reply) XXX_Size() int

func (*Reply) XXX_Unmarshal

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

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) MarshalTo

func (m *SearchReply) MarshalTo(dAtA []byte) (int, 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) Descriptor() ([]byte, []int)

func (*SearchReq) GetDocIds

func (m *SearchReq) GetDocIds() map[string]bool

func (*SearchReq) GetId

func (m *SearchReq) GetId() string

func (*SearchReq) GetLogic

func (m *SearchReq) GetLogic() *Logic

func (*SearchReq) GetMaxOutputs

func (m *SearchReq) GetMaxOutputs() int32

func (*SearchReq) GetOutputOffset

func (m *SearchReq) GetOutputOffset() int32

func (*SearchReq) GetQuery

func (m *SearchReq) GetQuery() string

func (*SearchReq) GetTime

func (m *SearchReq) GetTime() string

func (*SearchReq) Marshal

func (m *SearchReq) Marshal() (dAtA []byte, err error)

func (*SearchReq) MarshalTo

func (m *SearchReq) MarshalTo(dAtA []byte) (int, error)

func (*SearchReq) ProtoMessage

func (*SearchReq) ProtoMessage()

func (*SearchReq) Reset

func (m *SearchReq) Reset()

func (*SearchReq) Size

func (m *SearchReq) Size() (n int)

func (*SearchReq) String

func (m *SearchReq) String() string

func (*SearchReq) Unmarshal

func (m *SearchReq) Unmarshal(dAtA []byte) error

func (*SearchReq) XXX_DiscardUnknown

func (m *SearchReq) XXX_DiscardUnknown()

func (*SearchReq) XXX_Marshal

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

func (*SearchReq) XXX_Merge

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

func (*SearchReq) XXX_Size

func (m *SearchReq) XXX_Size() int

func (*SearchReq) XXX_Unmarshal

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

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) Descriptor() ([]byte, []int)

func (*Text) GetAttri

func (m *Text) GetAttri() *Attri

func (*Text) GetContent

func (m *Text) GetContent() string

func (*Text) GetId

func (m *Text) GetId() string

func (*Text) Marshal

func (m *Text) Marshal() (dAtA []byte, err error)

func (*Text) MarshalTo

func (m *Text) MarshalTo(dAtA []byte) (int, error)

func (*Text) ProtoMessage

func (*Text) ProtoMessage()

func (*Text) Reset

func (m *Text) Reset()

func (*Text) Size

func (m *Text) Size() (n int)

func (*Text) String

func (m *Text) String() string

func (*Text) Unmarshal

func (m *Text) Unmarshal(dAtA []byte) error

func (*Text) XXX_DiscardUnknown

func (m *Text) XXX_DiscardUnknown()

func (*Text) XXX_Marshal

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

func (*Text) XXX_Merge

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

func (*Text) XXX_Size

func (m *Text) XXX_Size() int

func (*Text) XXX_Unmarshal

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

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) Descriptor() ([]byte, []int)

func (*TokenData) GetLocations

func (m *TokenData) GetLocations() []int32

func (*TokenData) GetText

func (m *TokenData) GetText() string

func (*TokenData) Marshal

func (m *TokenData) Marshal() (dAtA []byte, err error)

func (*TokenData) MarshalTo

func (m *TokenData) MarshalTo(dAtA []byte) (int, error)

func (*TokenData) ProtoMessage

func (*TokenData) ProtoMessage()

func (*TokenData) Reset

func (m *TokenData) Reset()

func (*TokenData) Size

func (m *TokenData) Size() (n int)

func (*TokenData) String

func (m *TokenData) String() string

func (*TokenData) Unmarshal

func (m *TokenData) Unmarshal(dAtA []byte) error

func (*TokenData) XXX_DiscardUnknown

func (m *TokenData) XXX_DiscardUnknown()

func (*TokenData) XXX_Marshal

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

func (*TokenData) XXX_Merge

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

func (*TokenData) XXX_Size

func (m *TokenData) XXX_Size() int

func (*TokenData) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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