Documentation
¶
Index ¶
- func IgnoredNames() []string
- func IsBuiltinID(id string) bool
- func RegisterBuiltin(id string, factory BuiltinFactory)
- type BrewTarget
- type BuiltinCleaner
- type BuiltinFactory
- type DockerTarget
- type OldDownloadTarget
- type PathTarget
- type ProjectCacheTarget
- type Registry
- type SystemCacheTarget
- type Target
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IgnoredNames ¶ added in v1.6.0
func IgnoredNames() []string
IgnoredNames returns OS-managed metadata filenames that scans skip. Returns a copy so callers cannot mutate the underlying policy.
func IsBuiltinID ¶
func RegisterBuiltin ¶
func RegisterBuiltin(id string, factory BuiltinFactory)
RegisterBuiltin registers a builtin target factory.
Types ¶
type BrewTarget ¶
type BrewTarget struct {
// contains filtered or unexported fields
}
func NewBrewTarget ¶
func NewBrewTarget(cat types.Category) *BrewTarget
func (*BrewTarget) Category ¶
func (s *BrewTarget) Category() types.Category
func (*BrewTarget) Clean ¶
func (s *BrewTarget) Clean(items []types.CleanableItem) (*types.CleanResult, error)
func (*BrewTarget) IsAvailable ¶
func (s *BrewTarget) IsAvailable() bool
func (*BrewTarget) Scan ¶
func (s *BrewTarget) Scan() (*types.ScanResult, error)
type BuiltinCleaner ¶ added in v1.3.11
type BuiltinCleaner interface {
Clean(items []types.CleanableItem) (*types.CleanResult, error)
}
BuiltinCleaner is implemented by targets that have their own cleanup logic (e.g. brew, docker).
type BuiltinFactory ¶
BuiltinFactory is a function that creates a Target from a category and optional categories list.
type DockerTarget ¶
type DockerTarget struct {
// contains filtered or unexported fields
}
func NewDockerTarget ¶
func NewDockerTarget(cat types.Category) *DockerTarget
func (*DockerTarget) Category ¶
func (s *DockerTarget) Category() types.Category
func (*DockerTarget) Clean ¶
func (s *DockerTarget) Clean(items []types.CleanableItem) (*types.CleanResult, error)
func (*DockerTarget) IsAvailable ¶
func (s *DockerTarget) IsAvailable() bool
func (*DockerTarget) Scan ¶
func (s *DockerTarget) Scan() (*types.ScanResult, error)
type OldDownloadTarget ¶
type OldDownloadTarget struct {
*PathTarget
// contains filtered or unexported fields
}
OldDownloadTarget scans for old files in the Downloads folder.
func NewOldDownloadTarget ¶
func NewOldDownloadTarget(cat types.Category, daysOld int) *OldDownloadTarget
func (*OldDownloadTarget) Clean ¶
func (s *OldDownloadTarget) Clean(items []types.CleanableItem) (*types.CleanResult, error)
Clean moves the selected items to trash.
func (*OldDownloadTarget) Scan ¶
func (s *OldDownloadTarget) Scan() (*types.ScanResult, error)
Scan returns files older than the configured days' threshold.
type PathTarget ¶
type PathTarget struct {
// contains filtered or unexported fields
}
func NewPathTarget ¶
func NewPathTarget(cat types.Category) *PathTarget
func (*PathTarget) Category ¶
func (s *PathTarget) Category() types.Category
func (*PathTarget) IsAvailable ¶
func (s *PathTarget) IsAvailable() bool
func (*PathTarget) Scan ¶
func (s *PathTarget) Scan() (*types.ScanResult, error)
type ProjectCacheTarget ¶ added in v1.4.0
type ProjectCacheTarget struct {
// contains filtered or unexported fields
}
ProjectCacheTarget scans $HOME recursively for stale build caches inside project directories, using marker-file validation to avoid false positives.
func NewProjectCacheTarget ¶ added in v1.4.0
func NewProjectCacheTarget(cat types.Category) *ProjectCacheTarget
func (*ProjectCacheTarget) Category ¶ added in v1.4.0
func (t *ProjectCacheTarget) Category() types.Category
func (*ProjectCacheTarget) Clean ¶ added in v1.4.0
func (t *ProjectCacheTarget) Clean(items []types.CleanableItem) (*types.CleanResult, error)
func (*ProjectCacheTarget) IsAvailable ¶ added in v1.4.0
func (t *ProjectCacheTarget) IsAvailable() bool
func (*ProjectCacheTarget) Scan ¶ added in v1.4.0
func (t *ProjectCacheTarget) Scan() (*types.ScanResult, error)
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
func NewRegistry() *Registry
type SystemCacheTarget ¶
type SystemCacheTarget struct {
*PathTarget
// contains filtered or unexported fields
}
SystemCacheTarget scans system cache excluding paths defined in other categories
func NewSystemCacheTarget ¶
func NewSystemCacheTarget(cat types.Category, allCategories []types.Category) *SystemCacheTarget
func (*SystemCacheTarget) Scan ¶
func (s *SystemCacheTarget) Scan() (*types.ScanResult, error)