Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DockerHubWebhook ¶
type DockerHubWebhook struct {
// contains filtered or unexported fields
}
DockerHubWebhook handles Docker Hub webhook events
func NewDockerHubWebhook ¶
func NewDockerHubWebhook(secret string) *DockerHubWebhook
NewDockerHubWebhook creates a new Docker Hub webhook handler
func (*DockerHubWebhook) GetRegistryType ¶
func (d *DockerHubWebhook) GetRegistryType() string
GetRegistryType returns the registry type this handler supports
func (*DockerHubWebhook) Parse ¶
func (d *DockerHubWebhook) Parse(r *http.Request) (*argocd.WebhookEvent, error)
Parse processes the Docker Hub webhook payload and returns a WebhookEvent
type GHCRWebhook ¶
type GHCRWebhook struct {
// contains filtered or unexported fields
}
GHCRWebhook handles GitHub Container Registry webhook events
func NewGHCRWebhook ¶
func NewGHCRWebhook(secret string) *GHCRWebhook
NewGHCRWebhook creates a new GHCR webhook handler
func (*GHCRWebhook) GetRegistryType ¶
func (g *GHCRWebhook) GetRegistryType() string
GetRegistryType returns the registry type this handler supports
func (*GHCRWebhook) Parse ¶
func (g *GHCRWebhook) Parse(r *http.Request) (*argocd.WebhookEvent, error)
Parse processes the GHCR webhook payload and returns a WebhookEvent
type HarborWebhook ¶
type HarborWebhook struct {
// contains filtered or unexported fields
}
HarborWebhook handles Harbor Registry webhook events
func NewHarborWebhook ¶
func NewHarborWebhook(secret string) *HarborWebhook
NewHarborWebhook creates a new Harbor webhook handler
func (*HarborWebhook) GetRegistryType ¶
func (h *HarborWebhook) GetRegistryType() string
GetRegistryType returns the registry type this handler supports
func (*HarborWebhook) Parse ¶
func (h *HarborWebhook) Parse(r *http.Request) (*argocd.WebhookEvent, error)
Parse processes the Harbor webhook payload and returns a WebhookEvent
type QuayWebhook ¶
type QuayWebhook struct {
// contains filtered or unexported fields
}
func NewQuayWebhook ¶
func NewQuayWebhook(secret string) *QuayWebhook
func (*QuayWebhook) GetRegistryType ¶
func (q *QuayWebhook) GetRegistryType() string
GetRegistryType returns the type this handler supports
func (*QuayWebhook) Parse ¶
func (q *QuayWebhook) Parse(r *http.Request) (*argocd.WebhookEvent, error)
Parse process the Quay webhook and returns a Webhook event from the event
type RegistryWebhook ¶
type RegistryWebhook interface {
// Parse processes the webhook payload and returns a WebhookEvent
Parse(r *http.Request) (*argocd.WebhookEvent, error)
// Validate validates the webhook payload
Validate(r *http.Request) error
// GetRegistryType returns the type of registry this handler supports
GetRegistryType() string
}
RegistryWebhook interface defines methods for handling registry webhooks
type WebhookHandler ¶
type WebhookHandler struct {
// contains filtered or unexported fields
}
WebhookHandler manages webhook handlers for different registry types
func NewWebhookHandler ¶
func NewWebhookHandler() *WebhookHandler
NewWebhookHandler creates a new webhook handler
func (*WebhookHandler) ProcessWebhook ¶
func (h *WebhookHandler) ProcessWebhook(r *http.Request) (*argocd.WebhookEvent, error)
ProcessWebhook processes an incoming webhook request and returns a WebhookEvent
func (*WebhookHandler) RegisterHandler ¶
func (h *WebhookHandler) RegisterHandler(handler RegistryWebhook)
RegisterHandler registers a webhook handler for a specific registry type
type WebhookServer ¶
type WebhookServer struct {
// We pass the whole Reconciler struct here, since it now holds all dependencies.
Reconciler *controller.ImageUpdaterReconciler
// Port is the port number to listen on
Port int
// Handler is the webhook handler
Handler *WebhookHandler
// Server is the HTTP server
Server *http.Server
// rate limiter to limit requests in an interval
RateLimiter ratelimit.Limiter
}
WebhookServer manages webhook endpoints and triggers update checks
func NewWebhookServer ¶
func NewWebhookServer(port int, handler *WebhookHandler, reconciler *controller.ImageUpdaterReconciler) *WebhookServer
NewWebhookServer creates a new webhook server