config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnv

func GetEnv(key, fallback string) string

GetEnv gets an environment variable with a fallback

func GetEnvAsInt

func GetEnvAsInt(key string, fallback int) int

GetEnvAsInt gets an environment variable as integer with a fallback

Types

type CORSConfig

type CORSConfig struct {
	AllowedOrigins []string
}

type Config

type Config struct {
	Server   ServerConfig
	Database DatabaseConfig
	CORS     CORSConfig
}

func Load

func Load() (*Config, error)

Load loads configuration from environment variables

type DatabaseConfig

type DatabaseConfig struct {
	Path string
}

type ServerConfig

type ServerConfig struct {
	Port string
	Mode string
}

Jump to

Keyboard shortcuts

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