store

package
v0.0.0-...-fbe3903 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SqliteStore

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

func NewSqliteStore

func NewSqliteStore(dbpath string, logger *log.Logger) (*SqliteStore, error)

func (*SqliteStore) AddFeed

func (s *SqliteStore) AddFeed(slug string, url string) error

func (*SqliteStore) AddPage

func (s *SqliteStore) AddPage(url string, html string, content string) error

func (*SqliteStore) AddRecord

func (s *SqliteStore) AddRecord(item internal.Record) (int64, error)

func (*SqliteStore) Close

func (s *SqliteStore) Close() error

func (*SqliteStore) FindFeedByUrl

func (s *SqliteStore) FindFeedByUrl(feedUrl string) (internal.Feed, error)

func (*SqliteStore) FindRecordsWithNoPage

func (s *SqliteStore) FindRecordsWithNoPage() ([]string, error)

func (*SqliteStore) GetAllPages

func (s *SqliteStore) GetAllPages() ([]internal.Page, error)

func (*SqliteStore) GetFeedBySlug

func (s *SqliteStore) GetFeedBySlug(slug string) (internal.Feed, error)

func (*SqliteStore) GetFeedRecords

func (s *SqliteStore) GetFeedRecords(feedId string, mdContent bool) ([]internal.Record, error)

func (*SqliteStore) GetFeeds

func (s *SqliteStore) GetFeeds() ([]internal.Feed, error)

func (*SqliteStore) UpdatePageContent

func (s *SqliteStore) UpdatePageContent(page *internal.Page, content string) error

type Store

type Store interface {
	AddFeed(string, string) error
	AddPage(string, string, string) error
	UpdatePageContent(*Page, string) error
	GetFeedBySlug(string) (Feed, error)
	FindFeedByUrl(string) (Feed, error)
	GetFeeds() ([]Feed, error)
	AddRecord(Record) (int64, error)
	FindRecordsWithNoPage() ([]string, error)
	GetAllPages() ([]Page, error)
	GetFeedRecords(string, bool) ([]Record, error)
}

Jump to

Keyboard shortcuts

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