Documentation
¶
Index ¶
- type CacheData
- type FileStore
- func (s *FileStore) Clear() error
- func (s *FileStore) GetTimestamp() time.Time
- func (s *FileStore) IsSameRoots(roots []string) bool
- func (s *FileStore) IsValid(maxAge time.Duration) bool
- func (s *FileStore) Load() (*CacheData, error)
- func (s *FileStore) Save(repos []model.Repo, roots []string) error
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheData ¶ added in v0.2.0
type CacheData struct {
Repos []model.Repo `json:"repos"`
Timestamp time.Time `json:"timestamp"`
Roots []string `json:"roots"`
}
CacheData represents the cached scan results
type FileStore ¶ added in v0.2.0
type FileStore struct {
// contains filtered or unexported fields
}
FileStore implements Store using a JSON file
func NewFileStore ¶ added in v0.2.0
func NewFileStore() *FileStore
NewFileStore creates a new file-based cache store
func (*FileStore) GetTimestamp ¶ added in v0.2.0
GetTimestamp returns the cache timestamp
func (*FileStore) IsSameRoots ¶ added in v0.2.0
IsSameRoots checks if cached roots match current roots
Click to show internal directories.
Click to hide internal directories.