Help us shape the future of Go! Take the 2026 Go Developer Survey

garbage

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidToken = errors.New("garbage scan token is invalid or expired")
	ErrUnsafePath   = errors.New("garbage candidate is outside its managed root")
)

Functions

This section is empty.

Types

type Candidate

type Candidate struct {
	Kind     string
	Path     string
	Bytes    int64
	Files    int64
	Modified time.Time
}

type Report

type Report struct {
	Token      string
	ScannedAt  time.Time
	ExpiresAt  time.Time
	Bytes      int64
	Files      int64
	Candidates []Candidate
}

type Root

type Root struct {
	Kind   string
	Path   string
	MaxAge time.Duration
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(roots []Root) (*Service, error)

func (*Service) Clean

func (s *Service) Clean(token string) (int64, int64, error)

func (*Service) Latest

func (s *Service) Latest() Report

func (*Service) Scan

func (s *Service) Scan() (Report, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL