shun

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(q db.Querier, uuid, comment string) error

Add marks an artifact as shunned. Idempotent — re-shunning updates mtime and comment. Returns error if uuid format is invalid.

func IsShunned

func IsShunned(q db.Querier, uuid string) (bool, error)

IsShunned returns true if the given uuid is in the shun table.

func Remove

func Remove(q db.Querier, uuid string) error

Remove unshuns an artifact. No-op if uuid is not shunned.

Types

type Entry

type Entry struct {
	UUID    string
	MTime   int64
	Comment string
}

Entry represents a shunned artifact.

func List

func List(q db.Querier) ([]Entry, error)

List returns all shunned artifacts ordered by mtime descending.

type PurgeResult

type PurgeResult struct {
	BlobsDeleted   int
	DeltasExpanded int
	PrivateCleaned int
}

PurgeResult summarizes what Purge deleted.

func Purge

func Purge(d *db.DB) (PurgeResult, error)

Purge physically removes all shunned blobs from the repo. Follows Fossil's shun_artifacts() algorithm from shun.c. Requires *db.DB (not Querier) because it runs in a transaction.

Jump to

Keyboard shortcuts

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