Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Server server.Config Database database.Config Security SecurityConfig RateLimit RateLimitConfig }
Config represents the complete application configuration
type RateLimitConfig ¶
type RateLimitConfig struct { Enabled bool `envconfig:"RATE_LIMIT_ENABLED" default:"true"` Rate int `envconfig:"RATE_LIMIT_RATE" default:"100"` Burst int `envconfig:"RATE_LIMIT_BURST" default:"5"` TimeWindow time.Duration `envconfig:"RATE_LIMIT_TIME_WINDOW" default:"1m"` PerIP bool `envconfig:"RATE_LIMIT_PER_IP" default:"true"` }
RateLimitConfig contains rate limiting settings
type SecurityConfig ¶
type SecurityConfig struct { CorsAllowedOrigins []string `envconfig:"SECURITY_CORS_ALLOWED_ORIGINS" default:"http://localhost:3000"` CorsAllowedMethods []string `envconfig:"SECURITY_CORS_ALLOWED_METHODS" default:"GET,POST,PUT,DELETE,OPTIONS"` CorsAllowedHeaders []string `envconfig:"SECURITY_CORS_ALLOWED_HEADERS" default:"Origin,Content-Type,Accept,Authorization"` CorsMaxAge int `envconfig:"SECURITY_CORS_MAX_AGE" default:"3600"` CorsAllowCredentials bool `envconfig:"SECURITY_CORS_ALLOW_CREDENTIALS" default:"true"` RequestTimeout time.Duration `envconfig:"SECURITY_REQUEST_TIMEOUT" default:"30s"` }
SecurityConfig contains security-related settings
Click to show internal directories.
Click to hide internal directories.