Documentation
¶
Overview ¶
Package diff implements helpers for comparing two filesystems.
Index ¶
- func GetPrecedingSnapshot(ctx context.Context, rep repo.Repository, snapshotID string) (*snapshot.Manifest, error)
- func GetTwoLatestSnapshotsForASource(ctx context.Context, rep repo.Repository, source snapshot.SourceInfo) (secondLast, last *snapshot.Manifest, err error)
- type Comparer
- type EntryTypeStats
- type Stats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPrecedingSnapshot ¶ added in v0.20.0
func GetPrecedingSnapshot(ctx context.Context, rep repo.Repository, snapshotID string) (*snapshot.Manifest, error)
GetPrecedingSnapshot fetches the snapshot manifest for the snapshot immediately preceding the given snapshotID if it exists.
func GetTwoLatestSnapshotsForASource ¶ added in v0.20.0
func GetTwoLatestSnapshotsForASource(ctx context.Context, rep repo.Repository, source snapshot.SourceInfo) (secondLast, last *snapshot.Manifest, err error)
GetTwoLatestSnapshotsForASource fetches two latest snapshot manifests for a given source if they exist.
Types ¶
type Comparer ¶
type Comparer struct { DiffCommand string DiffArguments []string // contains filtered or unexported fields }
Comparer outputs diff information between two filesystems.
func NewComparer ¶
NewComparer creates a comparer for a given repository that will output the results to a given writer.
type EntryTypeStats ¶ added in v0.20.0
type EntryTypeStats struct { Added uint32 `json:"added"` Removed uint32 `json:"removed"` Modified uint32 `json:"modified"` // aggregate stats SameContentButDifferentMetadata uint32 `json:"sameContentButDifferentMetadata"` // stats categorized based on metadata SameContentButDifferentMode uint32 `json:"sameContentButDifferentMode"` SameContentButDifferentModificationTime uint32 `json:"sameContentButDifferentModificationTime"` SameContentButDifferentUserOwner uint32 `json:"sameContentButDifferentUserOwner"` SameContentButDifferentGroupOwner uint32 `json:"sameContentButDifferentGroupOwner"` }
EntryTypeStats accumulates stats for an FS entry type.
type Stats ¶ added in v0.20.0
type Stats struct { FileEntries EntryTypeStats `json:"fileEntries"` DirectoryEntries EntryTypeStats `json:"directoryEntries"` }
Stats accumulates stats between snapshots being compared.
Click to show internal directories.
Click to hide internal directories.