Documentation
¶
Index ¶
- type FileInfo
- type Installation
- type Tracker
- func (t *Tracker) Backup() error
- func (t *Tracker) Clear() error
- func (t *Tracker) GetInstallation(sourceName string) (*Installation, error)
- func (t *Tracker) GetInstalledFiles(sourceName string) ([]string, error)
- func (t *Tracker) IsInstalled(sourceName string) bool
- func (t *Tracker) List() (map[string]*Installation, error)
- func (t *Tracker) RecordInstallation(sourceName string, installation Installation) error
- func (t *Tracker) RemoveInstallation(sourceName string) error
- func (t *Tracker) Restore(backupPath string) error
- func (t *Tracker) UpdateFile(sourceName, filePath string, info FileInfo) error
- type TrackingData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileInfo ¶
type FileInfo struct {
Path string `json:"path"`
Hash string `json:"hash,omitempty"`
Size int64 `json:"size"`
Modified time.Time `json:"modified"`
WasPreExisting bool `json:"was_pre_existing,omitempty"`
}
FileInfo contains information about an installed file
type Installation ¶
type Installation struct {
Timestamp time.Time `json:"timestamp"`
SourceCommit string `json:"source_commit,omitempty"`
Files map[string]FileInfo `json:"files"`
Directories []string `json:"directories"`
DocsGenerated []string `json:"docs_generated,omitempty"`
}
Installation represents an installed source
type Tracker ¶
type Tracker struct {
// contains filtered or unexported fields
}
Tracker manages installation tracking
func (*Tracker) GetInstallation ¶
func (t *Tracker) GetInstallation(sourceName string) (*Installation, error)
GetInstallation retrieves installation information for a source
func (*Tracker) GetInstalledFiles ¶
GetInstalledFiles returns all files installed by a source
func (*Tracker) IsInstalled ¶
IsInstalled checks if a source is installed
func (*Tracker) List ¶
func (t *Tracker) List() (map[string]*Installation, error)
List returns all installations
func (*Tracker) RecordInstallation ¶
func (t *Tracker) RecordInstallation(sourceName string, installation Installation) error
RecordInstallation records a new installation
func (*Tracker) RemoveInstallation ¶
RemoveInstallation removes installation tracking for a source
type TrackingData ¶
type TrackingData struct {
Version string `json:"version"`
LastUpdated time.Time `json:"last_updated"`
Installations map[string]*Installation `json:"installations"`
}
TrackingData represents the complete tracking data
Click to show internal directories.
Click to hide internal directories.