feeds

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoRecentArticles = errors.New("no recent articles")

Functions

func NewConfigSite

func NewConfigSite() *shared.ConfigSite

func StartApiServer

func StartApiServer()

Types

type DigestFeed

type DigestFeed struct {
	Feeds []*Feed
}

type Feed

type Feed struct {
	Title       string
	Link        string
	Description string
	Items       []*FeedItem
}

type FeedHooks

type FeedHooks struct {
	Cfg *shared.ConfigSite
	Db  db.DB
}

func (*FeedHooks) FileMeta

func (p *FeedHooks) FileMeta(data *filehandlers.PostMetaData) error

func (*FeedHooks) FileValidate

func (p *FeedHooks) FileValidate(data *filehandlers.PostMetaData) (bool, error)

type FeedItem

type FeedItem struct {
	Title       string
	Link        string
	Description string
}

type Fetcher

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

func NewFetcher

func NewFetcher(dbpool db.DB, cfg *shared.ConfigSite) *Fetcher

func (*Fetcher) Fetch

func (f *Fetcher) Fetch(fp *gofeed.Parser, url string, lastDigest *time.Time) (*Feed, error)

func (*Fetcher) FetchAll

func (f *Fetcher) FetchAll(urls []string, lastDigest *time.Time) (string, error)

func (*Fetcher) Loop

func (f *Fetcher) Loop()

func (*Fetcher) Print

func (f *Fetcher) Print(feedTmpl *DigestFeed) (string, error)

func (*Fetcher) Run

func (f *Fetcher) Run() error

func (*Fetcher) RunPost

func (f *Fetcher) RunPost(user *db.User, post *db.Post) error

func (*Fetcher) RunUser

func (f *Fetcher) RunUser(user *db.User) error

func (*Fetcher) SendEmail

func (f *Fetcher) SendEmail(username, email, msg string) error

func (*Fetcher) Validate

func (f *Fetcher) Validate(lastDigest *time.Time, parsed *shared.ListParsedText) error

Jump to

Keyboard shortcuts

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