Documentation
¶
Overview ¶
Package versioning resolves the release identifier (immutable version + image ref) for each service that c2quay is about to gate.
c2quay intentionally refuses mutable identifiers. Only `manifest_file`, `resolved_image_digest`, and `git_sha` are supported. `image_tag` was considered and rejected — see docs/adr/0001-immutable-release-identity.md.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseShortOption ¶ added in v0.4.5
ParseShortOption interprets the raw value of versioning.options.short from YAML (which is always a string in the map[string]string model). It accepts common boolean spellings and positive integers.
Returns (short, recognized, error):
"" → (0, false, nil) // absent, caller uses default "false"/"0"/"no" → (0, true, nil) // explicit off "true"/"yes" → (-1, true, nil) // use git default abbreviation "N" where N in [1..40] → (N, true, nil) // explicit length anything else → error
Types ¶
type GitSHA ¶
type GitSHA struct {
// contains filtered or unexported fields
}
func NewGitSHAWith ¶ added in v0.4.5
func NewGitSHAWith(opts GitSHAOptions) *GitSHA
NewGitSHAWith constructs a GitSHA strategy with explicit options. Used by the Factory when the config asks for an abbreviated SHA.
type GitSHAOptions ¶ added in v0.4.5
type GitSHAOptions struct {
// Short asks git for an abbreviated SHA. 0 means full; values > 0 pin an
// explicit length (passed as `--short=N`); -1 means "use git's default
// abbreviation" (honours core.abbrev, usually 7).
Short int
}
GitSHAOptions tunes the git_sha strategy. Zero value = full 40-char SHA, which preserves pre-v0.4.5 behaviour.
type ManifestFile ¶
type ManifestFile struct {
// contains filtered or unexported fields
}
func NewManifestFile ¶
func NewManifestFile(path string) *ManifestFile
func (*ManifestFile) Name ¶
func (*ManifestFile) Name() string
type Release ¶
type Release struct {
Version string // immutable identifier (SHA, digest, or manifest-provided version)
ImageRef string // optional — the resolved image reference if known
}
Release is the resolved identity of a service for a given deploy.
type ResolvedDigest ¶
type ResolvedDigest struct {
// contains filtered or unexported fields
}
ResolvedDigest resolves each service's release identifier as the sha256 digest embedded in its Compose image reference.
func NewResolvedDigest ¶
func NewResolvedDigest(a configRenderer) *ResolvedDigest
NewResolvedDigest builds a ResolvedDigest strategy backed by a Compose adapter (or anything that renders a compose config JSON).
func (*ResolvedDigest) Name ¶
func (*ResolvedDigest) Name() string