pull

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fetch

func Fetch(ctx context.Context, link string) (*gofeed.Feed, error)

Types

type FeedRepo

type FeedRepo interface {
	All() ([]*model.Feed, error)
	Get(id uint) (*model.Feed, error)
	Update(id uint, feed *model.Feed) error
}

type ItemRepo

type ItemRepo interface {
	Creates(items []*model.Item) error
	IdentityExist(feedID uint, guid, link, title string) (bool, error)
}

type Puller

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

func NewPuller

func NewPuller(feedRepo FeedRepo, itemRepo ItemRepo) *Puller

func (*Puller) PullAll

func (p *Puller) PullAll(ctx context.Context) error

func (*Puller) PullOne

func (p *Puller) PullOne(id uint) error

func (*Puller) Run

func (p *Puller) Run()

Jump to

Keyboard shortcuts

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