mirror of
https://github.com/projectcapsule/capsule.git
synced 2026-02-14 18:09:58 +00:00
* chore: add nwa Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com> * chore: update helm-schema version Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com> * chore: update helm-schema version Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com> --------- Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>
25 lines
495 B
Go
25 lines
495 B
Go
// Copyright 2020-2025 Project Capsule Authors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package route
|
|
|
|
import (
|
|
capsulewebhook "github.com/projectcapsule/capsule/pkg/webhook"
|
|
)
|
|
|
|
type defaults struct {
|
|
handlers []capsulewebhook.Handler
|
|
}
|
|
|
|
func Defaults(handler ...capsulewebhook.Handler) capsulewebhook.Webhook {
|
|
return &defaults{handlers: handler}
|
|
}
|
|
|
|
func (w *defaults) GetHandlers() []capsulewebhook.Handler {
|
|
return w.handlers
|
|
}
|
|
|
|
func (w *defaults) GetPath() string {
|
|
return "/defaults"
|
|
}
|