feed

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

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

Entry describes an entry in a feed in a form suitable for templating.

func NewEntry

func NewEntry(feed *gofeed.Feed, entry *gofeed.Item) *Entry

NewEntry creates a new feed entry object.

func (Entry) Author

func (e Entry) Author() string

Author returns the entry's author, and if none, returns the feed's author.

func (Entry) Categories

func (e Entry) Categories() []string

Categories returns the entry's categories.

func (Entry) Content

func (e Entry) Content() template.HTML

Content returns the full content of the entry.

func (Entry) FeedDescription

func (e Entry) FeedDescription() string

FeedDescription returns the description of the feed, if any.

func (e Entry) FeedLink() template.URL

FeedLink returns the feed URL in a form usable in a template.

func (Entry) FeedName

func (e Entry) FeedName() string

FeedName returns the name of the feed.

func (Entry) FeedPublished

func (e Entry) FeedPublished() *time.Time

FeedPublished returns a best guess at the correct feed publication date.

func (Entry) FeedUpdated

func (e Entry) FeedUpdated() *time.Time

FeedUpdated returns when the feed was updated.

func (Entry) ID added in v0.3.33

func (e Entry) ID() string
func (e Entry) Link() template.URL

Link returns a link to the entry.

func (Entry) Published

func (e Entry) Published() *time.Time

Published returns a best guess at the entry's publication date.

func (e Entry) SiteLink() template.URL

SiteLink returns the site URL in a form usable in a template.

func (Entry) Summary

func (e Entry) Summary() template.HTML

Summary returns the entry summary.

func (Entry) Title

func (e Entry) Title() string

Title returns the entry title.

func (Entry) Updated

func (e Entry) Updated() *time.Time

Updated returns the update date of the entry.

type Queue

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

func (*Queue) Append

func (fq *Queue) Append(feed *gofeed.Feed)

func (Queue) Len

func (fq Queue) Len() int

func (Queue) Less

func (fq Queue) Less(i, j int) bool

func (*Queue) Pop

func (fq *Queue) Pop() interface{}

Does nothing.

func (*Queue) Push

func (fq *Queue) Push(_ interface{})

Does nothing.

func (*Queue) Shuffle added in v0.3.33

func (fq *Queue) Shuffle(nEntries int) []*Entry

func (Queue) Swap

func (fq Queue) Swap(i, j int)

func (*Queue) Top

func (fq *Queue) Top() interface{}

Jump to

Keyboard shortcuts

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