feed

package
v1.39.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2024 License: GPL-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CleanupJob added in v1.29.0

type CleanupJob struct {
	CronSchedule time.Duration
	// contains filtered or unexported fields
}

func NewCleanupJob added in v1.29.0

func NewCleanupJob(log zerolog.Logger, cacheRepo domain.FeedCacheRepo) *CleanupJob

func (*CleanupJob) Run added in v1.29.0

func (j *CleanupJob) Run()

type FeedJob added in v1.34.0

type FeedJob interface {
	Run()
	RunE(ctx context.Context) error
}

func NewNewznabJob

func NewNewznabJob(feed *domain.Feed, name string, indexerIdentifier string, log zerolog.Logger, url string, client newznab.Client, repo domain.FeedRepo, cacheRepo domain.FeedCacheRepo, releaseSvc release.Service) FeedJob

func NewRSSJob

func NewRSSJob(feed *domain.Feed, name string, indexerIdentifier string, log zerolog.Logger, url string, repo domain.FeedRepo, cacheRepo domain.FeedCacheRepo, releaseSvc release.Service, timeout time.Duration) FeedJob

func NewTorznabJob

func NewTorznabJob(feed *domain.Feed, name string, indexerIdentifier string, log zerolog.Logger, url string, client torznab.Client, repo domain.FeedRepo, cacheRepo domain.FeedCacheRepo, releaseSvc release.Service) FeedJob

type NewznabJob

type NewznabJob struct {
	Feed              *domain.Feed
	Name              string
	IndexerIdentifier string
	Log               zerolog.Logger
	URL               string
	Client            newznab.Client
	Repo              domain.FeedRepo
	CacheRepo         domain.FeedCacheRepo
	ReleaseSvc        release.Service
	SchedulerSvc      scheduler.Service

	JobID int
	// contains filtered or unexported fields
}

func (*NewznabJob) Run

func (j *NewznabJob) Run()

func (*NewznabJob) RunE added in v1.34.0

func (j *NewznabJob) RunE(ctx context.Context) error

type RSSJob

type RSSJob struct {
	Feed              *domain.Feed
	Name              string
	IndexerIdentifier string
	Log               zerolog.Logger
	URL               string
	Repo              domain.FeedRepo
	CacheRepo         domain.FeedCacheRepo
	ReleaseSvc        release.Service
	Timeout           time.Duration

	JobID int
	// contains filtered or unexported fields
}

func (*RSSJob) Run

func (j *RSSJob) Run()

func (*RSSJob) RunE added in v1.34.0

func (j *RSSJob) RunE(ctx context.Context) error

type RSSParser

type RSSParser struct {
	// contains filtered or unexported fields
}

func NewFeedParser

func NewFeedParser(timeout time.Duration, cookie string) *RSSParser

NewFeedParser wraps the gofeed.Parser using our own http client for full control

func (*RSSParser) ParseURLWithContext

func (c *RSSParser) ParseURLWithContext(ctx context.Context, feedURL string) (feed *gofeed.Feed, err error)

type Service

type Service interface {
	FindByID(ctx context.Context, id int) (*domain.Feed, error)
	FindByIndexerIdentifier(ctx context.Context, indexer string) (*domain.Feed, error)
	Find(ctx context.Context) ([]domain.Feed, error)
	GetCacheByID(ctx context.Context, feedId int) ([]domain.FeedCacheItem, error)
	Store(ctx context.Context, feed *domain.Feed) error
	Update(ctx context.Context, feed *domain.Feed) error
	Test(ctx context.Context, feed *domain.Feed) error
	ToggleEnabled(ctx context.Context, id int, enabled bool) error
	Delete(ctx context.Context, id int) error
	DeleteFeedCache(ctx context.Context, id int) error
	GetLastRunData(ctx context.Context, id int) (string, error)
	DeleteFeedCacheStale(ctx context.Context) error
	ForceRun(ctx context.Context, id int) error

	Start() error
}

func NewService

func NewService(log logger.Logger, repo domain.FeedRepo, cacheRepo domain.FeedCacheRepo, releaseSvc release.Service, scheduler scheduler.Service) Service

type TorznabJob

type TorznabJob struct {
	Feed              *domain.Feed
	Name              string
	IndexerIdentifier string
	Log               zerolog.Logger
	URL               string
	Client            torznab.Client
	Repo              domain.FeedRepo
	CacheRepo         domain.FeedCacheRepo
	ReleaseSvc        release.Service
	SchedulerSvc      scheduler.Service

	JobID int
	// contains filtered or unexported fields
}

func (*TorznabJob) Run

func (j *TorznabJob) Run()

func (*TorznabJob) RunE added in v1.34.0

func (j *TorznabJob) RunE(ctx context.Context) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL