db

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2020 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	Feeds model.Feeds
	Items model.Items
	Queue model.Queue
	Path  string
}

Storage contains the main data needed to run the app.

func ReadDB

func ReadDB(path string) (*Storage, error)

ReadDB will grab all data from the database to use while running the app.

func (*Storage) CreateFeed

func (s *Storage) CreateFeed(url string) error

CreateFeed will collect the rss feed and process through the elements and add the relevant data elements to the database

func (*Storage) DeleteFeed

func (s *Storage) DeleteFeed(url string) error

DeleteFeed will delete the Feed, Items, and relevant items it the queue.

func (*Storage) MarkRead

func (s *Storage) MarkRead(qitem *model.QueueItem) error

MarkRead wil update the Storage to note the an item has been read, remove the item from the list.

func (*Storage) Update

func (s *Storage) Update() error

Update will check for rss updates

Jump to

Keyboard shortcuts

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