check

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package check compares a local project against its source blueprint for drift.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileStatus

type FileStatus string

FileStatus indicates the drift state of a file.

const (
	StatusUpToDate        FileStatus = "up-to-date"
	StatusModified        FileStatus = "modified"
	StatusMissing         FileStatus = "missing"
	StatusModifiedLocally FileStatus = "modified-locally"
	StatusUpstreamChanged FileStatus = "upstream-changed"
	StatusBothChanged     FileStatus = "both-changed"
)

File drift statuses.

type FileUpdate

type FileUpdate struct {
	Path   string     `json:"path"`
	Status FileStatus `json:"status"`
	Source string     `json:"source"`
}

FileUpdate describes the drift state of a single file.

type Opts

type Opts struct {
	// ProjectDir is the root of the scaffolded project (defaults to ".").
	ProjectDir string
	// RegistryDir is the local path to the current registry content.
	// When set, enables three-way comparison (local vs lockfile vs registry).
	RegistryDir string
	// OutputFormat is "text" or "json".
	OutputFormat string
	// Writer is the output destination.
	Writer io.Writer
}

Opts configures the check operation.

type Result

type Result struct {
	DefaultsUpdates []FileUpdate `json:"defaults_updates"`
	ManagedUpdates  []FileUpdate `json:"managed_updates"`
}

Result holds the check comparison results.

func Run

func Run(opts *Opts) (*Result, error)

Run executes the check workflow.

Jump to

Keyboard shortcuts

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