oprefs

package
v0.2.31 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: MPL-2.0 Imports: 3 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package oprefs resolves `op://NAME` symbolic references in txcl rule bodies to concrete URLs based on a workspace's operations registry.

Substitution runs at apply time on the CLI side: the chassis only ever sees resolved URLs. This keeps the chassis simple and means a `txco diff` against an older chassis still works.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasRefs

func HasRefs(txcl string) bool

HasRefs reports whether txcl contains any `"op://..."` reference. Faster than calling References when the caller only needs a yes/no.

func References

func References(txcl string) []string

References returns the distinct list of op names referenced inside `"op://..."` literals in txcl. Useful for pre-validating a bundle before substitution, so a config-shape error surfaces before parse validation.

func ResolveOpRefs

func ResolveOpRefs(txcl string, ops map[string]Operation) (string, error)

ResolveOpRefs scans txcl for `"op://NAME"` literals and replaces each with `"<resolved-url>"` looked up in ops. Returns an error on the first unresolved name.

Types

type Operation

type Operation struct {
	URL string
}

Operation is the minimum shape resolveOpRefs cares about. The full schema (with optional auth fields, etc.) lives in chassis/cli but isn't imported here to avoid a cycle.

Jump to

Keyboard shortcuts

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