Documentation ¶
Overview ¶
Package feedtrigger is a simple library which is aimed to handle new RSS/Atom entries by using a trigger function.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LogAuthorAndLink ¶
LogAuthorAndLink of the new item.
Types ¶
type Feed ¶
type Feed struct { URL string OnNewRecord NewItemAction RefreshPeriod time.Duration }
Feed to poll (Atom/RSS).
func NewFeed ¶
func NewFeed(url string, action NewItemAction) *Feed
NewFeed returns a feed by URL with default refresh period of 1 minute.
type FeedAction ¶
FeedAction is a the main configuration struct.
type FeedHead ¶
type FeedHead struct { Title string `json:"title,omitempty"` Updated string `json:"last_updated,omitempty"` Published string `json:"published,omitempty"` }
FeedHead is the top item of the feed. It's needed for checking for updates on every poll.
type NewItemAction ¶
NewItemAction is triggered, when new item is available.
Click to show internal directories.
Click to hide internal directories.