Documentation ¶
Index ¶
- Variables
- type Feed
- type FeedStat
- type Folder
- type HTTPState
- type Item
- type ItemFilter
- type ItemStatus
- type MarkFilter
- type Storage
- func (s *Storage) CreateFeed(title, description, link, feedLink string, folderId *int64) *Feed
- func (s *Storage) CreateFolder(title string) *Folder
- func (s *Storage) CreateItems(items []Item) bool
- func (s *Storage) DeleteFeed(feedId int64) bool
- func (s *Storage) DeleteFolder(folderId int64) bool
- func (s *Storage) DeleteOldItems()
- func (s *Storage) FeedStats() []FeedStat
- func (s *Storage) GetFeed(id int64) *Feed
- func (s *Storage) GetFeedErrors() map[int64]string
- func (s *Storage) GetHTTPState(feedID int64) *HTTPState
- func (s *Storage) GetItem(id int64) *Item
- func (s *Storage) GetSettings() map[string]interface{}
- func (s *Storage) GetSettingsValue(key string) interface{}
- func (s *Storage) GetSettingsValueInt64(key string) int64
- func (s *Storage) ListFeeds() []Feed
- func (s *Storage) ListFeedsMissingIcons() []Feed
- func (s *Storage) ListFolders() []Folder
- func (s *Storage) ListHTTPStates() map[int64]HTTPState
- func (s *Storage) ListItems(filter ItemFilter, limit int, newestFirst bool) []Item
- func (s *Storage) MarkItemsRead(filter MarkFilter) bool
- func (s *Storage) RenameFeed(feedId int64, newTitle string) bool
- func (s *Storage) RenameFolder(folderId int64, newTitle string) bool
- func (s *Storage) ResetFeedErrors()
- func (s *Storage) SetFeedError(feedID int64, lastError error)
- func (s *Storage) SetFeedSize(feedId int64, size int)
- func (s *Storage) SetHTTPState(feedID int64, lastModified, etag string)
- func (s *Storage) SyncSearch()
- func (s *Storage) ToggleFolderExpanded(folderId int64, isExpanded bool) bool
- func (s *Storage) UpdateFeedFolder(feedId int64, newFolderId *int64) bool
- func (s *Storage) UpdateFeedIcon(feedId int64, icon *[]byte) bool
- func (s *Storage) UpdateItemStatus(item_id int64, status ItemStatus) bool
- func (s *Storage) UpdateSettings(kv map[string]interface{}) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var StatusRepresentations = map[ItemStatus]string{ UNREAD: "unread", READ: "read", STARRED: "starred", }
View Source
var StatusValues = map[string]ItemStatus{ "unread": UNREAD, "read": READ, "starred": STARRED, }
Functions ¶
This section is empty.
Types ¶
type Item ¶
type Item struct { Id int64 `json:"id"` GUID string `json:"guid"` FeedId int64 `json:"feed_id"` Title string `json:"title"` Link string `json:"link"` Content string `json:"content,omitempty"` Date time.Time `json:"date"` Status ItemStatus `json:"status"` ImageURL *string `json:"image"` AudioURL *string `json:"podcast_url"` }
type ItemFilter ¶
type ItemFilter struct { FolderID *int64 FeedID *int64 Status *ItemStatus Search *string After *int64 }
type ItemStatus ¶
type ItemStatus int
const ( UNREAD ItemStatus = 0 READ ItemStatus = 1 STARRED ItemStatus = 2 )
func (ItemStatus) MarshalJSON ¶
func (s ItemStatus) MarshalJSON() ([]byte, error)
func (*ItemStatus) UnmarshalJSON ¶
func (s *ItemStatus) UnmarshalJSON(b []byte) error
type MarkFilter ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func (*Storage) CreateFeed ¶
func (*Storage) CreateFolder ¶
func (*Storage) CreateItems ¶
func (*Storage) DeleteFeed ¶
func (*Storage) DeleteFolder ¶
func (*Storage) DeleteOldItems ¶
func (s *Storage) DeleteOldItems()
Delete old articles from the database to cleanup space.
The rules:
- Never delete starred entries.
- Keep at least the same amount of articles the feed provides (default: 50). This prevents from deleting items for rarely updated and/or ever-growing feeds which might eventually reappear as unread.
- Keep entries for a certain period (default: 90 days).
func (*Storage) GetFeedErrors ¶
func (*Storage) GetHTTPState ¶
func (*Storage) GetSettings ¶
func (*Storage) GetSettingsValue ¶
func (*Storage) GetSettingsValueInt64 ¶
func (*Storage) ListFeedsMissingIcons ¶
func (*Storage) ListFolders ¶
func (*Storage) ListHTTPStates ¶
func (*Storage) ListItems ¶
func (s *Storage) ListItems(filter ItemFilter, limit int, newestFirst bool) []Item
func (*Storage) MarkItemsRead ¶
func (s *Storage) MarkItemsRead(filter MarkFilter) bool
func (*Storage) ResetFeedErrors ¶
func (s *Storage) ResetFeedErrors()
func (*Storage) SetFeedError ¶
func (*Storage) SetFeedSize ¶
func (*Storage) SetHTTPState ¶
func (*Storage) SyncSearch ¶
func (s *Storage) SyncSearch()
func (*Storage) ToggleFolderExpanded ¶
func (*Storage) UpdateFeedFolder ¶
func (*Storage) UpdateItemStatus ¶
func (s *Storage) UpdateItemStatus(item_id int64, status ItemStatus) bool
func (*Storage) UpdateSettings ¶
Click to show internal directories.
Click to hide internal directories.