storage

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2025 License: MIT Imports: 14 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 {
	LastFetch  time.Time
	FetchAfter time.Time
	ETag       string
	URL        string
}

type Config

type Config struct {
	Version string `json:"version"`

	UserAgent string `json:"userAgent"`
	Timeout   uint   `json:"timeout"`   // in seconds
	BatchSize uint   `json:"batchSize"` // number of feeds to fetch in a batch

	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"`
	HideFutureItems bool            `json:"hideFutureItems"`

	MinifluxToken string `json:"minifluxToken"`
}

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) GetExploreRepositoryPath added in v0.3.0

func (s *LocalStorage) GetExploreRepositoryPath(name string, update bool) (string, 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) JoinCacheDir added in v0.2.1

func (s *LocalStorage) JoinCacheDir(file string) (string, error)

func (*LocalStorage) JoinConfigDir added in v0.2.1

func (s *LocalStorage) JoinConfigDir(file string) (string, error)

func (*LocalStorage) JoinExploreDir added in v0.3.0

func (s *LocalStorage) JoinExploreDir(file string) (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) RemoveExploreRepository added in v0.3.0

func (s *LocalStorage) RemoveExploreRepository(name string) 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