Documentation
¶
Overview ¶
Package composefile holds small, dependency-light helpers for inspecting a Compose document at the YAML-node level. It exists mainly so the doctor command can compare a live compose file against WhatTheDock's own pre-apply backups without importing the whole TUI package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ManagedKeys = map[string]bool{ "image": true, "restart": true, "command": true, "ports": true, "volumes": true, "environment": true, }
ManagedKeys are the service keys the WhatTheDock form owns and is allowed to change or remove (image/restart/command/ports/volumes/environment). A loss outside this set is never a deliberate form edit.
Functions ¶
func LostUnmanagedKeys ¶
LostUnmanagedKeys returns, sorted, the unmanaged service keys present in backup but absent from current. Those are exactly the keys a form-driven apply should never remove (build, container_name, network_mode, depends_on, ...), so their disappearance is the signature of an apply that overwrote more of the file than it should have. A service absent from either file yields no loss (that's a create or a delete, not a silent field drop).
func ServiceKeys ¶
ServiceKeys returns the set of top-level mapping keys on service's block in a Compose document. A document that doesn't define the service yields an empty set, not an error, so callers can compare across versions where the service appeared or disappeared.
Types ¶
This section is empty.