Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultVersion is the default Fedora version tag DefaultVersion = "latest" // ImageConfigFileName is the filename for base image configuration ImageConfigFileName = "image.json" // ClaudeConfigFileName is the filename for Claude agent configuration ClaudeConfigFileName = "claude.json" // GooseConfigFileName is the filename for Goose agent configuration GooseConfigFileName = "goose.json" // CursorConfigFileName is the filename for Cursor agent configuration CursorConfigFileName = "cursor.json" // OpenCodeConfigFileName is the filename for OpenCode agent configuration OpenCodeConfigFileName = "opencode.json" )
Variables ¶
View Source
var ( // ErrInvalidPath is returned when a configuration path is invalid or empty ErrInvalidPath = errors.New("invalid configuration path") // ErrConfigNotFound is returned when a configuration file is not found ErrConfigNotFound = errors.New("configuration file not found for podman runtime and agent") // ErrInvalidConfig is returned when configuration validation fails ErrInvalidConfig = errors.New("invalid configuration") )
Functions ¶
This section is empty.
Types ¶
type AgentConfig ¶
type AgentConfig struct {
Packages []string `json:"packages"`
RunCommands []string `json:"run_commands"`
TerminalCommand []string `json:"terminal_command"`
}
AgentConfig represents agent-specific configuration.
type Config ¶
type Config interface {
// LoadImage reads and parses the base image configuration from image.json.
// Returns ErrConfigNotFound if the image.json file doesn't exist.
// Returns ErrInvalidConfig if the configuration is invalid.
LoadImage() (*ImageConfig, error)
// LoadAgent reads and parses the agent-specific configuration.
// Returns ErrConfigNotFound if the agent configuration file doesn't exist.
// Returns ErrInvalidConfig if the configuration is invalid.
LoadAgent(agentName string) (*AgentConfig, error)
// ListAgents returns the names of all configured agents.
// It scans the configuration directory for *.json files, excluding image.json.
// Returns an empty slice if the directory does not exist.
ListAgents() ([]string, error)
// GenerateDefaults creates default configuration files if they don't exist.
// Creates the configuration directory if it doesn't exist.
// Does not overwrite existing configuration files.
GenerateDefaults() error
}
Config represents a Podman runtime configuration manager. It manages the structure and contents of the Podman runtime configuration directory.
Click to show internal directories.
Click to hide internal directories.