search

package
v0.0.0-...-2af310e Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_search_proto protoreflect.FileDescriptor

Functions

func NewSearchEndpoints

func NewSearchEndpoints() []*api.Endpoint

func RegisterSearchHandler

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

Types

type CreateIndexRequest

type CreateIndexRequest struct {

	// The name of the index
	Index string `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"`
	// contains filtered or unexported fields
}

Create an index by name

func (*CreateIndexRequest) Descriptor deprecated

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

Deprecated: Use CreateIndexRequest.ProtoReflect.Descriptor instead.

func (*CreateIndexRequest) GetIndex

func (x *CreateIndexRequest) GetIndex() string

func (*CreateIndexRequest) ProtoMessage

func (*CreateIndexRequest) ProtoMessage()

func (*CreateIndexRequest) ProtoReflect

func (x *CreateIndexRequest) ProtoReflect() protoreflect.Message

func (*CreateIndexRequest) Reset

func (x *CreateIndexRequest) Reset()

func (*CreateIndexRequest) String

func (x *CreateIndexRequest) String() string

type CreateIndexResponse

type CreateIndexResponse struct {
	// contains filtered or unexported fields
}

func (*CreateIndexResponse) Descriptor deprecated

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

Deprecated: Use CreateIndexResponse.ProtoReflect.Descriptor instead.

func (*CreateIndexResponse) ProtoMessage

func (*CreateIndexResponse) ProtoMessage()

func (*CreateIndexResponse) ProtoReflect

func (x *CreateIndexResponse) ProtoReflect() protoreflect.Message

func (*CreateIndexResponse) Reset

func (x *CreateIndexResponse) Reset()

func (*CreateIndexResponse) String

func (x *CreateIndexResponse) String() string

type DeleteIndexRequest

type DeleteIndexRequest struct {

	// The name of the index to delete
	Index string `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"`
	// contains filtered or unexported fields
}

Delete an index by name

func (*DeleteIndexRequest) Descriptor deprecated

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

Deprecated: Use DeleteIndexRequest.ProtoReflect.Descriptor instead.

func (*DeleteIndexRequest) GetIndex

func (x *DeleteIndexRequest) GetIndex() string

func (*DeleteIndexRequest) ProtoMessage

func (*DeleteIndexRequest) ProtoMessage()

func (*DeleteIndexRequest) ProtoReflect

func (x *DeleteIndexRequest) ProtoReflect() protoreflect.Message

func (*DeleteIndexRequest) Reset

func (x *DeleteIndexRequest) Reset()

func (*DeleteIndexRequest) String

func (x *DeleteIndexRequest) String() string

type DeleteIndexResponse

type DeleteIndexResponse struct {
	// contains filtered or unexported fields
}

func (*DeleteIndexResponse) Descriptor deprecated

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

Deprecated: Use DeleteIndexResponse.ProtoReflect.Descriptor instead.

func (*DeleteIndexResponse) ProtoMessage

func (*DeleteIndexResponse) ProtoMessage()

func (*DeleteIndexResponse) ProtoReflect

func (x *DeleteIndexResponse) ProtoReflect() protoreflect.Message

func (*DeleteIndexResponse) Reset

func (x *DeleteIndexResponse) Reset()

func (*DeleteIndexResponse) String

func (x *DeleteIndexResponse) String() string

type DeleteRequest

type DeleteRequest struct {

	// The ID of the record to delete
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The index the record belongs to
	Index string `protobuf:"bytes,2,opt,name=index,proto3" json:"index,omitempty"`
	// contains filtered or unexported fields
}

Delete a record given its ID

func (*DeleteRequest) Descriptor deprecated

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

Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.

func (*DeleteRequest) GetId

func (x *DeleteRequest) GetId() string

func (*DeleteRequest) GetIndex

func (x *DeleteRequest) GetIndex() string

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) ProtoReflect

func (x *DeleteRequest) ProtoReflect() protoreflect.Message

func (*DeleteRequest) Reset

func (x *DeleteRequest) Reset()

func (*DeleteRequest) String

func (x *DeleteRequest) String() string

type DeleteResponse

type DeleteResponse struct {
	// contains filtered or unexported fields
}

func (*DeleteResponse) Descriptor deprecated

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

Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.

func (*DeleteResponse) ProtoMessage

func (*DeleteResponse) ProtoMessage()

func (*DeleteResponse) ProtoReflect

func (x *DeleteResponse) ProtoReflect() protoreflect.Message

func (*DeleteResponse) Reset

func (x *DeleteResponse) Reset()

func (*DeleteResponse) String

func (x *DeleteResponse) String() string

type Field

type Field struct {

	// The name of the field. Use a `.` separator to define nested fields e.g. foo.bar
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The type of the field - string, number
	Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*Field) Descriptor deprecated

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

Deprecated: Use Field.ProtoReflect.Descriptor instead.

func (*Field) GetName

