Orchard.Config (orchard v0.1.7)

View Source

Configuration module for managing AXe binary versions and paths.

Summary

Functions

Returns the architecture string for the current system.

Returns all available AXe versions.

Returns the AXe executable command. If a custom path is configured, uses that. Otherwise uses the downloaded binary.

Checks if the AXe binary exists at the expected location.

Returns the checksum for a specific version and architecture.

Returns the configured AXe path from application config or nil.

Returns the configured AXe version from application config or default.

Returns the default AXe version.

Returns the download URL for a specific version and architecture.

Returns the path where the AXe binary should be stored.

Checks if a specific version is available.

Functions

architecture()

@spec architecture() :: String.t() | nil

Returns the architecture string for the current system.

available_versions()

@spec available_versions() :: [String.t()]

Returns all available AXe versions.

axe_cmd()

@spec axe_cmd() :: String.t()

Returns the AXe executable command. If a custom path is configured, uses that. Otherwise uses the downloaded binary.

axe_exists?()

@spec axe_exists?() :: boolean()

Checks if the AXe binary exists at the expected location.

checksum(version, arch)

@spec checksum(String.t(), String.t()) :: String.t() | nil

Returns the checksum for a specific version and architecture.

configured_path()

@spec configured_path() :: String.t() | nil

Returns the configured AXe path from application config or nil.

configured_version()

@spec configured_version() :: String.t()

Returns the configured AXe version from application config or default.

default_version()

@spec default_version() :: String.t()

Returns the default AXe version.

download_url(version, arch)

@spec download_url(String.t(), String.t()) :: {:ok, String.t()} | {:error, String.t()}

Returns the download URL for a specific version and architecture.

executable_path(version \\ nil)

@spec executable_path(String.t() | nil) :: String.t()

Returns the path where the AXe binary should be stored.

version_available?(version)

@spec version_available?(String.t()) :: boolean()

Checks if a specific version is available.