Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrProgressEntryNotExist = errors.New("entry does not exist")
Functions ¶
This section is empty.
Types ¶
type CatalogProgress ¶
type CatalogProgress struct {
Data map[string]*SeriesProgress
}
func NewCatalogProgress ¶
func NewCatalogProgress() *CatalogProgress
func UnmarshalCatalogProgress ¶
func UnmarshalCatalogProgress(data []byte) *CatalogProgress
func (*CatalogProgress) AddSeries ¶
func (p *CatalogProgress) AddSeries(sid string, entries int)
func (*CatalogProgress) DeleteSeries ¶
func (p *CatalogProgress) DeleteSeries(sid string)
func (*CatalogProgress) GetSeries ¶
func (p *CatalogProgress) GetSeries(sid string) *SeriesProgress
type EntryProgress ¶
func NewEntryProgress ¶
func NewEntryProgress(total int) *EntryProgress
func (*EntryProgress) Percent ¶
func (rp *EntryProgress) Percent() float64
func (*EntryProgress) Set ¶
func (rp *EntryProgress) Set(n int)
func (*EntryProgress) SetRead ¶
func (rp *EntryProgress) SetRead()
func (*EntryProgress) SetUnread ¶
func (rp *EntryProgress) SetUnread()
func (*EntryProgress) String ¶
func (rp *EntryProgress) String() string
type SeriesProgress ¶
type SeriesProgress struct { Entries []*EntryProgress `json:"tracker"` M sync.RWMutex `json:"mutex"` }
func NewSeriesProgress ¶
func NewSeriesProgress(entries int) *SeriesProgress
func (*SeriesProgress) DeleteEntry ¶
func (p *SeriesProgress) DeleteEntry(i int)
func (*SeriesProgress) GetEntryProgress ¶
func (p *SeriesProgress) GetEntryProgress(i int) *EntryProgress
func (*SeriesProgress) SetAllRead ¶
func (p *SeriesProgress) SetAllRead()
func (*SeriesProgress) SetAllUnread ¶
func (p *SeriesProgress) SetAllUnread()
func (*SeriesProgress) SetEntryProgress ¶
func (p *SeriesProgress) SetEntryProgress(i int, e *EntryProgress) error
Click to show internal directories.
Click to hide internal directories.