config

package
v1.51.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

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

func NewDefaultConfig() *models.Config

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

func ValidateSecrets(config *models.Config)

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

type ConfigOption func(*models.Config)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL