Documentation
¶
Index ¶
- func NewConfig(options ...ConfigOption) *models.Config
- func NewDefaultConfig() *models.Config
- func ValidateSecrets(config *models.Config)
- type ConfigOption
- func WithAppName(name string) ConfigOption
- func WithBasePath(path string) ConfigOption
- func WithBaseURL(url string) ConfigOption
- func WithCoreServiceHooks(config *models.CoreServiceHooksConfig) ConfigOption
- func WithDatabase(config models.DatabaseConfig) ConfigOption
- func WithDisabledPaths(paths []string) ConfigOption
- func WithEventBus(config models.EventBusConfig) ConfigOption
- func WithLogger(config models.LoggerConfig) ConfigOption
- func WithPlugins(config models.PluginsConfig) ConfigOption
- func WithRouteMappings(config []models.RouteMapping) ConfigOption
- func WithSecret(secret string) ConfigOption
- func WithSecrets(secrets []models.SecretConfig) ConfigOption
- func WithSecurity(config models.SecurityConfig) ConfigOption
- func WithSession(config models.SessionConfig) ConfigOption
- func WithVerification(config models.VerificationConfig) ConfigOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConfig ¶
func NewConfig(options ...ConfigOption) *models.Config
NewConfig builds a Config using functional options with sensible defaults. Panics if certain required fields are missing or invalid.
func NewDefaultConfig ¶ added in v1.47.0
NewDefaultConfig returns the default configuration, without applying options or validating. A config file is decoded on top of it, so a key the file leaves out keeps its default instead of becoming the zero value.
func ValidateSecrets ¶ added in v1.51.0
ValidateSecrets normalizes and validates the token-encryption secrets, populating SecretKey and each SecretConfig.Key with decoded key material. It panics on invalid configuration so startup fails before any consumer runs. It is safe to call more than once; library callers that build a Config directly should call it before instantiating Authula.
Types ¶
type ConfigOption ¶
func WithAppName ¶
func WithAppName(name string) ConfigOption
func WithBasePath ¶
func WithBasePath(path string) ConfigOption
func WithBaseURL ¶
func WithBaseURL(url string) ConfigOption
func WithCoreServiceHooks ¶ added in v1.35.0
func WithCoreServiceHooks(config *models.CoreServiceHooksConfig) ConfigOption
func WithDatabase ¶
func WithDatabase(config models.DatabaseConfig) ConfigOption
func WithDisabledPaths ¶ added in v1.4.0
func WithDisabledPaths(paths []string) ConfigOption
func WithEventBus ¶
func WithEventBus(config models.EventBusConfig) ConfigOption
func WithLogger ¶
func WithLogger(config models.LoggerConfig) ConfigOption
func WithPlugins ¶
func WithPlugins(config models.PluginsConfig) ConfigOption
func WithRouteMappings ¶
func WithRouteMappings(config []models.RouteMapping) ConfigOption
func WithSecret ¶
func WithSecret(secret string) ConfigOption
func WithSecrets ¶ added in v1.51.0
func WithSecrets(secrets []models.SecretConfig) ConfigOption
WithSecrets sets the ordered encryption keyring. The first entry is the current encryption key; the remaining entries are used for decryption only.
func WithSecurity ¶
func WithSecurity(config models.SecurityConfig) ConfigOption
func WithSession ¶
func WithSession(config models.SessionConfig) ConfigOption
func WithVerification ¶
func WithVerification(config models.VerificationConfig) ConfigOption