Back to godoc.org

Package db

v0.1.1
Latest Go to latest

The latest major version is .

Published: Jul 27, 2020 | License: GPL3 | Module: git.sr.ht/~chrisppy/beagles

Index

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

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier