store

package
v0.0.0-...-fd72eb8 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2015 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Podcast

type Podcast struct {
	// URL to the feed.
	URL string

	// Feed itself.
	Feed feedparser.Feed

	// Error if parsing failed.
	Error error
}

Podcast represents a Podcast loaded from the store.

type Store

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

Store represents a storage backend.

func Load

func Load(path string) (s *Store, err error)

Load returns and creates a new store with the URL file located at the give filepath.

func (*Store) Add

func (s *Store) Add(url string)

Add appends a new URL to the store. It doesn't check if the given data is a valid URL and it doesn't check if the URL is already a part of the store either.

func (*Store) Contains

func (s *Store) Contains(url string) bool

Contains returns true if the url is already a part of the store. If it isn't it returns false.

func (*Store) Fetch

func (s *Store) Fetch() <-chan Podcast

Fetch fetches all feeds form the urls and returns a channel which contains all podcasts.

func (*Store) Save

func (s *Store) Save() error

Save writes the URL file to the store path.

Jump to

Keyboard shortcuts

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