storage

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheInfoItem

type CacheInfoItem struct {
	LastCheck  time.Time
	FetchAfter time.Time
	ETag       string
	URL        string
}

type Config

type Config struct {
	Version  string          `json:"version"`
	LastRun  time.Time       `json:"lastRun"`
	Styling  uint8           `json:"styling"` // 0: default, 1: enabled, 2: disabled
	Summary  uint8           `json:"summary"` // 0: disabled, 1: enabled
	ColorMap map[uint8]uint8 `json:"colorMap"`
}

type ListItem

type ListItem struct {
	AddedAt time.Time
	Address string
}

type LocalStorage

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

func NewLocalStorage

func NewLocalStorage(
	name string,
	time utils.Time,
) *LocalStorage

func (*LocalStorage) AddToList

func (s *LocalStorage) AddToList(urls []string, list string) error

func (*LocalStorage) ClearAll

func (s *LocalStorage) ClearAll() error

func (*LocalStorage) GetFeedsFromList added in v0.1.1

func (s *LocalStorage) GetFeedsFromList(list string) ([]*ListItem, error)

func (*LocalStorage) Init

func (s *LocalStorage) Init(version string) error

func (*LocalStorage) LoadCacheInfo

func (s *LocalStorage) LoadCacheInfo() (map[string]*CacheInfoItem, error)

func (*LocalStorage) LoadConfig

func (s *LocalStorage) LoadConfig() (*Config, error)

func (*LocalStorage) LoadFeedsFromList added in v0.1.1

func (s *LocalStorage) LoadFeedsFromList(m map[string]*ListItem, list string) error

func (*LocalStorage) LoadLists

func (s *LocalStorage) LoadLists() ([]string, error)

func (*LocalStorage) MergeLists added in v0.1.8

func (s *LocalStorage) MergeLists(list, otherList string) error

func (*LocalStorage) Migrate

func (s *LocalStorage) Migrate() error

func (*LocalStorage) OpenFeedCache

func (s *LocalStorage) OpenFeedCache(name string) (io.ReadCloser, error)

func (*LocalStorage) RemoveFeedCaches added in v0.1.1

func (s *LocalStorage) RemoveFeedCaches(names []string) error

func (*LocalStorage) RemoveFromList

func (s *LocalStorage) RemoveFromList(urls []string, list string) ([]bool, error)

func (*LocalStorage) RemoveList added in v0.1.8

func (s *LocalStorage) RemoveList(list string) error

func (*LocalStorage) RenameList added in v0.1.8

func (s *LocalStorage) RenameList(oldName, newName string) error

func (*LocalStorage) SaveCacheInfo

func (s *LocalStorage) SaveCacheInfo(cacheinfo map[string]*CacheInfoItem) error

func (*LocalStorage) SaveConfig

func (s *LocalStorage) SaveConfig() error

func (*LocalStorage) SaveFeedCache

func (s *LocalStorage) SaveFeedCache(r io.Reader, name string) error

Jump to

Keyboard shortcuts

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