Documentation ¶
Index ¶
- Variables
- func IsSearchError(err error) bool
- func NewSearchError(httpCode int, code ErrCode, msg string, args ...interface{}) error
- type ErrCode
- type Error
- type IndexDocumentsOptions
- type NoopStore
- func (n *NoopStore) CreateCollection(_ context.Context, _ *tsApi.CollectionSchema) error
- func (n *NoopStore) DeleteDocuments(_ context.Context, _ string, _ string) error
- func (n *NoopStore) DropCollection(_ context.Context, _ string) error
- func (n *NoopStore) IndexDocuments(_ context.Context, _ string, _ io.Reader, _ IndexDocumentsOptions) error
- func (n *NoopStore) Search(_ context.Context, _ string, _ string, _ int, _ int) ([]tsApi.SearchResult, error)
- type Store
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrDuplicateEntity = NewSearchError(http.StatusConflict, ErrCodeDuplicate, "entity already exists") ErrNotFound = NewSearchError(http.StatusNotFound, ErrCodeNotFound, "not found") )
Functions ¶
func IsSearchError ¶
Types ¶
type IndexDocumentsOptions ¶
type NoopStore ¶
type NoopStore struct{}
func (*NoopStore) CreateCollection ¶
func (*NoopStore) DeleteDocuments ¶
func (*NoopStore) DropCollection ¶
func (*NoopStore) IndexDocuments ¶
type Store ¶
type Store interface { CreateCollection(ctx context.Context, schema *tsApi.CollectionSchema) error DropCollection(ctx context.Context, table string) error IndexDocuments(ctx context.Context, table string, documents io.Reader, options IndexDocumentsOptions) error DeleteDocuments(ctx context.Context, table string, key string) error Search(ctx context.Context, table string, filterBy string, page int, perPage int) ([]tsApi.SearchResult, error) }
Click to show internal directories.
Click to hide internal directories.