engine

package
v0.5.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	IncludeOriginSource   = "source"
	IncludeOriginExplicit = "explicit"

	IncludeMissingHintSourceMissing             = "source_missing"
	IncludeMissingHintSourceMissingTargetExists = "source_missing_target_exists"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Op     string `json:"op"`
	Path   string `json:"path"`
	Status string `json:"status"`
}

type ApplyOptions

type ApplyOptions struct {
	From    string
	Include string
	DryRun  bool
	Force   bool
}

type CLIError

type CLIError struct {
	Code int
	Msg  string
	Err  error
}

func (*CLIError) Error

func (e *CLIError) Error() string

func (*CLIError) Unwrap

func (e *CLIError) Unwrap() error

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

func NewEngine

func NewEngine() *Engine

func (*Engine) Apply

func (e *Engine) Apply(ctx context.Context, cwd string, opts ApplyOptions) (Result, int, error)

type Result

type Result struct {
	DryRun      bool     `json:"dry_run"`
	From        string   `json:"from"`
	To          string   `json:"to"`
	IncludeFile string   `json:"include_file"`
	Summary     Summary  `json:"summary"`
	Actions     []Action `json:"actions"`

	// Non-JSON metadata for human-readable CLI output.
	ResolvedIncludePath string `json:"-"`
	IncludeFound        bool   `json:"-"`
	IncludeOrigin       string `json:"-"`
	IncludeMissingHint  string `json:"-"`
	TargetIncludePath   string `json:"-"`
	PatternCount        int    `json:"-"`
}

type Summary

type Summary struct {
	Matched           int `json:"matched"`
	Copied            int `json:"copied,omitempty"`
	CopyPlanned       int `json:"copy_planned,omitempty"`
	SkippedSame       int `json:"skipped_same"`
	SkippedMissingSrc int `json:"skipped_missing_src"`
	Conflicts         int `json:"conflicts"`
	Errors            int `json:"errors"`
}

Jump to

Keyboard shortcuts

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