config

package
v0.0.0-...-0e79629 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

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

Jump to

Keyboard shortcuts

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