use yaml tag instead of ocisConfig

This commit is contained in:
Willy Kloucek
2022-03-29 15:06:58 +02:00
parent 58b3bdf570
commit e224ce03cf
84 changed files with 851 additions and 851 deletions
+27 -27
View File
@@ -8,45 +8,45 @@ import (
// Config combines all available configuration parts.
type Config struct {
*shared.Commons `ocisConfig:"-" yaml:"-"`
*shared.Commons `yaml:"-"`
Service Service `ocisConfig:"-" yaml:"-"`
Service Service `yaml:"-"`
Tracing *Tracing `ocisConfig:"tracing"`
Log *Log `ocisConfig:"log"`
Debug Debug `ocisConfig:"debug"`
Tracing *Tracing `yaml:"tracing"`
Log *Log `yaml:"log"`
Debug Debug `yaml:"debug"`
Ldap Ldap `ocisConfig:"ldap"`
Ldaps Ldaps `ocisConfig:"ldaps"`
Ldap Ldap `yaml:"ldap"`
Ldaps Ldaps `yaml:"ldaps"`
Backend Backend `ocisConfig:"backend"`
Fallback FallbackBackend `ocisConfig:"fallback"`
Backend Backend `yaml:"backend"`
Fallback FallbackBackend `yaml:"fallback"`
RoleBundleUUID string `ocisConfig:"role_bundle_uuid" env:"GLAUTH_ROLE_BUNDLE_ID"`
RoleBundleUUID string `yaml:"role_bundle_uuid" env:"GLAUTH_ROLE_BUNDLE_ID"`
Context context.Context `ocisConfig:"-" yaml:"-"`
Context context.Context `yaml:"-"`
}
// Backend defined the available backend configuration.
type Backend struct {
Datastore string `ocisConfig:"datastore"`
BaseDN string `ocisConfig:"base_dn"`
Insecure bool `ocisConfig:"insecure"`
NameFormat string `ocisConfig:"name_format"`
GroupFormat string `ocisConfig:"group_format"`
Servers []string `ocisConfig:"servers"`
SSHKeyAttr string `ocisConfig:"ssh_key_attr"`
UseGraphAPI bool `ocisConfig:"use_graph_api"`
Datastore string `yaml:"datastore"`
BaseDN string `yaml:"base_dn"`
Insecure bool `yaml:"insecure"`
NameFormat string `yaml:"name_format"`
GroupFormat string `yaml:"group_format"`
Servers []string `yaml:"servers"`
SSHKeyAttr string `yaml:"ssh_key_attr"`
UseGraphAPI bool `yaml:"use_graph_api"`
}
// FallbackBackend defined the available fallback backend configuration.
type FallbackBackend struct {
Datastore string `ocisConfig:"datastore"`
BaseDN string `ocisConfig:"base_dn"`
Insecure bool `ocisConfig:"insecure"`
NameFormat string `ocisConfig:"name_format"`
GroupFormat string `ocisConfig:"group_format"`
Servers []string `ocisConfig:"servers"`
SSHKeyAttr string `ocisConfig:"ssh_key_attr"`
UseGraphAPI bool `ocisConfig:"use_graph_api"`
Datastore string `yaml:"datastore"`
BaseDN string `yaml:"base_dn"`
Insecure bool `yaml:"insecure"`
NameFormat string `yaml:"name_format"`
GroupFormat string `yaml:"group_format"`
Servers []string `yaml:"servers"`
SSHKeyAttr string `yaml:"ssh_key_attr"`
UseGraphAPI bool `yaml:"use_graph_api"`
}
+4 -4
View File
@@ -2,8 +2,8 @@ package config
// Debug defines the available debug configuration.
type Debug struct {
Addr string `ocisConfig:"addr" env:"GLAUTH_DEBUG_ADDR"`
Token string `ocisConfig:"token" env:"GLAUTH_DEBUG_TOKEN"`
Pprof bool `ocisConfig:"pprof" env:"GLAUTH_DEBUG_PPROF"`
Zpages bool `ocisConfig:"zpages" env:"GLAUTH_DEBUG_ZPAGES"`
Addr string `yaml:"addr" env:"GLAUTH_DEBUG_ADDR"`
Token string `yaml:"token" env:"GLAUTH_DEBUG_TOKEN"`
Pprof bool `yaml:"pprof" env:"GLAUTH_DEBUG_PPROF"`
Zpages bool `yaml:"zpages" env:"GLAUTH_DEBUG_ZPAGES"`
}
+3 -3
View File
@@ -2,7 +2,7 @@ package config
// Ldap defines the available LDAP configuration.
type Ldap struct {
Enabled bool `ocisConfig:"enabled" env:"GLAUTH_LDAP_ENABLED"`
Addr string `ocisConfig:"addr" env:"GLAUTH_LDAP_ADDR"`
Namespace string `ocisConfig:"-" yaml:"-"`
Enabled bool `yaml:"enabled" env:"GLAUTH_LDAP_ENABLED"`
Addr string `yaml:"addr" env:"GLAUTH_LDAP_ADDR"`
Namespace string `yaml:"-"`
}
+5 -5
View File
@@ -2,9 +2,9 @@ package config
// Ldaps defined the available LDAPS configuration.
type Ldaps struct {
Enabled bool `ocisConfig:"enabled" env:"GLAUTH_LDAPS_ENABLED"`
Addr string `ocisConfig:"addr" env:"GLAUTH_LDAPS_ADDR"`
Namespace string `ocisConfig:"-" yaml:"-"`
Cert string `ocisConfig:"cert" env:"GLAUTH_LDAPS_CERT"`
Key string `ocisConfig:"key" env:"GLAUTH_LDAPS_KEY"`
Enabled bool `yaml:"enabled" env:"GLAUTH_LDAPS_ENABLED"`
Addr string `yaml:"addr" env:"GLAUTH_LDAPS_ADDR"`
Namespace string `yaml:"-"`
Cert string `yaml:"cert" env:"GLAUTH_LDAPS_CERT"`
Key string `yaml:"key" env:"GLAUTH_LDAPS_KEY"`
}
+1 -1
View File
@@ -2,5 +2,5 @@ package config
// Service defines the available service configuration.
type Service struct {
Name string `ocisConfig:"-" yaml:"-"`
Name string `yaml:"-"`
}
+4 -4
View File
@@ -2,8 +2,8 @@ package config
// Tracing defines the available tracing configuration.
type Tracing struct {
Enabled bool `ocisConfig:"enabled" env:"OCIS_TRACING_ENABLED;GLAUTH_TRACING_ENABLED"`
Type string `ocisConfig:"type" env:"OCIS_TRACING_TYPE;GLAUTH_TRACING_TYPE"`
Endpoint string `ocisConfig:"endpoint" env:"OCIS_TRACING_ENDPOINT;GLAUTH_TRACING_ENDPOINT"`
Collector string `ocisConfig:"collector" env:"OCIS_TRACING_COLLECTOR;GLAUTH_TRACING_COLLECTOR"`
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;GLAUTH_TRACING_ENABLED"`
Type string `yaml:"type" env:"OCIS_TRACING_TYPE;GLAUTH_TRACING_TYPE"`
Endpoint string `yaml:"endpoint" env:"OCIS_TRACING_ENDPOINT;GLAUTH_TRACING_ENDPOINT"`
Collector string `yaml:"collector" env:"OCIS_TRACING_COLLECTOR;GLAUTH_TRACING_COLLECTOR"`
}