Documentation
¶
Overview ¶
Package rss implements a wrapper around an rss feed that exposes useful properties about the feed including elements, hash, etc.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Feed ¶
type Feed struct {
Title string `msgpack:"title,omitempty"`
Description string `msgpack:"description,omitempty"`
Link string `msgpack:"link,omitempty"`
FeedLink string `msgpack:"feedLink,omitempty"`
Updated *time.Time `msgpack:"updated,omitempty"`
Published *time.Time `msgpack:"published,omitempty"`
Author *Person `msgpack:"author,omitempty"`
Language string `msgpack:"language,omitempty"`
Image *Image `msgpack:"image,omitempty"`
Copyright string `msgpack:"copyright,omitempty"`
Categories []string `msgpack:"categories,omitempty"`
Items []*Item `msgpack:"items"`
}
Feed is an RSS Feed
type Item ¶
type Item struct {
Title string `msgpack:"title,omitempty"`
Description string `msgpack:"description,omitempty"`
Content string `msgpack:"content,omitempty"`
Link string `msgpack:"link,omitempty"`
Updated *time.Time `msgpack:"updated,omitempty"`
Published *time.Time `msgpack:"published,omitempty"`
Author *Person `msgpack:"author,omitempty"`
GUID string `msgpack:"guid,omitempty"`
Image *Image `msgpack:"image,omitempty"`
Categories []string `msgpack:"categories,omitempty"`
}
Item is the universal Item type that atom.Entry and rss.Item gets translated to. It represents a single entry in a given feed.
type Person ¶
type Person struct {
Name string `msgpack:"name,omitempty"`
Email string `msgpack:"email,omitempty"`
}
Person is an individual specified in a feed
type State ¶
type State interface {
// FetchTime is when this instance of the feed was fetched
FetchTime() time.Time
// Hash returns an MD5 hash of the feed from when it was fetched
Hash() string
// UpdatedState goes over the network and fetches the current state of the RSS feed
UpdatedState() (State, error)
// Feed returns the underlying Feed object
Feed() Feed
}
State is an abstract representation of an RSS/Atom Feed state with additional properties and methods
Click to show internal directories.
Click to hide internal directories.