certificates/scep/api/webhook/options.go
2023-04-28 15:47:22 +02:00

24 lines
486 B
Go

package webhook
type ControllerOption func(*Controller) error
func WithURL(url string) ControllerOption {
return func(c *Controller) error {
c.webhook.URL = url
return nil
}
}
func WithBearerToken(token string) ControllerOption {
return func(c *Controller) error {
c.webhook.BearerToken = token
return nil
}
}
func WithDisableTLSClientAuth(enabled bool) ControllerOption {
return func(c *Controller) error {
c.webhook.DisableTLSClientAuth = enabled
return nil
}
}