Documentation
¶
Overview ¶
Package resolve implements resolution for the GitHubEvent CR.
The GitHubEvent CR stores its spec as a raw JSON contract (spec.contract). ResolveGitHubEvent decodes this into a fully typed ResolvedGitHubEvent — the authoritative runtime representation consumed by all downstream domain and application logic.
GitHubEvent is an immutable record of an observed provider event. The spec carries facts, not intent — fields like Repository, EventType, and CommitSHA are copied verbatim from the webhook payload.
All failures surface as errors. Resolution never panics.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResolvedGitHubEvent ¶
type ResolvedGitHubEvent struct {
Event *eventsv1alpha1.GitHubEvent
Spec *ResolvedGitHubEventSpec
}
ResolvedGitHubEvent pairs the original Kubernetes GitHubEvent object with its fully decoded and validated spec.
func ResolveGitHubEvent ¶
func ResolveGitHubEvent(ev *eventsv1alpha1.GitHubEvent) (*ResolvedGitHubEvent, error)
ResolveGitHubEvent decodes and validates the raw JSON contract from the GitHubEvent CR spec into a ResolvedGitHubEvent. Returns an error if the CR is nil, the contract is absent, or any required field is missing or malformed.
type ResolvedGitHubEventSpec ¶
type ResolvedGitHubEventSpec struct {
Repository string
EventType string
// EventID is the provider-assigned delivery GUID. Used for idempotency
// and audit. Temporarily optional — uncomment requireString call below
// once all GitHubEvent CRs carry an eventId field.
EventID string
Ref string
CommitSHA string
Actor string
// Webhook carries the HMAC secret reference used for signature verification.
// Optional — absent when the GitHubEvent is created via manual dispatch.
Webhook ResolvedWebhook
}
ResolvedGitHubEventSpec is the decoded GitHubEvent spec. Fields are facts copied from the webhook payload — none are derived or transformed at this layer.
type ResolvedSecretRef ¶
ResolvedSecretRef is the resolved Kubernetes Secret reference for the webhook HMAC secret.
type ResolvedWebhook ¶
type ResolvedWebhook struct {
SecretRef ResolvedSecretRef
}
ResolvedWebhook is the resolved webhook configuration.