You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
smallstep-certificates/scep/api/webhook/options.go

25 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
}
}