Documentation
¶
Index ¶
- func Clear(gemfileLockPath string) error
- func GetCacheDir() (string, error)
- func GetCachePath(gemfileLockPath string) (string, error)
- func Write(gemfileLockPath string, entry *CacheEntry) error
- func WriteHealth(gemfileLockPath string, entry *HealthCacheEntry) error
- type CacheEntry
- type HealthCacheEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCachePath ¶
GetCachePath returns the cache file path for a given Gemfile.lock
func Write ¶
func Write(gemfileLockPath string, entry *CacheEntry) error
Write writes analysis result to cache
func WriteHealth ¶ added in v1.1.0
func WriteHealth(gemfileLockPath string, entry *HealthCacheEntry) error
WriteHealth writes health data to cache
Types ¶
type CacheEntry ¶
type CacheEntry struct {
Result *gemfile.AnalysisResult `json:"result"`
GemfileLockMtime int64 `json:"gemfile_lock_mtime"`
CachedAt time.Time `json:"cached_at"`
RubyVersion string `json:"ruby_version"`
BundleVersion string `json:"bundle_version"`
FrameworkDetected string `json:"framework_detected"`
RailsVersion string `json:"rails_version"`
}
CacheEntry represents a cached analysis result with metadata
func Read ¶
func Read(gemfileLockPath string) (*CacheEntry, error)
Read reads cached analysis result if it exists and is valid
type HealthCacheEntry ¶ added in v1.1.0
type HealthCacheEntry struct {
Gems map[string]*gemfile.GemHealth `json:"gems"`
CachedAt time.Time `json:"cached_at"`
}
HealthCacheEntry stores gem health data with a 24-hour TTL
func ReadHealth ¶ added in v1.1.0
func ReadHealth(gemfileLockPath string) (*HealthCacheEntry, error)
ReadHealth reads health cache for a Gemfile.lock if it exists and is less than 24 hours old
Click to show internal directories.
Click to hide internal directories.