config

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConfig

func NewConfig(options ...models.ConfigOption) *models.Config

NewConfig builds a Config using functional options with sensible defaults. Works for both library and standalone modes. Options only override zero/empty values.

func NewPlugin added in v1.3.4

func NewPlugin(options ...models.PluginOption) models.Plugin

NewPlugin creates a new plugin with the provided options. Useful for simple plugins.

func WithAppName

func WithAppName(name string) models.ConfigOption

func WithBasePath

func WithBasePath(path string) models.ConfigOption

func WithBaseURL

func WithBaseURL(url string) models.ConfigOption

func WithCSRF

func WithCSRF(csrfConfig models.CSRFConfig) models.ConfigOption

func WithDB

func WithDB(db *gorm.DB) models.ConfigOption

func WithDatabase

func WithDatabase(config models.DatabaseConfig) models.ConfigOption

func WithDatabaseHooks

func WithDatabaseHooks(databaseHooksConfig models.DatabaseHooksConfig) models.ConfigOption

func WithEmailConfig added in v1.4.0

func WithEmailConfig(emailConfig models.EmailConfig) models.ConfigOption

WithEmailConfig sets the email configuration for sending emails in standalone mode

func WithEmailPassword

func WithEmailPassword(config models.EmailPasswordConfig) models.ConfigOption

func WithEmailVerification

func WithEmailVerification(config models.EmailVerificationConfig) models.ConfigOption

func WithEndpointHooks

func WithEndpointHooks(endpointHooksConfig models.EndpointHooksConfig) models.ConfigOption

func WithEventBus

func WithEventBus(eventBusConfig models.EventBusConfig) models.ConfigOption

func WithEventHooks

func WithEventHooks(eventHooksConfig models.EventHooksConfig) models.ConfigOption

func WithLogger added in v1.4.0

func WithLogger(config models.LoggerConfig) models.ConfigOption

func WithMode added in v1.4.0

func WithMode(mode models.Mode) models.ConfigOption

func WithPluginClose added in v1.3.4

func WithPluginClose(close func() error) models.PluginOption

func WithPluginConfig added in v1.3.4

func WithPluginConfig(config models.PluginConfig) models.PluginOption

func WithPluginDatabaseHooks added in v1.3.4

func WithPluginDatabaseHooks(databaseHooks any) models.PluginOption

func WithPluginEndpointHooks added in v1.4.0

func WithPluginEndpointHooks(endpointHooks any) models.PluginOption

func WithPluginEventHooks added in v1.3.4

func WithPluginEventHooks(eventHooks any) models.PluginOption

func WithPluginInit added in v1.3.4

func WithPluginInit(init func(ctx *models.PluginContext) error) models.PluginOption

func WithPluginMetadata added in v1.3.4

func WithPluginMetadata(metadata models.PluginMetadata) models.PluginOption

func WithPluginMigrations added in v1.3.4

func WithPluginMigrations(migrations []any) models.PluginOption

func WithPluginRateLimit added in v1.3.4

func WithPluginRateLimit(rateLimit *models.PluginRateLimit) models.PluginOption

func WithPluginRoutes added in v1.3.4

func WithPluginRoutes(routes []models.PluginRoute) models.PluginOption

func WithPlugins

func WithPlugins(config models.PluginsConfig) models.ConfigOption

func WithRateLimit

func WithRateLimit(rateLimitConfig models.RateLimitConfig) models.ConfigOption

func WithSecondaryStorage

func WithSecondaryStorage(storage models.SecondaryStorageConfig) models.ConfigOption

func WithSecret

func WithSecret(secret string) models.ConfigOption

func WithSession

func WithSession(sessionConfig models.SessionConfig) models.ConfigOption

func WithSocialProviders

func WithSocialProviders(socialProvidersConfig models.SocialProvidersConfig) models.ConfigOption

func WithTrustedOrigins

func WithTrustedOrigins(trustedOriginsConfig models.TrustedOriginsConfig) models.ConfigOption

func WithUser

func WithUser(userConfig models.UserConfig) models.ConfigOption

func WithWebhooks added in v1.4.0

func WithWebhooks(config models.WebhooksConfig) models.ConfigOption

Types

This section is empty.

Jump to

Keyboard shortcuts

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