func (x *Field) GetName() string

func (*Field) GetType

func (x *Field) GetType() string

func (*Field) ProtoMessage

func (*Field) ProtoMessage()

func (*Field) ProtoReflect

func (x *Field) ProtoReflect() protoreflect.Message

func (*Field) Reset

func (x *Field) Reset()

func (*Field) String

func (x *Field) String() string

type IndexRequest

type IndexRequest struct {

	// The index this record belongs to
	Index string `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"`
	// The data to index
	Data *structpb.Struct `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// Optional ID for the record
	Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

Index a record i.e. insert a document to search for.

func (*IndexRequest) Descriptor deprecated

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

Deprecated: Use IndexRequest.ProtoReflect.Descriptor instead.

func (*IndexRequest) GetData

func (x *IndexRequest) GetData() *structpb.Struct

func (*IndexRequest) GetId

func (x *IndexRequest) GetId() string

func (*IndexRequest) GetIndex

func (x *IndexRequest) GetIndex() string

func (*IndexRequest) ProtoMessage

func (*IndexRequest) ProtoMessage()

func (*IndexRequest) ProtoReflect

func (x *IndexRequest) ProtoReflect() protoreflect.Message

func (*IndexRequest) Reset

func (x *IndexRequest) Reset()

func (*IndexRequest) String

func (x *IndexRequest) String() string

type IndexResponse

type IndexResponse struct {

	// the indexed record
	Record *Record `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"`
	// contains filtered or unexported fields
}

func (*IndexResponse) Descriptor deprecated

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

Deprecated: Use IndexResponse.ProtoReflect.Descriptor instead.

func (*IndexResponse) GetRecord

func (x *IndexResponse) GetRecord() *Record

func (*IndexResponse) ProtoMessage

func (*IndexResponse) ProtoMessage()

func (*IndexResponse) ProtoReflect

func (x *IndexResponse) ProtoReflect() protoreflect.Message

func (*IndexResponse) Reset

func (x *IndexResponse) Reset()

func (*IndexResponse) String

func (x *IndexResponse) String() string

type Record

type Record struct {

	// The ID for this record. If blank, one will be generated
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The JSON contents of the record
	Data *structpb.Struct `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*Record) Descriptor deprecated

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

Deprecated: Use Record.ProtoReflect.Descriptor instead.

func (*Record) GetData

func (x *Record) GetData() *structpb.Struct

func (*Record) GetId

func (x *Record) GetId() string

func (*Record) ProtoMessage

func (*Record) ProtoMessage()

func (*Record) ProtoReflect

func (x *Record) ProtoReflect() protoreflect.Message

func (*Record) Reset

func (x *Record) Reset()

func (*Record) String

func (x *Record) String() string

type SearchRequest

type SearchRequest struct {

	// The index the record belongs to
	Index string `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"`
	// The query. See docs for query language examples
	Query string `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"`
	// contains filtered or unexported fields
}

Search for records in a given in index

func (*SearchRequest) Descriptor deprecated

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

Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead.

func (*SearchRequest) GetIndex

func (x *SearchRequest) GetIndex() string

func (*SearchRequest) GetQuery

func (x *SearchRequest) GetQuery() string

func (*SearchRequest) ProtoMessage

func (*SearchRequest) ProtoMessage()

func (*SearchRequest) ProtoReflect

func (x *SearchRequest) ProtoReflect() protoreflect.Message

func (*SearchRequest) Reset

func (x *SearchRequest) Reset()

func (*SearchRequest) String

func (x *SearchRequest) String() string

type SearchResponse

type SearchResponse struct {

	// The matching records
	Records []*Record `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"`
	// contains filtered or unexported fields
}

func (*SearchResponse) Descriptor deprecated

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

Deprecated: Use SearchResponse.ProtoReflect.Descriptor instead.

func (*SearchResponse) GetRecords

func (x *SearchResponse) GetRecords() []*Record

func (*SearchResponse) ProtoMessage

func (*SearchResponse) ProtoMessage()

func (*SearchResponse) ProtoReflect

func (x *SearchResponse) ProtoReflect() protoreflect.Message

func (*SearchResponse) Reset

func (x *SearchResponse) Reset()

func (*SearchResponse) String

func (x *SearchResponse) String() string

type SearchService

type SearchService interface {
	Index(ctx context.Context, in *IndexRequest, opts ...client.CallOption) (*IndexResponse, error)
	Delete(ctx context.Context, in *DeleteRequest, opts ...client.CallOption) (*DeleteResponse, error)
	Search(ctx context.Context, in *SearchRequest, opts ...client.CallOption) (*SearchResponse, error)
	CreateIndex(ctx context.Context, in *CreateIndexRequest, opts ...client.CallOption) (*CreateIndexResponse, error)
	DeleteIndex(ctx context.Context, in *DeleteIndexRequest, opts ...client.CallOption) (*DeleteIndexResponse, 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