snapshot

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateName

func ValidateName(name string) error

Types

type Entry

type Entry struct {
	Path    string      `json:"path"`
	Present bool        `json:"present"`
	Kind    tree.Kind   `json:"kind,omitempty"`
	Nodes   []tree.Node `json:"nodes,omitempty"`
}

type Loaded

type Loaded struct {
	ProjectRoot string
	Name        string
	Directory   string
	Manifest    Manifest
	Present     int
	Absent      int
}

func Load

func Load(projectRoot, name string, configuredPaths []string) (Loaded, error)

type Manifest

type Manifest struct {
	Version int     `json:"version"`
	Name    string  `json:"name"`
	Entries []Entry `json:"entries"`
}

type Result

type Result struct {
	Saved    int
	Removed  int
	Restored int
	Absent   int
	Replaced bool
}

func Restore

func Restore(loaded Loaded) (Result, error)

func Save

func Save(plan SavePlan) (Result, error)

type SavePlan

type SavePlan struct {
	ProjectRoot string
	Name        string
	Paths       []string
	Entries     []Entry
	Exists      bool
	Present     int
	Absent      int
}

func PlanSave

func PlanSave(projectRoot, name string, paths []string, noClobber bool) (SavePlan, error)

Jump to

Keyboard shortcuts

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