Documentation ¶
Index ¶
- type DB
- func (db *DB) AddItem(items map[string]string)
- func (db *DB) AddPodcast(title, rssurl string)
- func (db *DB) CatchUp(id int)
- func (db *DB) FindAllPodcasts() (ids []int, titles []string)
- func (db *DB) FindEpisodeTitleByURL(url string) (title string)
- func (db *DB) FindEpisodesWithPodcastTitle() (map[string][]string, error)
- func (db *DB) FindNewEpisodes() (urls []string, err error)
- func (db *DB) FindPodcastPausedState(id int) (paused bool)
- func (db *DB) FindPodcastTitle(id int) (title string)
- func (db *DB) FindPodcastTitleByURL(url string) (title string)
- func (db *DB) SetDownloadedByURL(url string)
- func (db *DB) TogglePause(id int) (paused bool)
- type Datastore
- type Episode
- type Podcast
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
DB struct
func (*DB) AddItem ¶
AddItem takes a map[string]string of episode items to be inserted into the database.
item[rssURL] item[title], item[enclosureURL], item[guid], items[pubdate]
func (*DB) AddPodcast ¶
AddPodcast Inserts a new podcast into the database
func (*DB) FindAllPodcasts ¶
FindAllPodcasts Find all podcasts and their IDs
func (*DB) FindEpisodeTitleByURL ¶
FindEpisodeTitleByURL finds episode titles by url
func (*DB) FindEpisodesWithPodcastTitle ¶
FindEpisodesWithPodcastTitle Finds episodes with their podcast title and returns a map[string]string
func (*DB) FindNewEpisodes ¶
FindNewEpisodes finds episodes where downloaded = false
func (*DB) FindPodcastPausedState ¶
FindPodcastPausedState finds out wether or not a podcast is paused
func (*DB) FindPodcastTitle ¶
FindPodcastTitle looks up a podcast title by its id
func (*DB) FindPodcastTitleByURL ¶
FindPodcastTitleByURL finds podcast titles by URL
func (*DB) SetDownloadedByURL ¶
SetDownloadedByURL updates all downloaded columns to be true
func (*DB) TogglePause ¶
TogglePause toggles between paused states true and false
type Datastore ¶
type Datastore interface { FindEpisodesWithPodcastTitle() (map[string][]string, error) FindPodcastTitleByURL(url string) (title string) FindEpisodeTitleByURL(url string) (title string) FindNewEpisodes() (urls []string, err error) FindAllPodcasts() (ids []int, titles []string) FindPodcastTitle(id int) (title string) SetDownloadedByURL(url string) AddPodcast(title, rssurl string) AddItem(items map[string]string) TogglePause(id int) (paused bool) CatchUp(id int) }
Datastore interface