ports

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: Apache-2.0 Imports: 3 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdapterPlan

type AdapterPlan struct {
	TargetID           domain.TargetID
	ActionClass        string
	Summary            string
	Commands           []string
	PathsTouched       []string
	OwnedNativeObjects []domain.NativeObjectRef
	RestartRequired    bool
	ReloadRequired     bool
	NewThreadRequired  bool
	ManualSteps        []string
	Blocking           bool
	EvidenceKey        string
}

type ApplyInput

type ApplyInput struct {
	Plan           AdapterPlan
	Manifest       domain.IntegrationManifest
	ResolvedSource *ResolvedSource
	Policy         domain.InstallPolicy
	Inspect        InspectResult
	Record         *domain.InstallationRecord
}

type ApplyResult

type ApplyResult struct {
	TargetID                 domain.TargetID
	State                    domain.InstallState
	ActivationState          domain.ActivationState
	InteractiveAuthState     string
	OwnedNativeObjects       []domain.NativeObjectRef
	Warnings                 []string
	ManualSteps              []string
	RestartRequired          bool
	ReloadRequired           bool
	NewThreadRequired        bool
	SourceAccessState        string
	EnvironmentRestrictions  []domain.EnvironmentRestrictionCode
	VolatileOverrideDetected bool
	EvidenceClass            domain.EvidenceClass
	AdapterMetadata          map[string]any
}

type Capabilities

type Capabilities struct {
	InstallMode               string
	SupportsNativeUpdate      bool
	SupportsNativeRemove      bool
	SupportsLinkMode          bool
	SupportsAutoUpdatePolicy  bool
	SupportsScopeUser         bool
	SupportsScopeProject      bool
	SupportsScopeLocal        bool
	SupportsRepair            bool
	RequiresRestart           bool
	RequiresReload            bool
	RequiresNewThread         bool
	MayTriggerInteractiveAuth bool
	SupportedSourceKinds      []string
	EvidenceKey               string
}

type Clock

type Clock interface {
	Now() time.Time
}

type Command

type Command struct {
	Argv []string
	Env  []string
	Dir  string
	// StdoutLimitBytes bounds captured stdout without terminating the child.
	// Zero keeps the existing unbounded behavior for trusted callers.
	StdoutLimitBytes int
}

type CommandResult

type CommandResult struct {
	ExitCode int
	Stdout   []byte
	Stderr   []byte
}

type EvidenceEntry

type EvidenceEntry struct {
	Key           string   `json:"key"`
	Claim         string   `json:"claim"`
	EvidenceClass string   `json:"evidence_class"`
	URLs          []string `json:"urls"`
}

type EvidenceRegistry

type EvidenceRegistry interface {
	Get(context.Context, string) (EvidenceEntry, error)
	List(context.Context) ([]EvidenceEntry, error)
}

type FileSystem

type FileSystem interface {
	ReadFile(context.Context, string) ([]byte, error)
	WriteFileAtomic(context.Context, string, []byte, uint32) error
	MkdirAll(context.Context, string, uint32) error
	Stat(context.Context, string) (PathInfo, error)
	Remove(context.Context, string) error
}

type InspectInput

type InspectInput struct {
	IntegrationID string
	Record        *domain.InstallationRecord
	Scope         string
}

type InspectResult

type InspectResult struct {
	TargetID                 domain.TargetID
	Installed                bool
	State                    domain.InstallState
	ActivationState          domain.ActivationState
	InteractiveAuthState     string
	CatalogPolicy            *domain.CatalogPolicySnapshot
	ConfigPrecedenceContext  []string
	EnvironmentRestrictions  []domain.EnvironmentRestrictionCode
	VolatileOverrideDetected bool
	TrustResolutionSource    string
	SourceAccessState        string
	OwnedNativeObjects       []domain.NativeObjectRef
	ObservedNativeObjects    []domain.NativeObjectRef
	SettingsFiles            []string
	Warnings                 []string
	EvidenceClass            domain.EvidenceClass
}

type LockManager

type LockManager interface {
	Acquire(context.Context, string) (UnlockFunc, error)
}

type ManifestLoader

type ManifestLoader interface {
	Load(context.Context, ResolvedSource) (domain.IntegrationManifest, error)
}

type PathInfo

type PathInfo struct {
	Exists bool
	IsDir  bool
}

type PlanInstallInput

type PlanInstallInput struct {
	Manifest domain.IntegrationManifest
	Policy   domain.InstallPolicy
	Inspect  InspectResult
}

type PlanRemoveInput

type PlanRemoveInput struct {
	Record  domain.InstallationRecord
	Inspect InspectResult
}

type PlanToggleInput

type PlanToggleInput struct {
	Record  domain.InstallationRecord
	Inspect InspectResult
}

type PlanUpdateInput

type PlanUpdateInput struct {
	CurrentRecord domain.InstallationRecord
	NextManifest  domain.IntegrationManifest
	Inspect       InspectResult
}

type ProcessRunner

type ProcessRunner interface {
	Run(context.Context, Command) (CommandResult, error)
}

type RepairInput

type RepairInput struct {
	Record         domain.InstallationRecord
	Inspect        InspectResult
	Manifest       *domain.IntegrationManifest
	ResolvedSource *ResolvedSource
}

type ResolvedSource

type ResolvedSource struct {
	Kind      string
	Requested domain.RequestedSourceRef
	Resolved  domain.ResolvedSourceRef
	LocalPath string
	// Structured provenance fields let standard-first consumers preserve a
	// stable source identity while tracking the immutable resolved revision.
	CanonicalSource  string
	Repository       string
	PackageSubpath   string
	ResolvedRevision string
	// Cleanup is an opaque, resolver-owned capability. Callers must never
	// construct cleanup paths from package or persisted state data.
	Cleanup         func() error
	SourceDigest    string
	ExecutableFiles []string
	ImportRoots     []string
	FailureClass    string
}

type SafeFileMutationInput

type SafeFileMutationInput struct {
	Path           string
	Mode           uint32
	Build          func(original []byte, exists bool) ([]byte, error)
	ValidateBefore func(next []byte) error
	ValidateAfter  func(context.Context, string, []byte) error
}

type SafeFileMutationResult

type SafeFileMutationResult struct {
	Path        string
	BackupPath  string
	HadOriginal bool
}

type SafeFileMutator

type SafeFileMutator interface {
	MutateFile(context.Context, SafeFileMutationInput) (SafeFileMutationResult, error)
}

type SourceResolver

type SourceResolver interface {
	Resolve(context.Context, domain.IntegrationRef) (ResolvedSource, error)
}

type StateFile

type StateFile struct {
	SchemaVersion int                         `json:"schema_version"`
	Installations []domain.InstallationRecord `json:"installations"`
}

type StateStore

type StateStore interface {
	Load(context.Context) (StateFile, error)
	Save(context.Context, StateFile) error
}

type ToggleTargetAdapter

type ToggleTargetAdapter interface {
	PlanEnable(context.Context, PlanToggleInput) (AdapterPlan, error)
	ApplyEnable(context.Context, ApplyInput) (ApplyResult, error)
	PlanDisable(context.Context, PlanToggleInput) (AdapterPlan, error)
	ApplyDisable(context.Context, ApplyInput) (ApplyResult, error)
}

type UnlockFunc

type UnlockFunc func() error

type WorkspaceLockStore

type WorkspaceLockStore interface {
	Load(context.Context) (domain.WorkspaceLock, error)
	Save(context.Context, domain.WorkspaceLock) error
	Path() string
}

Jump to

Keyboard shortcuts

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