Documentation ¶
Overview ¶
Package doc is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var IDReservedFieldName = []byte("_m3ninx_id")
IDReservedFieldName is the field name reserved for IDs.
Functions ¶
This section is empty.
Types ¶
type Document ¶
Document represents a document to be indexed.
func (Document) Compare ¶
Compare returns an integer comparing two documents. The result will be 0 if the documents are equal, -1 if d is ordered before other, and 1 if d is ordered aftered other.
func (Document) Get ¶
Get returns the value of the specified field name in the document if it exists.
type DocumentArr ¶ added in v0.5.0
type DocumentArr []Document
type DocumentArrPool ¶ added in v0.5.0
type DocumentArrPool struct {
// contains filtered or unexported fields
}
func (*DocumentArrPool) Get ¶ added in v0.5.0
func (p *DocumentArrPool) Get() []Document
func (*DocumentArrPool) Init ¶ added in v0.5.0
func (p *DocumentArrPool) Init()
func (*DocumentArrPool) Put ¶ added in v0.5.0
func (p *DocumentArrPool) Put(arr []Document)
type DocumentArrayPool ¶ added in v0.5.0
type DocumentArrayPool interface { // Init initializes the array pool, it needs to be called // before Get/Put use. Init() // Get returns the a slice from the pool. Get() []Document // Put returns the provided slice to the pool. Put(elems []Document) }
DocumentArrayPool provides a pool for document slices.
func NewDocumentArrayPool ¶ added in v0.5.0
func NewDocumentArrayPool(opts DocumentArrayPoolOpts) DocumentArrayPool
type DocumentArrayPoolOpts ¶ added in v0.5.0
type DocumentArrayPoolOpts struct { Options pool.ObjectPoolOptions Capacity int MaxCapacity int FinalizeFn DocumentFinalizeFn }
type DocumentFinalizeFn ¶ added in v0.5.0
type DocumentMatcher ¶
DocumentMatcher matches a given document.
func NewDocumentMatcher ¶
func NewDocumentMatcher(d Document) DocumentMatcher
NewDocumentMatcher returns a new DocumentMatcher.
type Iterator ¶
type Iterator interface { // Next returns a bool indicating if the iterator has any more documents // to return. Next() bool // Current returns the current document. It is only safe to call Current immediately // after a call to Next confirms there are more elements remaining. The Document // returned from Current is only valid until the following call to Next(). Callers // should copy the Document if they need it live longer. Current() Document // Err returns any errors encountered during iteration. Err() error // Close releases any internal resources used by the iterator. Close() error }
Iterator provides an iterator over a collection of documents. It is NOT safe for multiple goroutines to invoke methods on an Iterator simultaneously.
type MockIterator ¶
type MockIterator struct {
// contains filtered or unexported fields
}
MockIterator is a mock of Iterator interface
func NewMockIterator ¶
func NewMockIterator(ctrl *gomock.Controller) *MockIterator
NewMockIterator creates a new mock instance
func (*MockIterator) EXPECT ¶
func (m *MockIterator) EXPECT() *MockIteratorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockIteratorMockRecorder ¶
type MockIteratorMockRecorder struct {
// contains filtered or unexported fields
}
MockIteratorMockRecorder is the mock recorder for MockIterator
func (*MockIteratorMockRecorder) Close ¶
func (mr *MockIteratorMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close
func (*MockIteratorMockRecorder) Current ¶
func (mr *MockIteratorMockRecorder) Current() *gomock.Call
Current indicates an expected call of Current
func (*MockIteratorMockRecorder) Err ¶
func (mr *MockIteratorMockRecorder) Err() *gomock.Call
Err indicates an expected call of Err
func (*MockIteratorMockRecorder) Next ¶
func (mr *MockIteratorMockRecorder) Next() *gomock.Call
Next indicates an expected call of Next