Documentation
¶
Index ¶
Constants ¶
View Source
const ( DirName = ".occ" IndexFile = "index.json" MetadataFile = "metadata.json" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CacheMetadata ¶
type CacheMetadata struct {
// Directory-level hash for fast "anything changed?" check
DirectoryHash string `json:"directoryHash"`
// Per-file state for incremental updates
FileStates map[string]FileState `json:"fileStates"`
// Time-based metadata
CreatedAt time.Time `json:"createdAt"`
LastUsed time.Time `json:"lastUsed"`
// Index stats
ResourceCount int `json:"resourceCount"`
}
CacheMetadata tracks cache state for invalidation
type FileState ¶
type FileState struct {
ModTime time.Time `json:"modTime"`
Size int64 `json:"size"`
Hash string `json:"hash"`
}
FileState tracks the state of a single file for change detection
type PersistentIndex ¶
PersistentIndex wraps generic Index with filesystem persistence
func ForceRebuild ¶
func ForceRebuild(repoPath string) (*PersistentIndex, error)
ForceRebuild forces a full rebuild of the index, ignoring cache
func LoadOrBuild ¶
func LoadOrBuild(repoPath string) (*PersistentIndex, error)
LoadOrBuild loads existing index from cache or builds a new one
Click to show internal directories.
Click to hide internal directories.