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) (*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) (*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) (*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) (*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) (*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 WebhookEvent ¶
type WebhookEvent struct { // RegistryURL is the URL of the registry that sent the webhook RegistryURL string `json:"registryUrl,omitempty"` // Repository is the repository name Repository string `json:"repository,omitempty"` // Tag is the image tag Tag string `json:"tag,omitempty"` // Digest is the content digest of the image Digest string `json:"digest,omitempty"` }
WebhookEvent represents a generic webhook payload
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) (*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 { // Port is the port number to listen on Port int // Handler is the webhook handler Handler *WebhookHandler // UpdaterConfig holds configuration for image updating UpdaterConfig *argocd.UpdateConfiguration // KubeClient is the Kubernetes client KubeClient *kube.ImageUpdaterKubernetesClient // ArgoClient is the ArgoCD client ArgoClient argocd.ArgoCD // Server is the HTTP server Server *http.Server // rate limiter to limit requests in an interval RateLimiter ratelimit.Limiter // contains filtered or unexported fields }
WebhookServer manages webhook endpoints and triggers update checks
func NewWebhookServer ¶
func NewWebhookServer(port int, handler *WebhookHandler, kubeClient *kube.ImageUpdaterKubernetesClient, argoClient argocd.ArgoCD) *WebhookServer
NewWebhookServer creates a new webhook server