Documentation ¶
Index ¶
- type Yesod
- func (y *Yesod) CreateFeedConfig(ctx context.Context, config *modelyesod.FeedConfig) (model.InternalID, *errors.Error)
- func (y *Yesod) GetFeedItem(ctx context.Context, id model.InternalID) (*modelfeed.Item, *errors.Error)
- func (y *Yesod) GetFeedItems(ctx context.Context, ids []model.InternalID) ([]*modelfeed.Item, *errors.Error)
- func (y *Yesod) GroupFeedItems(ctx context.Context, groupBy modelyesod.GroupFeedItemsBy, ...) (map[model.TimeRange][]*modelyesod.FeedItemDigest, *errors.Error)
- func (y *Yesod) ListFeedCategories(ctx context.Context) ([]string, *errors.Error)
- func (y *Yesod) ListFeedItems(ctx context.Context, paging model.Paging, feedIDs []model.InternalID, ...) ([]*modelyesod.FeedItemDigest, int, *errors.Error)
- func (y *Yesod) ListFeedPlatforms(ctx context.Context) ([]string, *errors.Error)
- func (y *Yesod) ListFeeds(ctx context.Context, paging model.Paging, ids []model.InternalID, ...) ([]*modelyesod.FeedWithConfig, int, *errors.Error)
- func (y *Yesod) PullFeeds(ctx context.Context) error
- func (y *Yesod) ReadFeedItem(ctx context.Context, id model.InternalID) *errors.Error
- func (y *Yesod) UpdateFeedConfig(ctx context.Context, config *modelyesod.FeedConfig) *errors.Error
- type YesodRepo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Yesod ¶
type Yesod struct {
// contains filtered or unexported fields
}
func NewYesod ¶
func NewYesod( repo YesodRepo, supv *supervisor.Supervisor, cron *libcron.Cron, sClient *client.Searcher, pullFeed *libmq.Topic[modelyesod.PullFeed], ) (*Yesod, error)
func (*Yesod) CreateFeedConfig ¶
func (y *Yesod) CreateFeedConfig(ctx context.Context, config *modelyesod.FeedConfig) (model.InternalID, *errors.Error)
func (*Yesod) GetFeedItem ¶ added in v0.0.8
func (*Yesod) GetFeedItems ¶ added in v0.0.8
func (*Yesod) GroupFeedItems ¶ added in v0.0.9
func (y *Yesod) GroupFeedItems( ctx context.Context, groupBy modelyesod.GroupFeedItemsBy, feedIDs []model.InternalID, authorIDs []model.InternalID, platforms []string, timeRange *model.TimeRange, groupSize int, categories []string, ) (map[model.TimeRange][]*modelyesod.FeedItemDigest, *errors.Error)
func (*Yesod) ListFeedCategories ¶ added in v0.1.15
func (*Yesod) ListFeedItems ¶ added in v0.0.8
func (y *Yesod) ListFeedItems( ctx context.Context, paging model.Paging, feedIDs []model.InternalID, authorIDs []model.InternalID, platforms []string, timeRange *model.TimeRange, categories []string, ) ([]*modelyesod.FeedItemDigest, int, *errors.Error)
func (*Yesod) ListFeedPlatforms ¶ added in v0.1.15
func (*Yesod) ListFeeds ¶ added in v0.0.8
func (y *Yesod) ListFeeds( ctx context.Context, paging model.Paging, ids []model.InternalID, authorIDs []model.InternalID, sources []string, statuses []modelyesod.FeedConfigStatus, categories []string, ) ([]*modelyesod.FeedWithConfig, int, *errors.Error)
func (*Yesod) ReadFeedItem ¶ added in v0.1.15
func (*Yesod) UpdateFeedConfig ¶
func (y *Yesod) UpdateFeedConfig(ctx context.Context, config *modelyesod.FeedConfig) *errors.Error
type YesodRepo ¶
type YesodRepo interface { CreateFeedConfig(context.Context, model.InternalID, *modelyesod.FeedConfig) error UpdateFeedConfig(context.Context, model.InternalID, *modelyesod.FeedConfig) error ListFeedCategories(context.Context, model.InternalID) ([]string, error) ListFeedPlatforms(context.Context, model.InternalID) ([]string, error) ListFeedConfigNeedPull(context.Context, []string, []modelyesod.FeedConfigStatus, modelyesod.ListFeedOrder, time.Time, int) ([]*modelyesod.FeedConfig, error) UpdateFeedConfigAsInQueue(context.Context, model.InternalID) error ListFeedConfigs(context.Context, model.InternalID, model.Paging, []model.InternalID, []model.InternalID, []string, []modelyesod.FeedConfigStatus, []string) ([]*modelyesod.FeedWithConfig, int, error) ListFeedItems(context.Context, model.InternalID, model.Paging, []model.InternalID, []model.InternalID, []string, *model.TimeRange, []string) ([]*modelyesod.FeedItemDigest, int, error) GroupFeedItems(context.Context, model.InternalID, []model.TimeRange, []model.InternalID, []model.InternalID, []string, int, []string) ( map[model.TimeRange][]*modelyesod.FeedItemDigest, error) GetFeedItems(context.Context, model.InternalID, []model.InternalID) ([]*modelfeed.Item, error) ReadFeedItem(context.Context, model.InternalID, model.InternalID) error }
Click to show internal directories.
Click to hide internal directories.