bouncer/internal/proxy/director/layer/authn/options.go

26 lines
368 B
Go
Raw Normal View History

package authn
2023-07-06 03:19:45 +02:00
type Options struct {
TemplateDir string
}
type OptionFunc func(*Options)
func NewOptions(funcs ...OptionFunc) *Options {
opts := &Options{
2023-07-06 03:19:45 +02:00
TemplateDir: "./templates",
}
for _, fn := range funcs {
fn(opts)
}
return opts
2023-07-06 03:19:45 +02:00
}
func WithTemplateDir(templateDir string) OptionFunc {
return func(o *Options) {
o.TemplateDir = templateDir
}
}