bouncer/internal/proxy/director/layer/authn/options.go
William Petit 5a34d5917f
Some checks are pending
Cadoles/bouncer/pipeline/head Build started...
Cadoles/bouncer/pipeline/pr-develop Build started...
feat: transform circuitbreaker layer in authn-network layer
2024-05-17 17:29:26 +02:00

26 lines
368 B
Go

package authn
type Options struct {
TemplateDir string
}
type OptionFunc func(*Options)
func NewOptions(funcs ...OptionFunc) *Options {
opts := &Options{
TemplateDir: "./templates",
}
for _, fn := range funcs {
fn(opts)
}
return opts
}
func WithTemplateDir(templateDir string) OptionFunc {
return func(o *Options) {
o.TemplateDir = templateDir
}
}