MCPcopy Create free account
hub / github.com/gotenberg/gotenberg / Provision

Method Provision

pkg/modules/webhook/webhook.go:72–89  ·  view source on GitHub ↗

Provision sets the module properties.

(ctx *gotenberg.Context)

Source from the content-addressed store, hash-verified

70
71// Provision sets the module properties.
72func (w *Webhook) Provision(ctx *gotenberg.Context) error {
73 flags := ctx.ParsedFlags()
74 w.enableSyncMode = flags.MustBool("webhook-enable-sync-mode")
75 w.allowList = flags.MustRegexpSlice("webhook-allow-list")
76 w.denyList = flags.MustRegexpSlice("webhook-deny-list")
77 w.errorAllowList = flags.MustDeprecatedRegexpSlice("webhook-error-allow-list", "webhook-allow-list")
78 w.errorDenyList = flags.MustDeprecatedRegexpSlice("webhook-error-deny-list", "webhook-deny-list")
79 w.denyPrivateIPs = flags.MustBool("webhook-deny-private-ips")
80 w.denyPublicIPs = flags.MustBool("webhook-deny-public-ips")
81 w.maxRetry = flags.MustInt("webhook-max-retry")
82 w.retryMinWait = flags.MustDuration("webhook-retry-min-wait")
83 w.retryMaxWait = flags.MustDuration("webhook-retry-max-wait")
84 w.clientTimeout = flags.MustDuration("webhook-client-timeout")
85 w.disable = flags.MustBool("webhook-disable")
86 w.asyncCount.Store(0)
87
88 return nil
89}
90
91// Middlewares returns the middleware.
92func (w *Webhook) Middlewares() ([]api.Middleware, error) {

Callers

nothing calls this directly

Calls 6

ParsedFlagsMethod · 0.80
MustBoolMethod · 0.80
MustRegexpSliceMethod · 0.80
MustIntMethod · 0.80
MustDurationMethod · 0.80

Tested by

no test coverage detected