Documentation ¶
Index ¶
- type ChannelInfo
- type FeedStorage
- type RssEntry
- type RssEntryState
- type SavedViewStorage
- type ViewStorage
- func (s *ViewStorage) AddItem(item *RssEntry)
- func (s *ViewStorage) ChangeColor(index int) error
- func (s *ViewStorage) ChangeItemState(index int, expand bool) (RssEntryState, string)
- func (s *ViewStorage) DeleteItem(index int) error
- func (s *ViewStorage) DumpToStorage()
- func (s *ViewStorage) GetChannelInfo(title string) *ChannelInfo
- func (s *ViewStorage) GetCopyOfSomeItems(n int) []RssEntry
- func (s *ViewStorage) LoadFromStorage() (loaded bool)
- func (s *ViewStorage) SetChannelInfo(title string, info *ChannelInfo)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChannelInfo ¶
type FeedStorage ¶
type FeedStorage struct { Amap agingmap.AgingMapInterface // contains filtered or unexported fields }
func MakeFeedStorage ¶
func MakeFeedStorage(filename string, cap int) *FeedStorage
func (*FeedStorage) Add ¶
func (s *FeedStorage) Add(key, value string)
func (*FeedStorage) DumpToStorage ¶
func (s *FeedStorage) DumpToStorage()
func (*FeedStorage) Get ¶
func (s *FeedStorage) Get(key string) string
func (*FeedStorage) LoadFromStorage ¶
func (s *FeedStorage) LoadFromStorage() (loaded bool)
type RssEntry ¶
type RssEntry struct { FeedTitle string ItemTitle string ItemSummary string ItemContent string URL string ItemDate time.Time State RssEntryState }
RssEntry represents OUR version of an entry. It's in a form that can be easily dumped to the view.
type RssEntryState ¶
type RssEntryState uint8
RssEntryState represents the viewing status of the entry.
const ( CollapsedEntryState RssEntryState = iota StandardEntryState ExpandedEntryState BrowserEntryState /* Temporary state; should get lowered immediately */ )
func CollapseEntryState ¶
func CollapseEntryState(state RssEntryState) RssEntryState
CollapseEntryState returns the next smallest entry state.
func ExpandEntryState ¶
func ExpandEntryState(state RssEntryState) RssEntryState
ExpandEntryState returns the next largest entry state.
type SavedViewStorage ¶
type SavedViewStorage struct { ItemList []*RssEntry ChannelInfoMap map[string]*ChannelInfo /* Title --> Info */ }
type ViewStorage ¶
type ViewStorage struct {
// contains filtered or unexported fields
}
func MakeViewStorage ¶
func MakeViewStorage(key string, cap int) *ViewStorage
func (*ViewStorage) AddItem ¶
func (s *ViewStorage) AddItem(item *RssEntry)
func (*ViewStorage) ChangeColor ¶
func (s *ViewStorage) ChangeColor(index int) error
func (*ViewStorage) ChangeItemState ¶
func (s *ViewStorage) ChangeItemState(index int, expand bool) (RssEntryState, string)
func (*ViewStorage) DeleteItem ¶
func (s *ViewStorage) DeleteItem(index int) error
func (*ViewStorage) DumpToStorage ¶
func (s *ViewStorage) DumpToStorage()
func (*ViewStorage) GetChannelInfo ¶
func (s *ViewStorage) GetChannelInfo(title string) *ChannelInfo
func (*ViewStorage) GetCopyOfSomeItems ¶
func (s *ViewStorage) GetCopyOfSomeItems(n int) []RssEntry
func (*ViewStorage) LoadFromStorage ¶
func (s *ViewStorage) LoadFromStorage() (loaded bool)
func (*ViewStorage) SetChannelInfo ¶
func (s *ViewStorage) SetChannelInfo(title string, info *ChannelInfo)
Click to show internal directories.
Click to hide internal directories.