Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Load ¶
func Load()
Load reads the config file and populates the Config struct; then validates the Config
func LoadForSetup ¶
func LoadForSetup()
LoadForSetup reads the config file and populates the Config struct; it does not validate the Config, since this is not required for setup
Types ¶
type Config ¶ added in v0.2.0
type Config struct { IssuerURL string `yaml:"issuer"` Host string // Extracted from the IssuerURL Server serverConf `yaml:"server"` GeoIPDBFile string `yaml:"geo_ip_db_file"` API apiConf `yaml:"api"` DB DBConf `yaml:"database"` Signing signingConfs `yaml:"signing"` Logging loggingConf `yaml:"logging"` ServiceDocumentation string `yaml:"service_documentation"` Features featuresConf `yaml:"features"` Providers []*ProviderConf `yaml:"providers"` ServiceOperator ServiceOperatorConf `yaml:"service_operator"` Caching cacheConf `yaml:"cache"` }
Config holds the server configuration
type DBConf ¶ added in v0.2.0
type DBConf struct { Hosts []string `yaml:"hosts"` User string `yaml:"user"` Password string `yaml:"password"` PasswordFile string `yaml:"password_file"` DB string `yaml:"db"` ReconnectInterval int64 `yaml:"try_reconnect_interval"` EnableScheduledCleanup bool `yaml:"schedule_cleanup"` }
DBConf is type for holding configuration for a db
func (*DBConf) GetPassword ¶ added in v0.3.0
GetPassword returns the password for this database config. If necessary it reads it from the password file.
type EnforcedRestrictionsConf ¶ added in v0.10.0
type EnforcedRestrictionsConf struct { Enabled bool `yaml:"-"` ClaimSources map[string]string `yaml:"claim_sources"` DefaultTemplate string `yaml:"default_template"` ForbidOnDefault bool `yaml:"forbid_on_default"` HelpHTMLText string `yaml:"help_html"` HelpHTMLFile string `yaml:"help_html_file"` Mapping map[string]string `yaml:"mapping"` }
EnforcedRestrictionsConf is a type for holding configuration for enforced restrictions
type LoggerConf ¶
type LoggerConf struct { Dir string `yaml:"dir"` StdErr bool `yaml:"stderr"` Level string `yaml:"level"` }
LoggerConf holds configuration related to logging
type MailNotificationConf ¶ added in v0.10.0
type MailNotificationConf struct { Enabled bool `yaml:"enabled"` MailServer MailServerConf `yaml:"mail_server"` OverwriteDir string `yaml:"overwrite_dir"` }
MailNotificationConf holds the configuration for email notifications
type MailServerConf ¶ added in v0.10.0
type MailServerConf struct { Host string `yaml:"host"` Port int `yaml:"port"` Username string `yaml:"user"` Password string `yaml:"password"` FromAddress string `yaml:"from_address"` }
MailServerConf holds the configuration for the email server
type ProviderConf ¶
type ProviderConf struct { Issuer string `yaml:"issuer"` ClientID string `yaml:"client_id"` ClientSecret string `yaml:"client_secret"` Scopes []string `yaml:"scopes"` MytokensMaxLifetime int64 `yaml:"mytokens_max_lifetime"` EnforcedRestrictions EnforcedRestrictionsConf `yaml:"enforced_restrictions"` Endpoints *oauth2x.Endpoints `yaml:"-"` Name string `yaml:"name"` Audience *model.AudienceConf `yaml:"audience"` }
ProviderConf holds information about a provider
type ServiceOperatorConf ¶ added in v0.2.0
type ServiceOperatorConf struct { Name string `yaml:"name"` Homepage string `yaml:"homepage"` Contact string `yaml:"mail_contact"` Privacy string `yaml:"mail_privacy"` }
ServiceOperatorConf is type holding the configuration for the service operator of this mytoken instance