Help us shape the future of Go! Take the 2026 Go Developer Survey

compose

package
v0.0.0-...-f779c8d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

SPDX-License-Identifier: Apache-2.0 Package compose deterministically maps a docker-compose file into an engine.Spec so the web wizard's "Import a docker-compose file" option can pre-fill the same review form the prompt and manual options land in.

The compose file is authoritative for STRUCTURE (which services exist, which are built from source vs. pulled as infrastructure images, their ports and replica counts) — so this mapping is a pure function with no LLM: what the user already wrote is honored exactly, offline and for free. Compose is silent on semantic ROLE, so the pattern (which drives every trait default) is only a light heuristic that the user corrects in the form. Anything we cannot map cleanly is surfaced as a human-readable note rather than silently dropped or invented — see ToSpec.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToSpec

func ToSpec(data []byte) (engine.Spec, []string, error)

ToSpec maps a docker-compose file to an engine.Spec plus notes describing anything that couldn't be mapped cleanly (renamed services, unrecognized images kept as subcharts, dropped extra ports, an all-infrastructure file). It returns an error only when the file can't be parsed or has no services; the drafted spec is intentionally NOT hard-validated (the user edits it in the form before /generate validates).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL