snapshot

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSnapshot

func CreateSnapshot(cfg *config.Config) error

CreateSnapshot creates a new snapshot of ignored files

func RestoreSnapshot

func RestoreSnapshot(commit string, index int, force, dryRun bool) error

RestoreSnapshot restores files from a snapshot

Types

type Manifest

type Manifest struct {
	CommitHash string            `json:"commit"`
	Timestamp  time.Time         `json:"timestamp"`
	Index      int               `json:"index"`
	Files      map[string]string `json:"files"` // path -> sha256
	Config     *config.Config    `json:"config"`
}

Manifest represents the metadata for a snapshot

func ReadManifest

func ReadManifest(file *os.File) (*Manifest, error)

ReadManifest reads the manifest from a snapshot file

Jump to

Keyboard shortcuts

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