Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadConfig ¶
func LoadConfig()
LoadConfig initializes the configuration by reading environment variables, config file, and setting defaults
Types ¶
type Config ¶
type Config struct { HTTPServerPort string // Port for the HTTP server HTTPSServerPort string // Port for the HTTPS server ReadTimeout time.Duration // Maximum duration for reading the entire request, including the body WriteTimeout time.Duration // Maximum duration before timeing out writes of the response IdleTimeout time.Duration // Maximum amount of time to wait for the nex request MaxHeaderBytes int // Maximum size of request headers in bytes JWTSecret string // Secret key used for JWT authentication DatabaseURL string // URL for the database connection LogLevel string // Level of logging: DEBUG, INFO, WARN, ERROR EncryptionKey string // Key used for encrypting sensitive data AllowedOrigins []string // CORS: Allowed origins for the API APIVersion string // Version of the API DefaultAgentGroup string // Default group for newly registered agents TLSCertFile string // Path to the TLS certificate file for HTTPS TLSKeyFile string // Path to the TLS key file for HTTPS }
Config struct holds the server's configuration settings
var AppConfig Config
Global variable to hold the loaded configuration
Click to show internal directories.
Click to hide internal directories.