Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FeedFetchMetadata ¶
type FeedFetchMetadata struct {
UUID string
ETag string
LastModified time.Time
UpdatedAt time.Time
FetchedAt time.Time
}
FeedFetchMetadata represents the metadata for feed fetch information.
type FeedMetadata ¶ added in v0.3.0
type FeedMetadata struct {
UUID string
Title string
Description string
Hash uint64
UpdatedAt time.Time
}
FeedMetadata represents the metadata for a feed and its content.
type Repository ¶
type Repository interface {
// FeedGetNByLastSynchronizationTime returns at most n feeds that have last been synchronized before
// a given time.Time.
//
// This method must return only feeds with at least one active user Subscription.
FeedGetNByLastSynchronizationTime(n uint, before time.Time) ([]feed.Feed, error)
// FeedUpdateFetchMetadata updates fetch metadata (ETag, FetchedAt, UpdatedAt) for a given feed.Feed.
FeedUpdateFetchMetadata(feedFetchMetadata FeedFetchMetadata) error
// FeedUpdateMetadata updates metadata (Title, Description) for a given feed.Feed.
FeedUpdateMetadata(feedMetadata FeedMetadata) error
// FeedEntryUpsertMany adds a collection of new entries and updates existing entries.
FeedEntryUpsertMany(entries []feed.Entry) (int64, error)
}
Repository provides access to feed data for synchronizing.
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
A Scheduler periodically synchronizes all syndication feeds.
func NewScheduler ¶
NewScheduler initializes and returns a Scheduler.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service handles feed synchronization operations.
func NewService ¶
func NewService(r Repository, client *fetching.Client) *Service
NewService initializes and returns a new feed synchronization service.
func (*Service) Synchronize ¶
Synchronize synchronizes syndication feeds for all users.
Click to show internal directories.
Click to hide internal directories.