mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 00:39:13 +00:00
fix(indexers): delete feed with indexer (#1810)
* fix(indexers): delete feed in one go * fix(indexers): sort imports * refactor(feeds): db methods for find
This commit is contained in:
parent
41216babe6
commit
40fe3e9f54
10 changed files with 167 additions and 92 deletions
|
@ -21,8 +21,8 @@ type FeedCacheRepo interface {
|
|||
}
|
||||
|
||||
type FeedRepo interface {
|
||||
FindOne(ctx context.Context, params FindOneParams) (*Feed, error)
|
||||
FindByID(ctx context.Context, id int) (*Feed, error)
|
||||
FindByIndexerIdentifier(ctx context.Context, indexer string) (*Feed, error)
|
||||
Find(ctx context.Context) ([]Feed, error)
|
||||
GetLastRunDataByID(ctx context.Context, id int) (string, error)
|
||||
Store(ctx context.Context, feed *Feed) error
|
||||
|
@ -91,3 +91,9 @@ type FeedCacheItem struct {
|
|||
Value []byte `json:"value"`
|
||||
TTL time.Time `json:"ttl"`
|
||||
}
|
||||
|
||||
type FindOneParams struct {
|
||||
FeedID int
|
||||
IndexerID int
|
||||
IndexerIdentifier string
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue