Add Namespace to CombinedAuthHandler

This commit is contained in:
Ben Toogood
2020-04-07 09:40:40 +01:00
parent 3a378eb7d6
commit 7206d5f964
4 changed files with 91 additions and 48 deletions

View File

@@ -10,14 +10,15 @@ import (
type Option func(o *Options)
type Options struct {
EnableACME bool
EnableCORS bool
ACMEProvider acme.Provider
EnableTLS bool
ACMEHosts []string
TLSConfig *tls.Config
Namespace string
Resolver resolver.Resolver
EnableACME bool
EnableCORS bool
ACMEProvider acme.Provider
EnableTLS bool
ACMEHosts []string
TLSConfig *tls.Config
Resolver resolver.Resolver
Namespace string
ServiceNamespace string
}
func EnableCORS(b bool) Option {
@@ -56,6 +57,12 @@ func TLSConfig(t *tls.Config) Option {
}
}
func ServiceNamespace(n string) Option {
return func(o *Options) {
o.ServiceNamespace = n
}
}
func Namespace(n string) Option {
return func(o *Options) {
o.Namespace = n