Documentation ¶
Index ¶
- func NewAPIRepo(log logger.Logger, db *DB) domain.APIRepo
- func NewActionRepo(log logger.Logger, db *DB, clientRepo domain.DownloadClientRepo) domain.ActionRepo
- func NewDownloadClientRepo(log logger.Logger, db *DB) domain.DownloadClientRepo
- func NewFeedCacheRepo(log logger.Logger, db *DB) domain.FeedCacheRepo
- func NewFeedRepo(log logger.Logger, db *DB) domain.FeedRepo
- func NewFilterRepo(log logger.Logger, db *DB) domain.FilterRepo
- func NewIndexerRepo(log logger.Logger, db *DB) domain.IndexerRepo
- func NewIrcRepo(log logger.Logger, db *DB) domain.IrcRepo
- func NewNotificationRepo(log logger.Logger, db *DB) domain.NotificationRepo
- func NewProxyRepo(log logger.Logger, db *DB) domain.ProxyRepo
- func NewReleaseRepo(log logger.Logger, db *DB) domain.ReleaseRepo
- func NewUserRepo(log logger.Logger, db *DB) domain.UserRepo
- type APIRepo
- type ActionRepo
- func (r *ActionRepo) Delete(ctx context.Context, req *domain.DeleteActionRequest) error
- func (r *ActionRepo) DeleteByFilterID(ctx context.Context, filterID int) error
- func (r *ActionRepo) FindByFilterID(ctx context.Context, filterID int, active *bool, withClient bool) ([]*domain.Action, error)
- func (r *ActionRepo) FindByFilterIDTx(ctx context.Context, filterID int, active *bool) ([]*domain.Action, error)
- func (r *ActionRepo) Get(ctx context.Context, req *domain.GetActionRequest) (*domain.Action, error)
- func (r *ActionRepo) List(ctx context.Context) ([]domain.Action, error)
- func (r *ActionRepo) Store(ctx context.Context, action domain.Action) (*domain.Action, error)
- func (r *ActionRepo) StoreFilterActions(ctx context.Context, filterID int64, actions []*domain.Action) ([]*domain.Action, error)
- func (r *ActionRepo) ToggleEnabled(actionID int) error
- func (r *ActionRepo) Update(ctx context.Context, action domain.Action) (*domain.Action, error)
- type DB
- type DownloadClientRepo
- func (r *DownloadClientRepo) Delete(ctx context.Context, clientID int32) error
- func (r *DownloadClientRepo) FindByID(ctx context.Context, id int32) (*domain.DownloadClient, error)
- func (r *DownloadClientRepo) List(ctx context.Context) ([]domain.DownloadClient, error)
- func (r *DownloadClientRepo) Store(ctx context.Context, client *domain.DownloadClient) error
- func (r *DownloadClientRepo) Update(ctx context.Context, client *domain.DownloadClient) error
- type FeedCacheRepo
- func (r *FeedCacheRepo) Delete(ctx context.Context, feedId int, key string) error
- func (r *FeedCacheRepo) DeleteByFeed(ctx context.Context, feedId int) error
- func (r *FeedCacheRepo) DeleteStale(ctx context.Context) error
- func (r *FeedCacheRepo) Exists(feedId int, key string) (bool, error)
- func (r *FeedCacheRepo) Get(feedId int, key string) ([]byte, error)
- func (r *FeedCacheRepo) GetByFeed(ctx context.Context, feedId int) ([]domain.FeedCacheItem, error)
- func (r *FeedCacheRepo) GetCountByFeed(ctx context.Context, feedId int) (int, error)
- func (r *FeedCacheRepo) Put(feedId int, key string, val []byte, ttl time.Time) error
- func (r *FeedCacheRepo) PutMany(ctx context.Context, items []domain.FeedCacheItem) error
- type FeedRepo
- func (r *FeedRepo) Delete(ctx context.Context, id int) error
- func (r *FeedRepo) Find(ctx context.Context) ([]domain.Feed, error)
- func (r *FeedRepo) FindByID(ctx context.Context, id int) (*domain.Feed, error)
- func (r *FeedRepo) FindOne(ctx context.Context, params domain.FindOneParams) (*domain.Feed, error)
- func (r *FeedRepo) GetLastRunDataByID(ctx context.Context, id int) (string, error)
- func (r *FeedRepo) Store(ctx context.Context, feed *domain.Feed) error
- func (r *FeedRepo) ToggleEnabled(ctx context.Context, id int, enabled bool) error
- func (r *FeedRepo) Update(ctx context.Context, feed *domain.Feed) error
- func (r *FeedRepo) UpdateLastRun(ctx context.Context, feedID int) error
- func (r *FeedRepo) UpdateLastRunWithData(ctx context.Context, feedID int, data string) error
- type FilterRepo
- func (r *FilterRepo) Delete(ctx context.Context, filterID int) error
- func (r *FilterRepo) DeleteFilterExternal(ctx context.Context, filterID int) error
- func (r *FilterRepo) DeleteIndexerConnections(ctx context.Context, filterID int) error
- func (r *FilterRepo) Find(ctx context.Context, params domain.FilterQueryParams) ([]domain.Filter, error)
- func (r *FilterRepo) FindByID(ctx context.Context, filterID int) (*domain.Filter, error)
- func (r *FilterRepo) FindByIndexerIdentifier(ctx context.Context, indexer string) ([]*domain.Filter, error)
- func (r *FilterRepo) FindExternalFiltersByID(ctx context.Context, filterId int) ([]domain.FilterExternal, error)
- func (r *FilterRepo) GetDownloadsByFilterId(ctx context.Context, filterID int) (*domain.FilterDownloads, error)
- func (r *FilterRepo) ListFilters(ctx context.Context) ([]domain.Filter, error)
- func (r *FilterRepo) Store(ctx context.Context, filter *domain.Filter) error
- func (r *FilterRepo) StoreFilterExternal(ctx context.Context, filterID int, externalFilters []domain.FilterExternal) error
- func (r *FilterRepo) StoreIndexerConnection(ctx context.Context, filterID int, indexerID int) error
- func (r *FilterRepo) StoreIndexerConnections(ctx context.Context, filterID int, indexers []domain.Indexer) error
- func (r *FilterRepo) ToggleEnabled(ctx context.Context, filterID int, enabled bool) error
- func (r *FilterRepo) Update(ctx context.Context, filter *domain.Filter) error
- func (r *FilterRepo) UpdatePartial(ctx context.Context, filter domain.FilterUpdate) error
- type ILikeDynamic
- type IndexerRepo
- func (r *IndexerRepo) Delete(ctx context.Context, id int) error
- func (r *IndexerRepo) FindByFilterID(ctx context.Context, id int) ([]domain.Indexer, error)
- func (r *IndexerRepo) FindByID(ctx context.Context, id int) (*domain.Indexer, error)
- func (r *IndexerRepo) GetBy(ctx context.Context, req domain.GetIndexerRequest) (*domain.Indexer, error)
- func (r *IndexerRepo) List(ctx context.Context) ([]domain.Indexer, error)
- func (r *IndexerRepo) Store(ctx context.Context, indexer domain.Indexer) (*domain.Indexer, error)
- func (r *IndexerRepo) ToggleEnabled(ctx context.Context, indexerID int, enabled bool) error
- func (r *IndexerRepo) Update(ctx context.Context, indexer domain.Indexer) (*domain.Indexer, error)
- type IrcRepo
- func (r *IrcRepo) CheckExistingNetwork(ctx context.Context, network *domain.IrcNetwork) (*domain.IrcNetwork, error)
- func (r *IrcRepo) DeleteNetwork(ctx context.Context, id int64) error
- func (r *IrcRepo) FindActiveNetworks(ctx context.Context) ([]domain.IrcNetwork, error)
- func (r *IrcRepo) GetNetworkByID(ctx context.Context, id int64) (*domain.IrcNetwork, error)
- func (r *IrcRepo) ListChannels(networkID int64) ([]domain.IrcChannel, error)
- func (r *IrcRepo) ListNetworks(ctx context.Context) ([]domain.IrcNetwork, error)
- func (r *IrcRepo) StoreChannel(ctx context.Context, networkID int64, channel *domain.IrcChannel) error
- func (r *IrcRepo) StoreNetwork(ctx context.Context, network *domain.IrcNetwork) error
- func (r *IrcRepo) StoreNetworkChannels(ctx context.Context, networkID int64, channels []domain.IrcChannel) error
- func (r *IrcRepo) UpdateChannel(channel *domain.IrcChannel) error
- func (r *IrcRepo) UpdateInviteCommand(networkID int64, invite string) error
- func (r *IrcRepo) UpdateNetwork(ctx context.Context, network *domain.IrcNetwork) error
- type NotificationRepo
- func (r *NotificationRepo) Delete(ctx context.Context, notificationID int) error
- func (r *NotificationRepo) Find(ctx context.Context, params domain.NotificationQueryParams) ([]domain.Notification, int, error)
- func (r *NotificationRepo) FindByID(ctx context.Context, id int) (*domain.Notification, error)
- func (r *NotificationRepo) List(ctx context.Context) ([]domain.Notification, error)
- func (r *NotificationRepo) Store(ctx context.Context, notification *domain.Notification) error
- func (r *NotificationRepo) Update(ctx context.Context, notification *domain.Notification) error
- type ProxyRepo
- func (r *ProxyRepo) Delete(ctx context.Context, id int64) error
- func (r *ProxyRepo) FindByID(ctx context.Context, id int64) (*domain.Proxy, error)
- func (r *ProxyRepo) List(ctx context.Context) ([]domain.Proxy, error)
- func (r *ProxyRepo) Store(ctx context.Context, p *domain.Proxy) error
- func (r *ProxyRepo) ToggleEnabled(ctx context.Context, id int64, enabled bool) error
- func (r *ProxyRepo) Update(ctx context.Context, p *domain.Proxy) error
- type ReleaseRepo
- func (repo *ReleaseRepo) CheckSmartEpisodeCanDownload(ctx context.Context, p *domain.SmartEpisodeParams) (bool, error)
- func (repo *ReleaseRepo) Delete(ctx context.Context, req *domain.DeleteReleaseRequest) error
- func (repo *ReleaseRepo) Find(ctx context.Context, params domain.ReleaseQueryParams) (*domain.FindReleasesResponse, error)
- func (repo *ReleaseRepo) Get(ctx context.Context, req *domain.GetReleaseRequest) (*domain.Release, error)
- func (repo *ReleaseRepo) GetActionStatus(ctx context.Context, req *domain.GetReleaseActionStatusRequest) (*domain.ReleaseActionStatus, error)
- func (repo *ReleaseRepo) GetActionStatusByReleaseID(ctx context.Context, releaseID int64) ([]domain.ReleaseActionStatus, error)
- func (repo *ReleaseRepo) GetIndexerOptions(ctx context.Context) ([]string, error)
- func (repo *ReleaseRepo) Stats(ctx context.Context) (*domain.ReleaseStats, error)
- func (repo *ReleaseRepo) Store(ctx context.Context, r *domain.Release) error
- func (repo *ReleaseRepo) StoreReleaseActionStatus(ctx context.Context, status *domain.ReleaseActionStatus) error
- func (repo *ReleaseRepo) Update(ctx context.Context, r *domain.Release) error
- func (repo *ReleaseRepo) UpdateBaseURL(ctx context.Context, indexer string, oldBaseURL, newBaseURL string) error
- type Tx
- type UserRepo
- func (r *UserRepo) Delete(ctx context.Context, username string) error
- func (r *UserRepo) FindByUsername(ctx context.Context, username string) (*domain.User, error)
- func (r *UserRepo) GetUserCount(ctx context.Context) (int, error)
- func (r *UserRepo) Store(ctx context.Context, req domain.CreateUserRequest) error
- func (r *UserRepo) Update(ctx context.Context, user domain.UpdateUserRequest) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewActionRepo ¶
func NewActionRepo(log logger.Logger, db *DB, clientRepo domain.DownloadClientRepo) domain.ActionRepo
func NewDownloadClientRepo ¶
func NewDownloadClientRepo(log logger.Logger, db *DB) domain.DownloadClientRepo
func NewFeedCacheRepo ¶
func NewFeedCacheRepo(log logger.Logger, db *DB) domain.FeedCacheRepo
func NewFilterRepo ¶
func NewFilterRepo(log logger.Logger, db *DB) domain.FilterRepo
func NewIndexerRepo ¶
func NewIndexerRepo(log logger.Logger, db *DB) domain.IndexerRepo
func NewNotificationRepo ¶
func NewNotificationRepo(log logger.Logger, db *DB) domain.NotificationRepo
func NewReleaseRepo ¶
func NewReleaseRepo(log logger.Logger, db *DB) domain.ReleaseRepo
Types ¶
type APIRepo ¶
type APIRepo struct {
// contains filtered or unexported fields
}
func (*APIRepo) GetAllAPIKeys ¶ added in v1.46.0
type ActionRepo ¶
type ActionRepo struct {
// contains filtered or unexported fields
}
func (*ActionRepo) Delete ¶
func (r *ActionRepo) Delete(ctx context.Context, req *domain.DeleteActionRequest) error
func (*ActionRepo) DeleteByFilterID ¶
func (r *ActionRepo) DeleteByFilterID(ctx context.Context, filterID int) error
func (*ActionRepo) FindByFilterID ¶
func (*ActionRepo) FindByFilterIDTx ¶ added in v1.46.0
func (*ActionRepo) Get ¶ added in v1.26.0
func (r *ActionRepo) Get(ctx context.Context, req *domain.GetActionRequest) (*domain.Action, error)
func (*ActionRepo) StoreFilterActions ¶
func (*ActionRepo) ToggleEnabled ¶
func (r *ActionRepo) ToggleEnabled(actionID int) error
type DB ¶
type DownloadClientRepo ¶
type DownloadClientRepo struct {
// contains filtered or unexported fields
}
func (*DownloadClientRepo) Delete ¶
func (r *DownloadClientRepo) Delete(ctx context.Context, clientID int32) error
func (*DownloadClientRepo) FindByID ¶
func (r *DownloadClientRepo) FindByID(ctx context.Context, id int32) (*domain.DownloadClient, error)
func (*DownloadClientRepo) List ¶
func (r *DownloadClientRepo) List(ctx context.Context) ([]domain.DownloadClient, error)
func (*DownloadClientRepo) Store ¶
func (r *DownloadClientRepo) Store(ctx context.Context, client *domain.DownloadClient) error
func (*DownloadClientRepo) Update ¶
func (r *DownloadClientRepo) Update(ctx context.Context, client *domain.DownloadClient) error
type FeedCacheRepo ¶
type FeedCacheRepo struct {
// contains filtered or unexported fields
}
func (*FeedCacheRepo) DeleteByFeed ¶ added in v1.29.0
func (r *FeedCacheRepo) DeleteByFeed(ctx context.Context, feedId int) error
func (*FeedCacheRepo) DeleteStale ¶ added in v1.29.0
func (r *FeedCacheRepo) DeleteStale(ctx context.Context) error
func (*FeedCacheRepo) GetByFeed ¶ added in v1.29.0
func (r *FeedCacheRepo) GetByFeed(ctx context.Context, feedId int) ([]domain.FeedCacheItem, error)
func (*FeedCacheRepo) GetCountByFeed ¶ added in v1.29.0
func (*FeedCacheRepo) PutMany ¶ added in v1.32.0
func (r *FeedCacheRepo) PutMany(ctx context.Context, items []domain.FeedCacheItem) error
type FeedRepo ¶
type FeedRepo struct {
// contains filtered or unexported fields
}
func (*FeedRepo) GetLastRunDataByID ¶
func (*FeedRepo) ToggleEnabled ¶
func (*FeedRepo) UpdateLastRun ¶
type FilterRepo ¶
type FilterRepo struct {
// contains filtered or unexported fields
}
func (*FilterRepo) DeleteFilterExternal ¶ added in v1.29.0
func (r *FilterRepo) DeleteFilterExternal(ctx context.Context, filterID int) error
func (*FilterRepo) DeleteIndexerConnections ¶
func (r *FilterRepo) DeleteIndexerConnections(ctx context.Context, filterID int) error
func (*FilterRepo) Find ¶
func (r *FilterRepo) Find(ctx context.Context, params domain.FilterQueryParams) ([]domain.Filter, error)
func (*FilterRepo) FindByIndexerIdentifier ¶
func (r *FilterRepo) FindByIndexerIdentifier(ctx context.Context, indexer string) ([]*domain.Filter, error)
FindByIndexerIdentifier find active filters with active indexer only
func (*FilterRepo) FindExternalFiltersByID ¶ added in v1.29.0
func (r *FilterRepo) FindExternalFiltersByID(ctx context.Context, filterId int) ([]domain.FilterExternal, error)
func (*FilterRepo) GetDownloadsByFilterId ¶
func (r *FilterRepo) GetDownloadsByFilterId(ctx context.Context, filterID int) (*domain.FilterDownloads, error)
GetDownloadsByFilterId looks up how many `PENDING` or `PUSH_APPROVED` releases there have been for the given filter in the current time window starting at the start of the unit (since the beginning of the most recent hour/day/week).
See also https://github.com/autobrr/autobrr/pull/1285#pullrequestreview-1795913581
func (*FilterRepo) ListFilters ¶
func (*FilterRepo) StoreFilterExternal ¶ added in v1.29.0
func (r *FilterRepo) StoreFilterExternal(ctx context.Context, filterID int, externalFilters []domain.FilterExternal) error
func (*FilterRepo) StoreIndexerConnection ¶
func (*FilterRepo) StoreIndexerConnections ¶
func (*FilterRepo) ToggleEnabled ¶
func (*FilterRepo) UpdatePartial ¶
func (r *FilterRepo) UpdatePartial(ctx context.Context, filter domain.FilterUpdate) error
type ILikeDynamic ¶
type IndexerRepo ¶
type IndexerRepo struct {
// contains filtered or unexported fields
}
func (*IndexerRepo) FindByFilterID ¶
func (*IndexerRepo) GetBy ¶ added in v1.45.0
func (r *IndexerRepo) GetBy(ctx context.Context, req domain.GetIndexerRequest) (*domain.Indexer, error)
func (*IndexerRepo) ToggleEnabled ¶ added in v1.32.0
type IrcRepo ¶
type IrcRepo struct {
// contains filtered or unexported fields
}
func (*IrcRepo) CheckExistingNetwork ¶
func (r *IrcRepo) CheckExistingNetwork(ctx context.Context, network *domain.IrcNetwork) (*domain.IrcNetwork, error)
func (*IrcRepo) DeleteNetwork ¶
func (*IrcRepo) FindActiveNetworks ¶
func (*IrcRepo) GetNetworkByID ¶
func (*IrcRepo) ListChannels ¶
func (r *IrcRepo) ListChannels(networkID int64) ([]domain.IrcChannel, error)
func (*IrcRepo) ListNetworks ¶
func (*IrcRepo) StoreChannel ¶
func (*IrcRepo) StoreNetwork ¶
func (*IrcRepo) StoreNetworkChannels ¶
func (*IrcRepo) UpdateChannel ¶
func (r *IrcRepo) UpdateChannel(channel *domain.IrcChannel) error
func (*IrcRepo) UpdateInviteCommand ¶
func (*IrcRepo) UpdateNetwork ¶
type NotificationRepo ¶
type NotificationRepo struct {
// contains filtered or unexported fields
}
func (*NotificationRepo) Delete ¶
func (r *NotificationRepo) Delete(ctx context.Context, notificationID int) error
func (*NotificationRepo) Find ¶
func (r *NotificationRepo) Find(ctx context.Context, params domain.NotificationQueryParams) ([]domain.Notification, int, error)
func (*NotificationRepo) FindByID ¶
func (r *NotificationRepo) FindByID(ctx context.Context, id int) (*domain.Notification, error)
func (*NotificationRepo) List ¶
func (r *NotificationRepo) List(ctx context.Context) ([]domain.Notification, error)
func (*NotificationRepo) Store ¶
func (r *NotificationRepo) Store(ctx context.Context, notification *domain.Notification) error
func (*NotificationRepo) Update ¶
func (r *NotificationRepo) Update(ctx context.Context, notification *domain.Notification) error
type ProxyRepo ¶ added in v1.46.0
type ProxyRepo struct {
// contains filtered or unexported fields
}
func (*ProxyRepo) ToggleEnabled ¶ added in v1.46.0
type ReleaseRepo ¶
type ReleaseRepo struct {
// contains filtered or unexported fields
}
func (*ReleaseRepo) CheckSmartEpisodeCanDownload ¶ added in v1.43.0
func (repo *ReleaseRepo) CheckSmartEpisodeCanDownload(ctx context.Context, p *domain.SmartEpisodeParams) (bool, error)
func (*ReleaseRepo) Delete ¶
func (repo *ReleaseRepo) Delete(ctx context.Context, req *domain.DeleteReleaseRequest) error
func (*ReleaseRepo) Find ¶
func (repo *ReleaseRepo) Find(ctx context.Context, params domain.ReleaseQueryParams) (*domain.FindReleasesResponse, error)
func (*ReleaseRepo) Get ¶ added in v1.26.0
func (repo *ReleaseRepo) Get(ctx context.Context, req *domain.GetReleaseRequest) (*domain.Release, error)
func (*ReleaseRepo) GetActionStatus ¶ added in v1.26.0
func (repo *ReleaseRepo) GetActionStatus(ctx context.Context, req *domain.GetReleaseActionStatusRequest) (*domain.ReleaseActionStatus, error)
func (*ReleaseRepo) GetActionStatusByReleaseID ¶
func (repo *ReleaseRepo) GetActionStatusByReleaseID(ctx context.Context, releaseID int64) ([]domain.ReleaseActionStatus, error)
func (*ReleaseRepo) GetIndexerOptions ¶
func (repo *ReleaseRepo) GetIndexerOptions(ctx context.Context) ([]string, error)
func (*ReleaseRepo) Stats ¶
func (repo *ReleaseRepo) Stats(ctx context.Context) (*domain.ReleaseStats, error)
func (*ReleaseRepo) StoreReleaseActionStatus ¶
func (repo *ReleaseRepo) StoreReleaseActionStatus(ctx context.Context, status *domain.ReleaseActionStatus) error
func (*ReleaseRepo) UpdateBaseURL ¶ added in v1.42.0
Source Files ¶
Click to show internal directories.
Click to hide internal directories.