target

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Class

type Class struct {
	Kind    Kind
	Message string
	Owner   Owner
}

func Classify

func Classify(targetPath string, source state.Source, context string, targetRoot string, selected *packages.Identity, selectedRel string) Class

func ClassifyAt

func ClassifyAt(logicalPath string, physicalPath string, source state.Source, context string, targetRoot string, selected *packages.Identity, selectedRel string) Class

func (Class) ConflictCode

func (c Class) ConflictCode() ConflictCode

type ConflictCode

type ConflictCode string
const (
	ConflictAbsent            ConflictCode = "absent"
	ConflictGeneric           ConflictCode = "conflict"
	ConflictInsideSourceRepo  ConflictCode = "inside_source_repo"
	ConflictMultipleProviders ConflictCode = "multiple_providers"
	ConflictNotManagedSymlink ConflictCode = "not_a_managed_symlink"
	ConflictOutsideTargetRoot ConflictCode = "outside_target_root"
	ConflictPackagePathExists ConflictCode = "package_path_exists"
	ConflictPathMismatch      ConflictCode = "path_mismatch"
	ConflictRealDirectory     ConflictCode = "real_directory"
	ConflictRealFile          ConflictCode = "real_file"
	ConflictSpecialFile       ConflictCode = "special_file"
	ConflictUnmanagedSymlink  ConflictCode = "unmanaged_symlink"
	ConflictOwnedByOther      ConflictCode = "owned_by_other"
	ConflictCopySourceChanged ConflictCode = "copy_source_modified"
	ConflictCopyTargetChanged ConflictCode = "copy_target_modified"
	ConflictCopyDrift         ConflictCode = "copy_drift"
)

type CopyClass

type CopyClass struct {
	Kind    CopyKind
	Message string
	Record  state.Copy
	Owner   Owner
}

func ClassifyCopy

func ClassifyCopy(entry PackageEntry, registry state.Registry) CopyClass

func (CopyClass) ConflictCode

func (c CopyClass) ConflictCode() ConflictCode

type CopyKind

type CopyKind string
const (
	CopyAbsent        CopyKind = "absent"
	CopyTrackedAbsent CopyKind = "copy_missing"
	CopyUnchanged     CopyKind = "copy_unchanged"
	CopySourceChanged CopyKind = "copy_source_modified"
	CopyTargetChanged CopyKind = "copy_target_modified"
	CopyBothChanged   CopyKind = "copy_drift"
	CopyUntracked     CopyKind = "copy_untracked"
	CopyOwnedOther    CopyKind = "copy_owned_by_other"
	CopySpecial       CopyKind = "copy_conflict"
)

type Kind

type Kind string
const (
	Absent           Kind = "absent"
	RealDirectory    Kind = "real_directory"
	RealFile         Kind = "real_file"
	SpecialFile      Kind = "special_file"
	UnmanagedSymlink Kind = "unmanaged_symlink"
	Managed          Kind = "managed"
	ManagedSelected  Kind = "managed_selected"
	ManagedOther     Kind = "managed_other"
	PathMismatch     Kind = "path_mismatch"
)

type Owner

type Owner struct {
	Identity       packages.Identity
	PackageRel     string
	EntryPath      string
	ExpectedTarget string
	Mismatch       bool
}

func InferOwner

func InferOwner(linkPath string, source state.Source, context string, targetRoot string) (Owner, bool)

func InferOwnerAt

func InferOwnerAt(logicalLinkPath string, physicalLinkPath string, source state.Source, context string, targetRoot string) (Owner, bool)

type PackageEntry

type PackageEntry struct {
	Identity     packages.Identity
	Entry        packages.Entry
	PackageID    string
	ProviderKey  string
	TargetPath   string
	PhysicalPath string
}

func NewPackageEntry

func NewPackageEntry(pkg packages.Resolved, entry packages.Entry, logicalRoot string, physicalPath func(string) string) (PackageEntry, error)

func (PackageEntry) Classify

func (entry PackageEntry) Classify(source state.Source, context string, targetRoot string) Class

Jump to

Keyboard shortcuts

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