Documentation
¶
Index ¶
- type FirestoreConfig
- type FirestoreStorage
- func (f *FirestoreStorage) Close()
- func (f *FirestoreStorage) Create(item search.Record, additionalIndex *indexing.Key) error
- func (f *FirestoreStorage) CreateWithId(key *indexing.Key, item search.Record, uniqueIndexKeys *indexing.Key) error
- func (f *FirestoreStorage) Find(query indexing.Query, result interface{}) error
- func (f *FirestoreStorage) ForEach(callback func(record interface{}))
- func (f *FirestoreStorage) GetNewest(count int) []search.ExternalResultItem
- func (f *FirestoreStorage) HasIndex(meta *indexing.IndexMetadata) bool
- func (f *FirestoreStorage) Size() int64
- func (f *FirestoreStorage) Update(query indexing.Query, item interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FirestoreConfig ¶
type FirestoreStorage ¶
type FirestoreStorage struct {
// contains filtered or unexported fields
}
func NewFirestoreStorage ¶
func NewFirestoreStorage(conf *FirestoreConfig, typePtr interface{}) (*FirestoreStorage, error)
NewFirestoreStorage creates a new firestore backed storage
func (*FirestoreStorage) Close ¶
func (f *FirestoreStorage) Close()
func (*FirestoreStorage) Create ¶
Create a new record. This uses the UUIDValue for identifying records, upon creation a new UUID is generated.
func (*FirestoreStorage) CreateWithId ¶
func (f *FirestoreStorage) CreateWithId(key *indexing.Key, item search.Record, uniqueIndexKeys *indexing.Key) error
CreateWithId creates a new record using a custom key. If a key isn't provided, a random uuid is generated in it's place, and stored in the UUIDValue field.
func (*FirestoreStorage) Find ¶
func (f *FirestoreStorage) Find(query indexing.Query, result interface{}) error
func (*FirestoreStorage) ForEach ¶ added in v0.3.0
func (f *FirestoreStorage) ForEach(callback func(record interface{}))
func (*FirestoreStorage) GetNewest ¶
func (f *FirestoreStorage) GetNewest(count int) []search.ExternalResultItem
GetNewest returns the latest `count` of records.
func (*FirestoreStorage) HasIndex ¶ added in v0.3.3
func (f *FirestoreStorage) HasIndex(meta *indexing.IndexMetadata) bool
func (*FirestoreStorage) Size ¶
func (f *FirestoreStorage) Size() int64
Size is the size of the storage, as in records count
Click to show internal directories.
Click to hide internal directories.