bizyesod

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2023 License: MIT Imports: 10 Imported by: 0

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 Paging

type Paging struct {
	PageSize int
	PageNum  int
}

type PullFeed

type PullFeed struct {
	InternalID int64
	URL        string
	Source     FeedConfigSource
}

type Yesod

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

func (*Yesod) CreateFeedConfig

func (y *Yesod) CreateFeedConfig(ctx context.Context, config *FeedConfig) (int64, error)

func (*Yesod) PullFeeds

func (y *Yesod) PullFeeds(ctx context.Context)

func (*Yesod) UpdateFeedConfig

func (y *Yesod) UpdateFeedConfig(ctx context.Context, config *FeedConfig) error

type YesodRepo

type YesodRepo interface {
	CreateFeedConfig(context.Context, *FeedConfig) 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
}

Jump to

Keyboard shortcuts

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