Documentation
¶
Overview ¶
Package installer identifies the installation managing the running Atmos binary. Detection is advisory and never installs software or refreshes package indexes.
Index ¶
Constants ¶
const ( // InstallURL is the fallback for unrecognized or manually installed binaries. InstallURL = "https://atmos.tools/install" // ReleasesURL also offers native packages that do not require a repository. ReleasesURL = "https://github.com/cloudposse/atmos/releases" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hint ¶
Hint contains presentation-independent upgrade guidance. Condition must be displayed before Command; it is never an unconditional action.
type Installation ¶
type Installation struct {
Kind Kind
Executable string
PackageName string
// Manager is the available upgrade command, empty when it cannot be found.
Manager string
Global bool
// contains filtered or unexported fields
}
Installation describes ownership of the running executable.
func Detect ¶
func Detect(ctx context.Context, opts ...Option) Installation
Detect identifies the running installation using local evidence and bounded probes.
func (Installation) UpgradeHint ¶
func (i Installation) UpgradeHint(latestVersion string) Hint
UpgradeHint recommends an action without assuming package repository availability.
type Kind ¶
type Kind string
Kind identifies installation ownership, not the repository a package came from.
type Option ¶
type Option func(*options)
Option configures detection dependencies or installation roots.
func WithNativeRoots ¶
WithNativeRoots supplies Atmos toolchain installation roots (above bin/).
func WithSystem ¶
WithSystem replaces operating system operations, primarily for testing.
type System ¶
type System interface {
GOOS() string
Getenv(string) string
Executable() (string, error)
EvalSymlinks(string) (string, error)
Abs(string) (string, error)
UserHomeDir() (string, error)
LookPath(string) (string, error)
Output(context.Context, string, ...string) ([]byte, error)
BuildInfo() (*debug.BuildInfo, bool)
}
System supplies read-only operating system operations for installation detection. Output implementations must honor context cancellation.