Documentation
¶
Index ¶
- type DBStorage
- func (d *DBStorage) Close()
- func (d *DBStorage) Create(item *search.ExternalResultItem, additionalIndexKey *indexing.Key) error
- func (d *DBStorage) CreateWithId(keyParts *indexing.Key, tr *search.ExternalResultItem, ...) error
- func (d *DBStorage) Find(query indexing.Query, matchingItem *search.ExternalResultItem) error
- func (d *DBStorage) FindById(id string) *search.ExternalResultItem
- func (d *DBStorage) FindByNameAndIndex(title string, indexerSite string) *search.ExternalResultItem
- func (d *DBStorage) GetCategories() []db.TorrentCategory
- func (d *DBStorage) GetDb() *gorm.DB
- func (d *DBStorage) GetNewest(cnt int) []search.ExternalResultItem
- func (d *DBStorage) GetOlderThanHours(h int) []search.ExternalResultItem
- func (d *DBStorage) GetTorrentsInCategories(ids []int) []search.ExternalResultItem
- func (d *DBStorage) Size() int64
- func (d *DBStorage) Truncate()
- func (d *DBStorage) Update(query indexing.Query, item *search.ExternalResultItem) error
- func (d *DBStorage) UpdateResult(id uint, torrent *search.ExternalResultItem)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBStorage ¶
type DBStorage struct {
Path string
}
func (*DBStorage) CreateWithId ¶
func (d *DBStorage) CreateWithId(keyParts *indexing.Key, tr *search.ExternalResultItem, uniqueIndexKeys *indexing.Key) error
CreateWithId a new result record. In sqlite we're not using the key parts.
func (*DBStorage) FindById ¶
func (d *DBStorage) FindById(id string) *search.ExternalResultItem
Find a result by it's id
func (*DBStorage) FindByNameAndIndex ¶
func (d *DBStorage) FindByNameAndIndex(title string, indexerSite string) *search.ExternalResultItem
FindByNameAndIndex finds an item by it's name and index.
func (*DBStorage) GetCategories ¶
func (d *DBStorage) GetCategories() []db.TorrentCategory
func (*DBStorage) GetNewest ¶
func (d *DBStorage) GetNewest(cnt int) []search.ExternalResultItem
GetNewest gets the CNT latest results.
func (*DBStorage) GetOlderThanHours ¶
func (d *DBStorage) GetOlderThanHours(h int) []search.ExternalResultItem
func (*DBStorage) GetTorrentsInCategories ¶
func (d *DBStorage) GetTorrentsInCategories(ids []int) []search.ExternalResultItem
func (*DBStorage) UpdateResult ¶
func (d *DBStorage) UpdateResult(id uint, torrent *search.ExternalResultItem)
Click to show internal directories.
Click to hide internal directories.