lensv2

package
v2.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

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

func (*Document) GetCategory

func (m *Document) GetCategory() string

func (*Document) GetDisplayName

func (m *Document) GetDisplayName() string

func (*Document) GetHash

func (m *Document) GetHash() string

func (*Document) GetMimeType

func (m *Document) GetMimeType() string

func (*Document) GetTags

func (m *Document) GetTags() []string

func (*Document) ProtoMessage

func (*Document) ProtoMessage()

func (*Document) Reset

func (m *Document) Reset()

func (*Document) String

func (m *Document) String() string

func (*Document) XXX_DiscardUnknown

func (m *Document) XXX_DiscardUnknown()

func (*Document) XXX_Marshal

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

func (*Document) XXX_Merge

func (m *Document) XXX_Merge(src proto.Message)

func (*Document) XXX_Size

func (m *Document) XXX_Size() int

func (*Document) XXX_Unmarshal

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

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

func (*IndexReq) GetDisplayName

func (m *IndexReq) GetDisplayName() string

func (*IndexReq) GetHash

func (m *IndexReq) GetHash() string

func (*IndexReq) GetOptions

func (m *IndexReq) GetOptions() *IndexReq_Options

func (*IndexReq) GetTags

func (m *IndexReq) GetTags() []string

func (*IndexReq) GetType

func (m *IndexReq) GetType() IndexReq_Type

func (*IndexReq) ProtoMessage

func (*IndexReq) ProtoMessage()

func (*IndexReq) Reset

func (m *IndexReq) Reset()

func (*IndexReq) String

func (m *IndexReq) String() string

func (*IndexReq) XXX_DiscardUnknown

func (m *IndexReq) XXX_DiscardUnknown()

func (*IndexReq) XXX_Marshal

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

func (*IndexReq) XXX_Merge

func (m *IndexReq) XXX_Merge(src proto.Message)

func (*IndexReq) XXX_Size

func (m *IndexReq) XXX_Size() int

func (*IndexReq) XXX_Unmarshal

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

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

func (*IndexResp) GetDoc

func (m *IndexResp) GetDoc() *Document

func (*IndexResp) ProtoMessage

func (*IndexResp) ProtoMessage()

func (*IndexResp) Reset

func (m *IndexResp) Reset()

func (*IndexResp) String

func (m *IndexResp) String() string

func (*IndexResp) XXX_DiscardUnknown

func (m *IndexResp) XXX_DiscardUnknown()

func (*IndexResp) XXX_Marshal

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

func (*IndexResp) XXX_Merge

func (m *IndexResp) XXX_Merge(src proto.Message)

func (*IndexResp) XXX_Size

func (m *IndexResp) XXX_Size() int

func (*IndexResp) XXX_Unmarshal

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

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

func (*RemoveReq) GetHash

func (m *RemoveReq) GetHash() string

func (*RemoveReq) ProtoMessage

func (*RemoveReq) ProtoMessage()

func (*RemoveReq) Reset

func (m *RemoveReq) Reset()

func (*RemoveReq) String

func (m *RemoveReq) String() string

func (*RemoveReq) XXX_DiscardUnknown

func (m *RemoveReq) XXX_DiscardUnknown()

func (*RemoveReq) XXX_Marshal

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

func (*RemoveReq) XXX_Merge

func (m *RemoveReq) XXX_Merge(src proto.Message)

func (*RemoveReq) XXX_Size

func (m *RemoveReq) XXX_Size() int

func (*RemoveReq) XXX_Unmarshal

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

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

func (*SearchReq) GetOptions

func (m *SearchReq) GetOptions() *SearchReq_Options

func (*SearchReq) GetQuery

func (m *SearchReq) GetQuery() string

func (*SearchReq) ProtoMessage

func (*SearchReq) ProtoMessage()

func (*SearchReq) Reset

func (m *SearchReq) Reset()

func (*SearchReq) String

func (m *SearchReq) String() string

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 (m *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 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 (m *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 (m *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 (m *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

type UnimplementedLensV2Server

type UnimplementedLensV2Server struct {
}

UnimplementedLensV2Server can be embedded to have forward compatible implementations.

func (*UnimplementedLensV2Server) Index

func (*UnimplementedLensV2Server) Remove

func (*UnimplementedLensV2Server) Search

Jump to

Keyboard shortcuts

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