feed

package
v1.32.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 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 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 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) *NewznabJob

func (*NewznabJob) Run

func (j *NewznabJob) Run()

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 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) *RSSJob

func (*RSSJob) Run

func (j *RSSJob) Run()

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

	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 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) *TorznabJob

func (*TorznabJob) Run

func (j *TorznabJob) Run()

Jump to

Keyboard shortcuts

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