Documentation ¶
Index ¶
- type Favorites
- type Feed
- type Feeds
- type Item
- type Items
- func (f Items) Delete(db *bolt.DB, key string) error
- func (f Items) Insert(db *bolt.DB, item *Item) (string, error)
- func (f Items) ProcessInsert(db *bolt.DB, it *gofeed.Item, url string) (string, error)
- func (f Items) Read(db *bolt.DB) error
- func (f Items) ToggleFavorite(db *bolt.DB, key string) error
- func (f Items) ToggleRead(db *bolt.DB, key string) error
- type Queue
- type Storage
- func (s *Storage) CreateFeed(url string) error
- func (s *Storage) DeleteFeed(url string) error
- func (s *Storage) Favorite(key string) error
- func (s *Storage) MarkRead(key string) (map[string]bool, error)
- func (s *Storage) MarkUnread(key string) error
- func (s *Storage) Unfavorite(key string) error
- func (s *Storage) Update() (map[string]*Item, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Favorites ¶ added in v0.2.0
Favorites contains items that have been added to favorites
type Feed ¶ added in v0.2.0
type Feed struct { Title string `json:"title"` Description string `json:"description"` UpdateURL string `json:"updateurl"` Link string `json:"link"` Items map[string]bool `json:"items"` }
Feed is the structure of the Feed from RSS that we care about. The Items contains the unique Location.
type Feeds ¶ added in v0.2.0
Feeds is a map of the UpdateURL to the Feed.
func (Feeds) AddItems ¶ added in v0.2.0
AddItems will update the feeds map of items and unread count
type Item ¶ added in v0.2.0
type Item struct { FeedURL string `json:"feedurl"` Title string `json:"title"` Content string `json:"content"` Link string `json:"link"` Date time.Time `json:"date"` Location string `json:"location"` Type string `json:"type"` Length string `json:"length"` Read bool `json:"read"` Favorite bool `json:"favorite"` PlaybackPOS int `json:"playbackposition"` }
Item is the structure of the Item from RSS that we care about.
func (*Item) DeleteFile ¶ added in v0.2.0
DeleteFile will delete the item that has been downloaded, note if the item is favorited it will not be deleted
type Items ¶ added in v0.2.0
Items is a map of the Location to the Item
func (Items) ProcessInsert ¶ added in v0.2.0
ProcessInsert will convert the feed and insert item into database
func (Items) ToggleFavorite ¶ added in v0.2.0
ToggleFavorite will update the favorite status
type Queue ¶ added in v0.2.0
Queue of the items to be played
type Storage ¶
Storage contains the main data needed to run the app.
func (*Storage) CreateFeed ¶
CreateFeed will collect the rss feed and process through the elements and add the relevant data elements to the database
func (*Storage) DeleteFeed ¶
DeleteFeed will delete the Feed, Items, and relevant items it the queue.
func (*Storage) Favorite ¶ added in v0.2.0
Favorite wil update the Storage to note that an item has been added to favorites.
func (*Storage) MarkRead ¶
MarkRead wil update the Storage to note that an item has been read, remove the item from the list.
func (*Storage) MarkUnread ¶ added in v0.2.0
MarkUnread wil update the Storage to note that an item has been unread, add the item from the list.
func (*Storage) Unfavorite ¶ added in v0.2.0
Unfavorite wil update the Storage to note that an item has been removed from favorites.