projection

package
v0.0.0-...-10bf2d1 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LinkHomes

func LinkHomes(envDir string, tools map[string]string, paths map[string][]string) error
func RemoveStaleHomeLinks(envDir string, tools map[string]string, desired map[string][]string, previous Metadata) error

func Resolve

func Resolve(inputs []Input, overrides map[string]string) ([]Input, []Conflict)

func RestoreState

func RestoreState(environmentDir string, state State) error
func ValidateHomeLinks(envDir string, tools map[string]string, paths map[string][]string) error

Types

type Conflict

type Conflict struct {
	Path   string
	Owners []string
}

type Input

type Input struct {
	Tool        string
	LogicalPath string
	Source      string
	AllowedRoot string
	Owner       string
	Kind        Kind
}

type Kind

type Kind string
const (
	Instruction Kind = "instruction"
	Asset       Kind = "asset"
)

type Metadata

type Metadata struct {
	Schema       int               `json:"schema"`
	Generation   string            `json:"generation"`
	ManifestHash string            `json:"manifest_hash"`
	Files        map[string]string `json:"files"`
	CreatedAt    time.Time         `json:"created_at"`
}

func Apply

func Apply(plan Plan) (Metadata, error)

func Verify

func Verify(plan Plan) (Metadata, error)

func VerifyGenerated

func VerifyGenerated(environmentDir string) (Metadata, error)

VerifyGenerated validates the currently published generation without comparing it to a possibly newer manifest.

type Plan

type Plan struct {
	EnvironmentDir string
	ManifestPath   string
	Inputs         []Input
	Overrides      map[string]string
}

type State

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

State captures the published pointer and generation set before a projection transaction so callers can roll back failures after Apply returns.

func CaptureState

func CaptureState(environmentDir string) (State, error)

Jump to

Keyboard shortcuts

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