Documentation
¶
Overview ¶
Package contract implements the Package CR contract adapter — the one-way projection from the resolved runtime spec (resolve.ResolvedPackageSpec) to the protobuf contract type (contractv1.PackageSpec).
The contract type is consumed by infrastructure-layer concerns only:
- Execution hash computation for package deduplication
- Spec comparison across Carvel kapp reconciliation cycles
- Audit pipelines
Controllers and domain logic MUST NOT consume the returned contract value.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToPackageContract ¶
func ToPackageContract(s *resolve.ResolvedPackageSpec) *contractv1.PackageSpec
ToPackageContract projects the resolved runtime Package spec into a protobuf contractv1.PackageSpec for infrastructure consumers (hashing, comparison, audit).
StateRepository and Maintainers are omitted from the output when nil or empty — both are optional in the Package CR and produce no contract fields when not configured.
⚠️ ONE-WAY adapter. The returned value MUST NOT be fed back into any controller or domain logic path.
Types ¶
This section is empty.