composefile

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package composefile reads and edits Compose documents as text. Pinning an image rewrites exactly the bytes of one image scalar and nothing else, so comments, anchors, key order, and formatting survive an apply untouched — the file an operator reviews after a Transaction is the file they wrote, one digest longer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReplaceServiceImage

func ReplaceServiceImage(compose, service, expected, replacement string) (string, error)

ReplaceServiceImage rewrites one service's image scalar, requiring it to still read as expected, and returns the new document text. The replacement is written as a double-quoted scalar.

func ServiceImage

func ServiceImage(compose, service string) (string, error)

ServiceImage returns one service's image reference exactly as written. A service whose image is absent, non-scalar, or reached through an alias has no literal reference and is an error: Ripen only ever pins images it can read back verbatim.

func Services

func Services(compose string) ([]string, error)

Services returns the document's service names, sorted.

Types

This section is empty.

Jump to

Keyboard shortcuts

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