Documentation
¶
Overview ¶
Package cache manages local project caching and synchronization timestamps
Index ¶
- type Cache
- func (c *Cache) EnsureDir() error
- func (c *Cache) Exists() bool
- func (c *Cache) LoadLastFullSyncTime() (time.Time, error)
- func (c *Cache) LoadLastSyncTime() (time.Time, error)
- func (c *Cache) LoadUsername() (string, error)
- func (c *Cache) ProjectsPath() string
- func (c *Cache) ReadProjects() ([]model.Project, error)
- func (c *Cache) SaveLastFullSyncTime(t time.Time) error
- func (c *Cache) SaveLastSyncTime(t time.Time) error
- func (c *Cache) SaveUsername(username string) error
- func (c *Cache) Stats() (int, error)
- func (c *Cache) WriteProjects(projects []model.Project) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache manages the local project cache
func (*Cache) LoadLastFullSyncTime ¶
LoadLastFullSyncTime loads the last successful full sync timestamp Returns zero time if file doesn't exist (never had full sync)
func (*Cache) LoadLastSyncTime ¶
LoadLastSyncTime loads the last successful sync timestamp Returns zero time if file doesn't exist (first sync)
func (*Cache) LoadUsername ¶
LoadUsername loads the GitLab username from cache Returns empty string if file doesn't exist
func (*Cache) ProjectsPath ¶
ProjectsPath returns the full path to the projects cache file
func (*Cache) ReadProjects ¶
ReadProjects reads the list of projects from cache Format: path|name|description (one per line, description may be empty) Also supports old format: path|name (for backward compatibility)
func (*Cache) SaveLastFullSyncTime ¶
SaveLastFullSyncTime saves the last successful full sync timestamp
func (*Cache) SaveLastSyncTime ¶
SaveLastSyncTime saves the last successful sync timestamp
func (*Cache) SaveUsername ¶
SaveUsername saves the GitLab username to cache