Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FeedConfig ¶
type FeedConfig struct { InternalID int64 FeedURL string AuthorAccount int64 Source FeedConfigSource Status FeedConfigStatus PullInterval time.Duration }
type FeedConfigSource ¶
type FeedConfigSource int
const ( FeedConfigSourceUnspecified FeedConfigSource = iota FeedConfigSourceCommon )
type FeedConfigStatus ¶
type FeedConfigStatus int
const ( FeedConfigStatusUnspecified FeedConfigStatus = iota FeedConfigStatusActive FeedConfigStatusSuspend )
type ListFeedOrder ¶
type ListFeedOrder int
const ( ListFeedOrderUnspecified ListFeedOrder = iota ListFeedOrderNextPull )
type PullFeed ¶
type PullFeed struct { InternalID int64 URL string Source FeedConfigSource }
type Yesod ¶
type Yesod struct {
// contains filtered or unexported fields
}
func NewYesod ¶
func NewYesod( repo YesodRepo, cron *libcron.Cron, mClient mapper.LibrarianMapperServiceClient, pClient porter.LibrarianPorterServiceClient, sClient searcher.LibrarianSearcherServiceClient, pullFeed *libmq.TopicImpl[PullFeed], ) (*Yesod, error)
func (*Yesod) CreateFeedConfig ¶
func (*Yesod) UpdateFeedConfig ¶
func (y *Yesod) UpdateFeedConfig(ctx context.Context, config *FeedConfig) error
type YesodRepo ¶
type YesodRepo interface { CreateFeedConfig(context.Context, *FeedConfig, model.InternalID) error UpdateFeedConfig(context.Context, *FeedConfig) error ListFeedConfig(context.Context, []int64, []int64, []FeedConfigSource, []FeedConfigStatus, ListFeedOrder, Paging) ([]*FeedConfig, error) ListFeedConfigNeedPull(context.Context, []FeedConfigSource, []FeedConfigStatus, ListFeedOrder, time.Time, int) ([]*FeedConfig, error) UpsertFeed(context.Context, *modelfeed.Feed) error }
Click to show internal directories.
Click to hide internal directories.