Documentation
¶
Index ¶
- type FilterOpts
- type Searcher
- type Service
- func (s *Service) AdvancedSearch(opts *FilterOpts) ([]models.Object, error)
- func (s *Service) Close() error
- func (s *Service) Get(keyName string) ([]byte, error)
- func (s *Service) GetEntries() ([]query.Entry, error)
- func (s *Service) Has(keyName string) (bool, error)
- func (s *Service) KeywordSearch(keywords []string) ([]models.Object, error)
- func (s *Service) MigrateEntries(entries []query.Entry, im *rtfs.IpfsManager, migrateContent bool) error
- func (s *Service) Put(keyName string, data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FilterOpts ¶
FilterOpts is used to configure an advanced search
type Searcher ¶
type Searcher interface {
// Close shuts down the service datastore
Close() error
// GetEntries is used to get all known entries
GetEntries() ([]query.Entry, error)
// MigrateEntries is used to migrate entries to newer object types
MigrateEntries(entries []query.Entry, im *rtfs.IpfsManager, migrateContent bool) error
// Put is used to store something in badgerds
Put(keyName string, data []byte) error
// Get is used to retrieve something from badgerds by key name
Get(keyName string) ([]byte, error)
// Has is used to check if our database has a key matching this name
Has(keyName string) (bool, error)
// KeywordSearch retrieves a slice of content hashes that were indexed with these keywords
KeywordSearch(keywords []string) ([]models.Object, error)
// AdvancedSearch is used to perform an advanced search against the lens index
AdvancedSearch(opts *FilterOpts) ([]models.Object, error)
}
Searcher provides the internal Lens search API
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is our searcher service
func NewService ¶
NewService is used to generate our new searcher service
func (*Service) AdvancedSearch ¶
func (s *Service) AdvancedSearch(opts *FilterOpts) ([]models.Object, error)
AdvancedSearch is used to perform an advanced search against the lens index
func (*Service) GetEntries ¶
GetEntries is used to get all known entries
func (*Service) KeywordSearch ¶
KeywordSearch retrieves a slice of content hashes that were indexed with these keywords
func (*Service) MigrateEntries ¶
func (s *Service) MigrateEntries(entries []query.Entry, im *rtfs.IpfsManager, migrateContent bool) error
MigrateEntries is used to migrate entries to newer object types
Click to show internal directories.
Click to hide internal directories.