Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CategoryLabel ¶
CategoryLabel returns a human-readable label for a category.
func CategoryOrder ¶
func CategoryOrder() []string
CategoryOrder returns the display order for categories. If any custom tools are present in the effective catalog, "custom" is appended to the end.
func ResolveDependencyNames ¶
ResolveDependencyNames takes a list of selected tool names and returns the full list including any transitive dependencies, in dependency order.
Types ¶
type ResolvedTool ¶
ResolvedTool is a tool with its resolved tag and rendered Docker instructions.
func Resolve ¶
func Resolve(selections []ToolSelection) ([]ResolvedTool, error)
Resolve takes a list of tool selections, resolves dependencies, and returns the full ordered list of tools with their Docker instructions.
func (ResolvedTool) ImageRef ¶
func (rt ResolvedTool) ImageRef() string
ImageRef returns the full image:tag reference for COPY --from.
func (ResolvedTool) Version ¶
func (rt ResolvedTool) Version() string
Version returns Tag with TagSuffix stripped (e.g. "3.13-slim" → "3.13"). Use this in Instructions via `{{.Version}}` when you need the version alone.
type Tool ¶
type Tool struct {
Name string `json:"name"` // unique identifier, e.g. "python"
Category string `json:"category,omitempty"` // "runtime", "package-manager", "cloud", "custom"
Description string `json:"description,omitempty"` // shown in TUI
SourceImage string `json:"source_image,omitempty"` // Docker image to COPY from, e.g. "public.ecr.aws/docker/library/python"
DefaultTag string `json:"default_tag,omitempty"` // e.g. "3.13-slim"
TagSuffix string `json:"tag_suffix,omitempty"` // image variant suffix, e.g. "-slim", appended to user-provided version
Instructions []string `json:"instructions"` // Dockerfile lines (COPY, RUN, ENV)
Dependencies []string `json:"dependencies,omitempty"` // other tool names auto-included
PathEntries []string `json:"path_entries,omitempty"` // paths to prepend to PATH in final stage
EnvVars map[string]string `json:"env_vars,omitempty"` // env vars for the final stage
UpdateSource UpdateSource `json:"update_source,omitempty"` // registry to query; "" = skip
UpdateRef string `json:"update_ref,omitempty"` // "owner/repo", npm pkg, pypi project
}
Tool represents a bundled dev tool that can be installed in the container.
JSON tags allow Tool entries to be loaded from ~/.ccodolo/custom-tools.json. The Category field is parsed but always overwritten to "custom" for any tool loaded from that file.
func All ¶
func All() []Tool
All returns all tools in the catalog (built-in plus any custom tools loaded from ~/.ccodolo/custom-tools.json).
func AutoUpdatable ¶ added in v0.5.0
func AutoUpdatable() []Tool
AutoUpdatable returns built-in tools that have an UpdateSource declared, meaning their version can be checked and bumped automatically. It always operates on builtinCatalog (never the effective catalog) so that a developer's local custom-tools.json cannot influence automated updates.
func VersionPinnable ¶
func VersionPinnable() []Tool
VersionPinnable returns tools from the catalog that have a DefaultTag (meaning their version can be meaningfully overridden, either via a multi-stage `COPY --from` image tag or via `{{.Tag}}` / `{{.Version}}` templated into a RUN command).
func (Tool) BuildTag ¶
BuildTag constructs the full image tag from a user-provided version, appending TagSuffix if set and not already present.
func (Tool) DefaultVersion ¶
DefaultVersion returns the version part of DefaultTag with the TagSuffix stripped.
type ToolSelection ¶
ToolSelection represents a user's tool choice, optionally with a version override.
type UpdateSource ¶ added in v0.5.0
type UpdateSource string
UpdateSource identifies the upstream registry the automated updater queries for new versions. Empty means the tool is excluded from auto-updates.
const ( UpdateDockerHub UpdateSource = "docker-hub" // hub.docker.com UpdateGitHub UpdateSource = "github-releases" // api.github.com releases UpdateNPM UpdateSource = "npm" // registry.npmjs.org UpdatePyPI UpdateSource = "pypi" // pypi.org UpdateQuay UpdateSource = "quay" // quay.io )