Documentation
¶
Index ¶
- Variables
- func RegisterLensV2Server(s *grpc.Server, srv LensV2Server)
- type Document
- func (*Document) Descriptor() ([]byte, []int)
- func (m *Document) GetCategory() string
- func (m *Document) GetDisplayName() string
- func (m *Document) GetHash() string
- func (m *Document) GetMimeType() string
- func (m *Document) GetTags() []string
- func (*Document) ProtoMessage()
- func (m *Document) Reset()
- func (m *Document) String() string
- func (m *Document) XXX_DiscardUnknown()
- func (m *Document) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Document) XXX_Merge(src proto.Message)
- func (m *Document) XXX_Size() int
- func (m *Document) XXX_Unmarshal(b []byte) error
- type IndexReq
- func (*IndexReq) Descriptor() ([]byte, []int)
- func (m *IndexReq) GetDisplayName() string
- func (m *IndexReq) GetHash() string
- func (m *IndexReq) GetOptions() *IndexReq_Options
- func (m *IndexReq) GetTags() []string
- func (m *IndexReq) GetType() IndexReq_Type
- func (*IndexReq) ProtoMessage()
- func (m *IndexReq) Reset()
- func (m *IndexReq) String() string
- func (m *IndexReq) XXX_DiscardUnknown()
- func (m *IndexReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *IndexReq) XXX_Merge(src proto.Message)
- func (m *IndexReq) XXX_Size() int
- func (m *IndexReq) XXX_Unmarshal(b []byte) error
- type IndexReq_Options
- func (*IndexReq_Options) Descriptor() ([]byte, []int)
- func (m *IndexReq_Options) GetReindex() bool
- func (*IndexReq_Options) ProtoMessage()
- func (m *IndexReq_Options) Reset()
- func (m *IndexReq_Options) String() string
- func (m *IndexReq_Options) XXX_DiscardUnknown()
- func (m *IndexReq_Options) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *IndexReq_Options) XXX_Merge(src proto.Message)
- func (m *IndexReq_Options) XXX_Size() int
- func (m *IndexReq_Options) XXX_Unmarshal(b []byte) error
- type IndexReq_Type
- type IndexResp
- func (*IndexResp) Descriptor() ([]byte, []int)
- func (m *IndexResp) GetDoc() *Document
- func (*IndexResp) ProtoMessage()
- func (m *IndexResp) Reset()
- func (m *IndexResp) String() string
- func (m *IndexResp) XXX_DiscardUnknown()
- func (m *IndexResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *IndexResp) XXX_Merge(src proto.Message)
- func (m *IndexResp) XXX_Size() int
- func (m *IndexResp) XXX_Unmarshal(b []byte) error
- type LensV2Client
- type LensV2Server
- type RemoveReq
- func (*RemoveReq) Descriptor() ([]byte, []int)
- func (m *RemoveReq) GetHash() string
- func (*RemoveReq) ProtoMessage()
- func (m *RemoveReq) Reset()
- func (m *RemoveReq) String() string
- func (m *RemoveReq) XXX_DiscardUnknown()
- func (m *RemoveReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *RemoveReq) XXX_Merge(src proto.Message)
- func (m *RemoveReq) XXX_Size() int
- func (m *RemoveReq) XXX_Unmarshal(b []byte) error
- type RemoveResp
- func (*RemoveResp) Descriptor() ([]byte, []int)
- func (*RemoveResp) ProtoMessage()
- func (m *RemoveResp) Reset()
- func (m *RemoveResp) String() string
- func (m *RemoveResp) XXX_DiscardUnknown()
- func (m *RemoveResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *RemoveResp) XXX_Merge(src proto.Message)
- func (m *RemoveResp) XXX_Size() int
- func (m *RemoveResp) XXX_Unmarshal(b []byte) error
- type SearchReq
- func (*SearchReq) Descriptor() ([]byte, []int)
- func (m *SearchReq) GetOptions() *SearchReq_Options
- func (m *SearchReq) GetQuery() string
- func (*SearchReq) ProtoMessage()
- func (m *SearchReq) Reset()
- func (m *SearchReq) String() string
- 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 SearchReq_Options
- func (*SearchReq_Options) Descriptor() ([]byte, []int)
- func (m *SearchReq_Options) GetCategories() []string
- func (m *SearchReq_Options) GetHashes() []string
- func (m *SearchReq_Options) GetMimeTypes() []string
- func (m *SearchReq_Options) GetRequired() []string
- func (m *SearchReq_Options) GetTags() []string
- func (*SearchReq_Options) ProtoMessage()
- func (m *SearchReq_Options) Reset()
- func (m *SearchReq_Options) String() string
- func (m *SearchReq_Options) XXX_DiscardUnknown()
- func (m *SearchReq_Options) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *SearchReq_Options) XXX_Merge(src proto.Message)
- func (m *SearchReq_Options) XXX_Size() int
- func (m *SearchReq_Options) XXX_Unmarshal(b []byte) error
- type SearchResp
- func (*SearchResp) Descriptor() ([]byte, []int)
- func (m *SearchResp) GetResults() []*SearchResp_Result
- func (*SearchResp) ProtoMessage()
- func (m *SearchResp) Reset()
- func (m *SearchResp) String() string
- func (m *SearchResp) XXX_DiscardUnknown()
- func (m *SearchResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *SearchResp) XXX_Merge(src proto.Message)
- func (m *SearchResp) XXX_Size() int
- func (m *SearchResp) XXX_Unmarshal(b []byte) error
- type SearchResp_Result
- func (*SearchResp_Result) Descriptor() ([]byte, []int)
- func (m *SearchResp_Result) GetDoc() *Document
- func (m *SearchResp_Result) GetScore() float32
- func (*SearchResp_Result) ProtoMessage()
- func (m *SearchResp_Result) Reset()
- func (m *SearchResp_Result) String() string
- func (m *SearchResp_Result) XXX_DiscardUnknown()
- func (m *SearchResp_Result) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *SearchResp_Result) XXX_Merge(src proto.Message)
- func (m *SearchResp_Result) XXX_Size() int
- func (m *SearchResp_Result) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var IndexReq_Type_name = map[int32]string{
0: "UNKNOWN",
1: "IPLD",
}
View Source
var IndexReq_Type_value = map[string]int32{
"UNKNOWN": 0,
"IPLD": 1,
}
Functions ¶
func RegisterLensV2Server ¶
func RegisterLensV2Server(s *grpc.Server, srv LensV2Server)
Types ¶
type Document ¶
type Document struct { Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` MimeType string `protobuf:"bytes,3,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"` Category string `protobuf:"bytes,4,opt,name=category,proto3" json:"category,omitempty"` Tags []string `protobuf:"bytes,5,rep,name=tags,proto3" json:"tags,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Document) Descriptor ¶
func (*Document) GetCategory ¶
func (*Document) GetDisplayName ¶
func (*Document) GetMimeType ¶
func (*Document) ProtoMessage ¶
func (*Document) ProtoMessage()
func (*Document) XXX_DiscardUnknown ¶
func (m *Document) XXX_DiscardUnknown()
func (*Document) XXX_Marshal ¶
func (*Document) XXX_Unmarshal ¶
type IndexReq ¶
type IndexReq struct { Type IndexReq_Type `protobuf:"varint,1,opt,name=type,proto3,enum=lensv2.IndexReq_Type" json:"type,omitempty"` Hash string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` Tags []string `protobuf:"bytes,4,rep,name=tags,proto3" json:"tags,omitempty"` Options *IndexReq_Options `protobuf:"bytes,5,opt,name=options,proto3" json:"options,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*IndexReq) Descriptor ¶
func (*IndexReq) GetDisplayName ¶
func (*IndexReq) GetOptions ¶
func (m *IndexReq) GetOptions() *IndexReq_Options
func (*IndexReq) GetType ¶
func (m *IndexReq) GetType() IndexReq_Type
func (*IndexReq) ProtoMessage ¶
func (*IndexReq) ProtoMessage()
func (*IndexReq) XXX_DiscardUnknown ¶
func (m *IndexReq) XXX_DiscardUnknown()
func (*IndexReq) XXX_Marshal ¶
func (*IndexReq) XXX_Unmarshal ¶
type IndexReq_Options ¶
type IndexReq_Options struct { Reindex bool `protobuf:"varint,1,opt,name=reindex,proto3" json:"reindex,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*IndexReq_Options) Descriptor ¶
func (*IndexReq_Options) Descriptor() ([]byte, []int)
func (*IndexReq_Options) GetReindex ¶
func (m *IndexReq_Options) GetReindex() bool
func (*IndexReq_Options) ProtoMessage ¶
func (*IndexReq_Options) ProtoMessage()
func (*IndexReq_Options) Reset ¶
func (m *IndexReq_Options) Reset()
func (*IndexReq_Options) String ¶
func (m *IndexReq_Options) String() string
func (*IndexReq_Options) XXX_DiscardUnknown ¶
func (m *IndexReq_Options) XXX_DiscardUnknown()
func (*IndexReq_Options) XXX_Marshal ¶
func (m *IndexReq_Options) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*IndexReq_Options) XXX_Merge ¶
func (dst *IndexReq_Options) XXX_Merge(src proto.Message)
func (*IndexReq_Options) XXX_Size ¶
func (m *IndexReq_Options) XXX_Size() int
func (*IndexReq_Options) XXX_Unmarshal ¶
func (m *IndexReq_Options) XXX_Unmarshal(b []byte) error
type IndexReq_Type ¶
type IndexReq_Type int32
const ( IndexReq_UNKNOWN IndexReq_Type = 0 IndexReq_IPLD IndexReq_Type = 1 )
func (IndexReq_Type) EnumDescriptor ¶
func (IndexReq_Type) EnumDescriptor() ([]byte, []int)
func (IndexReq_Type) String ¶
func (x IndexReq_Type) String() string
type IndexResp ¶
type IndexResp struct { Doc *Document `protobuf:"bytes,1,opt,name=doc,proto3" json:"doc,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*IndexResp) Descriptor ¶
func (*IndexResp) ProtoMessage ¶
func (*IndexResp) ProtoMessage()
func (*IndexResp) XXX_DiscardUnknown ¶
func (m *IndexResp) XXX_DiscardUnknown()
func (*IndexResp) XXX_Marshal ¶
func (*IndexResp) XXX_Unmarshal ¶
type LensV2Client ¶
type LensV2Client interface { Index(ctx context.Context, in *IndexReq, opts ...grpc.CallOption) (*IndexResp, error) Search(ctx context.Context, in *SearchReq, opts ...grpc.CallOption) (*SearchResp, error) Remove(ctx context.Context, in *RemoveReq, opts ...grpc.CallOption) (*RemoveResp, error) }
LensV2Client is the client API for LensV2 service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewLensV2Client ¶
func NewLensV2Client(cc *grpc.ClientConn) LensV2Client
type LensV2Server ¶
type LensV2Server interface { Index(context.Context, *IndexReq) (*IndexResp, error) Search(context.Context, *SearchReq) (*SearchResp, error) Remove(context.Context, *RemoveReq) (*RemoveResp, error) }
LensV2Server is the server API for LensV2 service.
type RemoveReq ¶
type RemoveReq struct { Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RemoveReq) Descriptor ¶
func (*RemoveReq) ProtoMessage ¶
func (*RemoveReq) ProtoMessage()
func (*RemoveReq) XXX_DiscardUnknown ¶
func (m *RemoveReq) XXX_DiscardUnknown()
func (*RemoveReq) XXX_Marshal ¶
func (*RemoveReq) XXX_Unmarshal ¶
type RemoveResp ¶
type RemoveResp struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RemoveResp) Descriptor ¶
func (*RemoveResp) Descriptor() ([]byte, []int)
func (*RemoveResp) ProtoMessage ¶
func (*RemoveResp) ProtoMessage()
func (*RemoveResp) Reset ¶
func (m *RemoveResp) Reset()
func (*RemoveResp) String ¶
func (m *RemoveResp) String() string
func (*RemoveResp) XXX_DiscardUnknown ¶
func (m *RemoveResp) XXX_DiscardUnknown()
func (*RemoveResp) XXX_Marshal ¶
func (m *RemoveResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RemoveResp) XXX_Merge ¶
func (dst *RemoveResp) XXX_Merge(src proto.Message)
func (*RemoveResp) XXX_Size ¶
func (m *RemoveResp) XXX_Size() int
func (*RemoveResp) XXX_Unmarshal ¶
func (m *RemoveResp) XXX_Unmarshal(b []byte) error
type SearchReq ¶
type SearchReq struct { Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` Options *SearchReq_Options `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SearchReq) Descriptor ¶
func (*SearchReq) GetOptions ¶
func (m *SearchReq) GetOptions() *SearchReq_Options
func (*SearchReq) ProtoMessage ¶
func (*SearchReq) ProtoMessage()
func (*SearchReq) XXX_DiscardUnknown ¶
func (m *SearchReq) XXX_DiscardUnknown()
func (*SearchReq) XXX_Marshal ¶
func (*SearchReq) XXX_Unmarshal ¶
type SearchReq_Options ¶
type SearchReq_Options struct { Required []string `protobuf:"bytes,1,rep,name=required,proto3" json:"required,omitempty"` Tags []string `protobuf:"bytes,2,rep,name=tags,proto3" json:"tags,omitempty"` Categories []string `protobuf:"bytes,3,rep,name=categories,proto3" json:"categories,omitempty"` MimeTypes []string `protobuf:"bytes,4,rep,name=mime_types,json=mimeTypes,proto3" json:"mime_types,omitempty"` Hashes []string `protobuf:"bytes,5,rep,name=hashes,proto3" json:"hashes,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SearchReq_Options) Descriptor ¶
func (*SearchReq_Options) Descriptor() ([]byte, []int)
func (*SearchReq_Options) GetCategories ¶
func (m *SearchReq_Options) GetCategories() []string
func (*SearchReq_Options) GetHashes ¶
func (m *SearchReq_Options) GetHashes() []string
func (*SearchReq_Options) GetMimeTypes ¶
func (m *SearchReq_Options) GetMimeTypes() []string
func (*SearchReq_Options) GetRequired ¶
func (m *SearchReq_Options) GetRequired() []string
func (*SearchReq_Options) GetTags ¶
func (m *SearchReq_Options) GetTags() []string
func (*SearchReq_Options) ProtoMessage ¶
func (*SearchReq_Options) ProtoMessage()
func (*SearchReq_Options) Reset ¶
func (m *SearchReq_Options) Reset()
func (*SearchReq_Options) String ¶
func (m *SearchReq_Options) String() string
func (*SearchReq_Options) XXX_DiscardUnknown ¶
func (m *SearchReq_Options) XXX_DiscardUnknown()
func (*SearchReq_Options) XXX_Marshal ¶
func (m *SearchReq_Options) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SearchReq_Options) XXX_Merge ¶
func (dst *SearchReq_Options) XXX_Merge(src proto.Message)
func (*SearchReq_Options) XXX_Size ¶
func (m *SearchReq_Options) XXX_Size() int
func (*SearchReq_Options) XXX_Unmarshal ¶
func (m *SearchReq_Options) XXX_Unmarshal(b []byte) error
type SearchResp ¶
type SearchResp struct { Results []*SearchResp_Result `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SearchResp) Descriptor ¶
func (*SearchResp) Descriptor() ([]byte, []int)
func (*SearchResp) GetResults ¶
func (m *SearchResp) GetResults() []*SearchResp_Result
func (*SearchResp) ProtoMessage ¶
func (*SearchResp) ProtoMessage()
func (*SearchResp) Reset ¶
func (m *SearchResp) Reset()
func (*SearchResp) String ¶
func (m *SearchResp) String() string
func (*SearchResp) XXX_DiscardUnknown ¶
func (m *SearchResp) XXX_DiscardUnknown()
func (*SearchResp) XXX_Marshal ¶
func (m *SearchResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SearchResp) XXX_Merge ¶
func (dst *SearchResp) XXX_Merge(src proto.Message)
func (*SearchResp) XXX_Size ¶
func (m *SearchResp) XXX_Size() int
func (*SearchResp) XXX_Unmarshal ¶
func (m *SearchResp) XXX_Unmarshal(b []byte) error
type SearchResp_Result ¶
type SearchResp_Result struct { Score float32 `protobuf:"fixed32,1,opt,name=score,proto3" json:"score,omitempty"` Doc *Document `protobuf:"bytes,2,opt,name=doc,proto3" json:"doc,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SearchResp_Result) Descriptor ¶
func (*SearchResp_Result) Descriptor() ([]byte, []int)
func (*SearchResp_Result) GetDoc ¶
func (m *SearchResp_Result) GetDoc() *Document
func (*SearchResp_Result) GetScore ¶
func (m *SearchResp_Result) GetScore() float32
func (*SearchResp_Result) ProtoMessage ¶
func (*SearchResp_Result) ProtoMessage()
func (*SearchResp_Result) Reset ¶
func (m *SearchResp_Result) Reset()
func (*SearchResp_Result) String ¶
func (m *SearchResp_Result) String() string
func (*SearchResp_Result) XXX_DiscardUnknown ¶
func (m *SearchResp_Result) XXX_DiscardUnknown()
func (*SearchResp_Result) XXX_Marshal ¶
func (m *SearchResp_Result) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SearchResp_Result) XXX_Merge ¶
func (dst *SearchResp_Result) XXX_Merge(src proto.Message)
func (*SearchResp_Result) XXX_Size ¶
func (m *SearchResp_Result) XXX_Size() int
func (*SearchResp_Result) XXX_Unmarshal ¶
func (m *SearchResp_Result) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.