filesets

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const IndexFileName = ".dockform-index.json"

Variables

This section is empty.

Functions

This section is empty.

Types

type Diff

type Diff struct {
	ToCreate []FileEntry
	ToUpdate []FileEntry
	ToDelete []string
}

func DiffIndexes

func DiffIndexes(local, remote Index) Diff

type FileEntry

type FileEntry struct {
	Path   string `json:"path"`
	Size   int64  `json:"size"`
	Sha256 string `json:"sha256"`
}

type Index

type Index struct {
	Version   string      `json:"version"`
	Target    string      `json:"target_path"`
	CreatedAt string      `json:"created_at"`
	Exclude   []string    `json:"exclude"`
	UID       int         `json:"uid"`
	GID       int         `json:"gid"`
	Files     []FileEntry `json:"files"`
	TreeHash  string      `json:"tree_hash"`
}

func BuildLocalIndex

func BuildLocalIndex(sourceDir string, targetPath string, excludes []string) (Index, error)

func ParseIndexJSON

func ParseIndexJSON(s string) (Index, error)

func (Index) ToJSON

func (i Index) ToJSON() (string, error)

Jump to

Keyboard shortcuts

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