Documentation
¶
Overview ¶
The primary interface for the raid CLI tool functionality.
Lifecycle:
- Initialize: set up the raid environment, including loading configurations and initializing data storage.
- Compile: compile the raid configurations and prepare them for execution.
- Execute: run the raid commands based on the compiled configurations.
- Shutdown: gracefully shut down the raid environment, ensuring all resources are released and saved.
Related packages:
- `raid/profile`: provides the core functionality for loading and managing profiles
- `raid/repo`: provides the core functionality for loading and managing repositories
- `raid/env`: provides the core functionality for loading and managing environments
Index ¶
- Constants
- Variables
- func ExecuteCommand(name string, args []string) error
- func ForceLoad() error
- func GetCommands() []lib.Command
- func GetProperty(name Property) (string, error)
- func Initialize()
- func Install(maxThreads int) error
- func Load() error
- func QuietGetCommands() []lib.Command
- type Environment
- type Finding
- type Property
- type Severity
Constants ¶
const ( RaidConfigFileName = lib.RaidConfigFileName ConfigPathFlag = lib.ConfigPathFlag ConfigPathFlagDesc = lib.ConfigPathFlagDesc ConfigPathFlagShort = lib.ConfigPathFlagShort ConfigPathDefault = lib.ConfigPathDefault ConfigDirName = lib.ConfigDirName ConfigFileName = lib.ConfigFileName )
const ( SeverityOK = lib.SeverityOK SeverityWarn = lib.SeverityWarn SeverityError = lib.SeverityError )
const ( PropertyVersion = resources.PropertyVersion PropertyEnvironment = resources.PropertyEnvironment )
const ( EnvironmentDevelopment = resources.EnvironmentDevelopment EnvironmentPreview = resources.EnvironmentPreview EnvironmentProduction = resources.EnvironmentProduction )
Variables ¶
var ConfigPath = &lib.CfgPath
Pointer to the configuration path
Functions ¶
func ExecuteCommand ¶
ExecuteCommand runs the named command from the active profile.
func ForceLoad ¶
func ForceLoad() error
Force load the raid configurations for execution. Ignores cache.
func GetCommands ¶
GetCommands returns all commands available in the active profile.
func GetProperty ¶
GetProperty returns the value of the named property from app.properties.
func Initialize ¶
func Initialize()
Initialize the raid environment, including loading configurations and initializing data storage.
func Load ¶
func Load() error
Load the raid configurations for execution. Uses cached results if available.
func QuietGetCommands ¶
QuietGetCommands performs a best-effort, read-only profile load and returns the available commands. It does not create config files or emit warnings, and returns nil if the config is absent or loading fails.
Types ¶
type Environment ¶
type Environment = resources.Environment
Environment identifies the runtime environment the binary was built for.