config

package
v0.0.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DatabaseFlags

func DatabaseFlags(cfg *Config) []cli.Flag

func ExportOapiFlags

func ExportOapiFlags(cfg *Config) []cli.Flag

func GenericFlags

func GenericFlags(cfg *Config) []cli.Flag

func LoggerFlags

func LoggerFlags(cfg *Config) []cli.Flag

func RegistrationFlags

func RegistrationFlags(cfg *Config) []cli.Flag

func ServerFlags

func ServerFlags(cfg *Config) []cli.Flag

func SessionFlags

func SessionFlags(cfg *Config) []cli.Flag

Types

type Config

type Config struct {
	// Version of the application
	Version string

	// ConfigFile is the path to the configuration file
	ConfigFile string

	Server struct {
		// Port is the server port
		Port int
		// HttpLogs indicates if HTTP logs are enabled
		HttpLogs bool
	}

	// Logger is the configuration for the zerolog logger.
	// Level is the log level for the logger.
	// Pretty enables or disables pretty printing of logs (non JSON logs).
	Logger struct {
		Level  string
		Pretty bool
	}

	// Database is the configuration for the database connection.
	// Dialect is the database engine (sqlite, postgres, etc.).
	// DSN is the Data Source Name for the database connection.
	Database struct {
		Dialect string // Database engine (sqlite, postgres, etc.)
		DSN     string
	}

	Session struct {
		SecretKey         string
		ExpirationMinutes int
		Issuer            string
	}

	Auth struct {
		DisableAdminAccount bool
	}

	Registration struct {
		Enabled                  bool     // Enable or disable user registration
		RequireEmailVerification bool     // Require email verification for new registrations
		DomainWhitelist          []string // List of allowed domains for registration
		PasswordMinLength        int      // Minimum password length for registration
		PasswordComplexity       bool     // Require complex passwords (uppercase, lowercase, numbers, symbols)
	}

	ExportOapi struct {
		FileName string
	}
}

Jump to

Keyboard shortcuts

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