Documentation
¶
Overview ¶
Package cache returns a default cache manager with the `File` backend.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrItemNotFound = errors.New("item not found")
ErrItemNotFound is returned when an item is not found in the cache.
Functions ¶
Types ¶
type Cache ¶
Cache is a cache backend that stores data in a JSON file.
func (*Cache) GetByProperty ¶
GetByProperty retrieves an item from the cache by a specific property.
type Item ¶
type Item struct {
// ID is the unique identifier for the item.
ID string
// Name is the name of the item.
Name string
// Path is the path to the item.
Path string
// Version is the version of the item.
Version string
// Time is the time when the item was created or last updated.
Downloaded time.Time
// Updated is the time when the item was last updated.
Updated time.Time
// Type is the type of the item.
Type string
}
Item represents a cache item.
Click to show internal directories.
Click to hide internal directories.