Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultMaxEntries = 500 MaxAge = 30 * 24 * time.Hour // 30 days CacheVersion = "1.0" )
Variables ¶
This section is empty.
Functions ¶
func GetDefaultCacheDir ¶
Types ¶
type Cache ¶
type Cache struct {
Version string `json:"version"`
LastSync time.Time `json:"last_sync"`
Notifications []CacheEntry `json:"notifications"`
MaxEntries int `json:"max_entries"`
}
func (*Cache) AddNotifications ¶
func (c *Cache) AddNotifications(notifications []CacheEntry) []CacheEntry
func (*Cache) GetNotifications ¶
func (c *Cache) GetNotifications() []CacheEntry
type CacheEntry ¶
type CacheEntry struct {
ID string `json:"id"`
Repository string `json:"repository"`
Title string `json:"title"`
Reason string `json:"reason"`
Type string `json:"type"`
URL string `json:"url"`
WebURL string `json:"web_url"`
Timestamp time.Time `json:"timestamp"`
UpdatedAt time.Time `json:"updated_at"`
}
Click to show internal directories.
Click to hide internal directories.