Documentation
¶
Overview ¶
Package contract owns the proto projection for Domain — a one-way mapping from the typed resolve.ResolvedDomainSpec to the canonical proto DomainSpec used for content-addressable hashing, audit trails, and gRPC API responses.
One-way contract:
resolve.ResolvedDomainSpec → networkscontractv1alpha1.DomainSpec
This projection is NEVER fed back into controllers. It is the canonical serialization of a resolved Domain intent — output only.
TLS strategy wrapper:
DomainSpec.TlsStrategy is *commonv1.DomainTLSStrategy — a common/v1 wrapper
message consistent with the RouteRuntime / RoutePhase wrapper pattern.
"platform" → DOMAIN_TLS_STRATEGY_PLATFORM
"custom" → DOMAIN_TLS_STRATEGY_CUSTOM
nil / "" → DOMAIN_TLS_STRATEGY_UNSPECIFIED (safety fallback only —
tlsStrategy is validated as mandatory in resolve)
See also:
- resolution/domain/resolve — resolution entry point and TLSStrategy type
- resolution/domain/adapter — interface wrapper
- blanketops/networks/v1alpha1/domain.proto
- blanketops/common/v1/domain.proto
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToDomainContract ¶
func ToDomainContract(d *resolve.ResolvedDomain) (*networkscontractv1alpha1.DomainSpec, error)
ToDomainContract projects a ResolvedDomain into the canonical proto DomainSpec for infrastructure consumers (hashing, audit logging, gRPC serialization). Returns nil, nil for nil input — callers decide whether that is an error.
⚠️ ONE-WAY adapter. The returned value MUST NOT be fed back into any controller or domain logic path.
Types ¶
This section is empty.