Documentation
¶
Index ¶
- func DirSize(dir string) int64
- func Domains() []string
- func FileAge(path string) int
- func MakeResult(domain string, items []core.CleanableItem, totalSize int64, summary string) core.AnalysisResult
- func Register(a Analyzer)
- type Analyzer
- type AppSupportAnalyzer
- type BrowserAnalyzer
- type DevCachesAnalyzer
- type DiskAnalyzer
- type DockerAnalyzer
- type DownloadsAnalyzer
- type LogsAnalyzer
- type OllamaAnalyzer
- type ReposAnalyzer
- type TrashAnalyzer
- type XcodeAnalyzer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DirSize ¶
DirSize calculates total size of all files under dir recursively. Skips entries that return permission errors.
func FileAge ¶
FileAge returns the age in days based on modification time. Returns 0 if the file doesn't exist.
func MakeResult ¶
func MakeResult(domain string, items []core.CleanableItem, totalSize int64, summary string) core.AnalysisResult
MakeResult is a convenience factory for building AnalysisResult
Types ¶
type Analyzer ¶
type Analyzer interface {
Domain() string
Risk() core.RiskLevel
Analyze() (core.AnalysisResult, error)
}
Analyzer is the interface all domain analyzers implement
type AppSupportAnalyzer ¶
type AppSupportAnalyzer struct{}
func (*AppSupportAnalyzer) Analyze ¶
func (a *AppSupportAnalyzer) Analyze() (core.AnalysisResult, error)
func (*AppSupportAnalyzer) Domain ¶
func (a *AppSupportAnalyzer) Domain() string
func (*AppSupportAnalyzer) Risk ¶
func (a *AppSupportAnalyzer) Risk() core.RiskLevel
type BrowserAnalyzer ¶
type BrowserAnalyzer struct{}
func (*BrowserAnalyzer) Analyze ¶
func (b *BrowserAnalyzer) Analyze() (core.AnalysisResult, error)
func (*BrowserAnalyzer) Domain ¶
func (b *BrowserAnalyzer) Domain() string
func (*BrowserAnalyzer) Risk ¶
func (b *BrowserAnalyzer) Risk() core.RiskLevel
type DevCachesAnalyzer ¶
type DevCachesAnalyzer struct{}
func (*DevCachesAnalyzer) Analyze ¶
func (d *DevCachesAnalyzer) Analyze() (core.AnalysisResult, error)
func (*DevCachesAnalyzer) Domain ¶
func (d *DevCachesAnalyzer) Domain() string
func (*DevCachesAnalyzer) Risk ¶
func (d *DevCachesAnalyzer) Risk() core.RiskLevel
type DiskAnalyzer ¶
type DiskAnalyzer struct{}
func (*DiskAnalyzer) Analyze ¶
func (d *DiskAnalyzer) Analyze() (core.AnalysisResult, error)
func (*DiskAnalyzer) Domain ¶
func (d *DiskAnalyzer) Domain() string
func (*DiskAnalyzer) Risk ¶
func (d *DiskAnalyzer) Risk() core.RiskLevel
type DockerAnalyzer ¶
type DockerAnalyzer struct{}
func (*DockerAnalyzer) Analyze ¶
func (d *DockerAnalyzer) Analyze() (core.AnalysisResult, error)
func (*DockerAnalyzer) Domain ¶
func (d *DockerAnalyzer) Domain() string
func (*DockerAnalyzer) Risk ¶
func (d *DockerAnalyzer) Risk() core.RiskLevel
type DownloadsAnalyzer ¶
type DownloadsAnalyzer struct{}
func (*DownloadsAnalyzer) Analyze ¶
func (d *DownloadsAnalyzer) Analyze() (core.AnalysisResult, error)
func (*DownloadsAnalyzer) Domain ¶
func (d *DownloadsAnalyzer) Domain() string
func (*DownloadsAnalyzer) Risk ¶
func (d *DownloadsAnalyzer) Risk() core.RiskLevel
type LogsAnalyzer ¶
type LogsAnalyzer struct{}
func (*LogsAnalyzer) Analyze ¶
func (l *LogsAnalyzer) Analyze() (core.AnalysisResult, error)
func (*LogsAnalyzer) Domain ¶
func (l *LogsAnalyzer) Domain() string
func (*LogsAnalyzer) Risk ¶
func (l *LogsAnalyzer) Risk() core.RiskLevel
type OllamaAnalyzer ¶
type OllamaAnalyzer struct{}
func (*OllamaAnalyzer) Analyze ¶
func (o *OllamaAnalyzer) Analyze() (core.AnalysisResult, error)
func (*OllamaAnalyzer) Domain ¶
func (o *OllamaAnalyzer) Domain() string
func (*OllamaAnalyzer) Risk ¶
func (o *OllamaAnalyzer) Risk() core.RiskLevel
type ReposAnalyzer ¶
type ReposAnalyzer struct{}
func (*ReposAnalyzer) Analyze ¶
func (r *ReposAnalyzer) Analyze() (core.AnalysisResult, error)
func (*ReposAnalyzer) Domain ¶
func (r *ReposAnalyzer) Domain() string
func (*ReposAnalyzer) Risk ¶
func (r *ReposAnalyzer) Risk() core.RiskLevel
type TrashAnalyzer ¶
type TrashAnalyzer struct{}
func (*TrashAnalyzer) Analyze ¶
func (t *TrashAnalyzer) Analyze() (core.AnalysisResult, error)
func (*TrashAnalyzer) Domain ¶
func (t *TrashAnalyzer) Domain() string
func (*TrashAnalyzer) Risk ¶
func (t *TrashAnalyzer) Risk() core.RiskLevel
type XcodeAnalyzer ¶
type XcodeAnalyzer struct{}
func (*XcodeAnalyzer) Analyze ¶
func (x *XcodeAnalyzer) Analyze() (core.AnalysisResult, error)
func (*XcodeAnalyzer) Domain ¶
func (x *XcodeAnalyzer) Domain() string
func (*XcodeAnalyzer) Risk ¶
func (x *XcodeAnalyzer) Risk() core.RiskLevel
Click to show internal directories.
Click to hide internal directories.