riviera: hawx.me/code/riviera/subscriptions Index | Files | Directories

package subscriptions

import "hawx.me/code/riviera/subscriptions"

Package subscriptions implements a list of feeds along with operations to modify the list.


Package Files


func AsOpml Uses

func AsOpml(s List) opml.Opml

AsOpml returns a representation of the Subscriptions as an OMPL document.

func Diff Uses

func Diff(a, b *Subscriptions) (added, removed []string)

Diff finds the difference between two subscription lists.

type Change Uses

type Change struct {
    Type ChangeType
    URI  string

type ChangeType Uses

type ChangeType int
const (
    Removed ChangeType = iota

type List Uses

type List interface {
    List() []Subscription

A List provides a read-only view to Subscriptions.

type Subscription Uses

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 Uses

type Subscriptions struct {
    // contains filtered or unexported fields

Subscriptions is a list of subscriptions that is safe to access across goroutines.

func FromOpml Uses

func FromOpml(doc opml.Opml) *Subscriptions

FromOpml adds all feeds listed in an opml.Opml document to the Subscriptions.

func New Uses

func New() *Subscriptions

New returns an empty subscription list.

func (*Subscriptions) Add Uses

func (s *Subscriptions) Add(uri string)

Add a new feed url to the list.

func (*Subscriptions) List Uses

func (s *Subscriptions) List() []Subscription

List of feeds subscribed to.

func (*Subscriptions) Refresh Uses

func (s *Subscriptions) Refresh(sub Subscription)

Refresh the data for a particular Subscription.

func (*Subscriptions) Remove Uses

func (s *Subscriptions) Remove(uri string)

Remove the Subscription with url provided.


opmlPackage opml implements functions capable of parsing opml files containing a list of feed subscriptions.

Package subscriptions imports 3 packages (graph) and is imported by 2 packages. Updated 2019-04-25. Refresh now. Tools for package owners.