Documentation ¶
Overview ¶
Package subscriptions implements a list of feeds along with operations to modify the list.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Diff ¶
func Diff(a, b *Subscriptions) (added, removed []string)
Diff finds the difference between two subscription lists.
Types ¶
type Change ¶
type Change struct { Type ChangeType URI string }
type List ¶
type List interface { List() []Subscription Refresh(Subscription) }
A List provides a read-only view to Subscriptions.
type Subscription ¶
type Subscription struct { // URI the subscription was created with, never changed! URI string `json:"uri"` FeedURL string `json:"feedUrl"` WebsiteURL string `json:"websiteUrl"` FeedTitle string `json:"feedTitle"` FeedDescription string `json:"feedDescription"` }
Subscription represents the metadata for a single feed.
type Subscriptions ¶
type Subscriptions struct {
// contains filtered or unexported fields
}
Subscriptions is a list of subscriptions that is safe to access across goroutines.
func FromOpml ¶
func FromOpml(doc opml.Opml) *Subscriptions
FromOpml adds all feeds listed in an opml.Opml document to the Subscriptions.
func (*Subscriptions) List ¶
func (s *Subscriptions) List() []Subscription
List of feeds subscribed to.
func (*Subscriptions) Refresh ¶
func (s *Subscriptions) Refresh(sub Subscription)
Refresh the data for a particular Subscription.
func (*Subscriptions) Remove ¶
func (s *Subscriptions) Remove(uri string)
Remove the Subscription with url provided.
Click to show internal directories.
Click to hide internal directories.