search

package
v0.0.0-...-d1b04fc Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2019 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

Package search is a generated protocol buffer package.

It is generated from these files:

search.proto

It has these top-level messages:

SearchQuery

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterSearchHandler

func RegisterSearchHandler(s server.Server, hdlr SearchHandler, opts ...server.HandlerOption) error

func RegisterSearchServer

func RegisterSearchServer(s *grpc.Server, srv SearchServer)

Types

type NoteManager

type NoteManager struct {
	Client *elastic.Client
	// contains filtered or unexported fields
}

func NewNoteManager

func NewNoteManager(host string, port string, index string, docType string) (*NoteManager, error)

func (*NoteManager) Delete

func (s *NoteManager) Delete(ctx context.Context, id string) error

func (*NoteManager) ElasticSearchVersion

func (s *NoteManager) ElasticSearchVersion() (string, error)

func (*NoteManager) EnsureIndex

func (s *NoteManager) EnsureIndex() (bool, error)

func (*NoteManager) Ping

func (s *NoteManager) Ping() (*elastic.PingResult, error)

func (*NoteManager) Put

func (s *NoteManager) Put(ctx context.Context, note *notes.Note) error

func (*NoteManager) Update

func (s *NoteManager) Update(ctx context.Context, note *notes.Note) error

type NoteSearcher

type NoteSearcher struct {
	Client *elastic.Client
	// contains filtered or unexported fields
}

func NewNoteSearcher

func NewNoteSearcher(host string, port string, index string, docType string) (*NoteSearcher, error)

func (*NoteSearcher) Search

func (s *NoteSearcher) Search(ctx context.Context, noteQuery *SearchQuery, resp *notes.NoteList) error

type SearchClient

type SearchClient interface {
	Search(ctx context.Context, in *SearchQuery, opts ...grpc.CallOption) (*notes.NoteList, error)
}

SearchClient is the client API for Search service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewSearchClient

func NewSearchClient(cc *grpc.ClientConn) SearchClient

type SearchHandler

type SearchHandler interface {
	Search(context.Context, *SearchQuery, *notes.NoteList) error
}

type SearchQuery

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

func (*SearchQuery) Descriptor

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

func (*SearchQuery) GetQuery

func (m *SearchQuery) GetQuery() string

func (*SearchQuery) ProtoMessage

func (*SearchQuery) ProtoMessage()

func (*SearchQuery) Reset

func (m *SearchQuery) Reset()

func (*SearchQuery) String

func (m *SearchQuery) String() string

func (*SearchQuery) XXX_DiscardUnknown

func (m *SearchQuery) XXX_DiscardUnknown()

func (*SearchQuery) XXX_Marshal

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

func (*SearchQuery) XXX_Merge

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

func (*SearchQuery) XXX_Size

func (m *SearchQuery) XXX_Size() int

func (*SearchQuery) XXX_Unmarshal

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

type SearchServer

type SearchServer interface {
	Search(context.Context, *SearchQuery) (*notes.NoteList, error)
}

SearchServer is the server API for Search service.

type SearchService

type SearchService interface {
	Search(ctx context.Context, in *SearchQuery, opts ...client.CallOption) (*notes.NoteList, error)
}

func NewSearchService

func NewSearchService(name string, c client.Client) SearchService

Jump to

Keyboard shortcuts

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