Initialize work order management system with database schema, API handlers, web client, and Docker configuration.

This commit is contained in:
2026-05-16 16:15:53 -04:00
parent c135722339
commit f904431ec3
28 changed files with 2171 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
package config
import "os"
type Config struct {
Addr string
DBDSN string
JWTSecret string
UploadPath string
BaseURL string
OIDCIssuer string
JWKSUrl string
AppEnv string
}
func Load() *Config {
return &Config{
Addr: env("ADDR", ":8080"),
DBDSN: env("DB_DSN", ""),
UploadPath: env("UPLOAD_PATH", "./uploads"),
BaseURL: env("BASE_URL", "http://localhost:8080"),
OIDCIssuer: env("OIDC_ISSUER", "http://localhost:8180/realms/workorders"),
JWKSUrl: env("JWKS_URL", "http://localhost:8180/realms/workorders/protocol/openid-connect/certs"),
AppEnv: env("APP_ENV", "development"),
}
}
func env(key, fallback string) string {
if v := os.Getenv(key); v != "" {
return v
}
return fallback
}