161ef94b4f
Check engine pin consistency / Dockerfile / CI pin consistency (push) Successful in 8s
Sirius CI/CD Pipeline / Detect Changes (push) Successful in 23s
Validate Docker Configuration / Validate Docker Compose Configuration (push) Successful in 47s
Sirius CI/CD Pipeline / Build API (${{ matrix.platform }}) (push) Has been cancelled
Sirius CI/CD Pipeline / Build UI (${{ matrix.platform }}) (push) Has been cancelled
Sirius CI/CD Pipeline / Merge Engine Manifest (push) Has been cancelled
Sirius CI/CD Pipeline / Merge API Manifest (push) Has been cancelled
Sirius CI/CD Pipeline / Merge UI Manifest (push) Has been cancelled
Sirius CI/CD Pipeline / Build Engine (${{ matrix.platform }}) (push) Has been cancelled
Sirius CI/CD Pipeline / Build Infra (${{ matrix.service }}, ${{ matrix.platform }}) (push) Has been cancelled
Sirius CI/CD Pipeline / Merge Infra Manifest (sirius-postgres) (push) Has been cancelled
Sirius CI/CD Pipeline / Merge Infra Manifest (sirius-rabbitmq) (push) Has been cancelled
Sirius CI/CD Pipeline / Merge Infra Manifest (sirius-valkey) (push) Has been cancelled
Sirius CI/CD Pipeline / Integration Test (push) Has been cancelled
Sirius CI/CD Pipeline / Public Stack Contract (push) Has been cancelled
Sirius CI/CD Pipeline / Dispatch Demo Deployment (sirius-demo branch) (push) Has been cancelled
Sirius CI/CD Pipeline / Dispatch Demo Canary (main branch) (push) Has been cancelled
Sirius CI/CD Pipeline / Guard Registry Namespace (push) Has been cancelled
46 lines
1.7 KiB
Go
46 lines
1.7 KiB
Go
package main
|
|
|
|
import "os"
|
|
|
|
// Config holds all target addresses and credentials for the security test harness.
|
|
type Config struct {
|
|
// Service endpoints
|
|
APIURL string // Go API base URL (default http://localhost:9001)
|
|
UIURL string // Next.js / tRPC base URL (default http://localhost:3000)
|
|
GRPCAddr string // gRPC agent address (default localhost:50051)
|
|
ValkeyAddr string // Valkey / Redis address (default localhost:6379)
|
|
PostgresAddr string // PostgreSQL address (default localhost:5432)
|
|
RabbitMQAddr string // RabbitMQ AMQP address (default localhost:5672)
|
|
RabbitMQMgmt string // RabbitMQ Management address (default localhost:15672)
|
|
EngineHTTPAddr string // Engine HTTP address (default localhost:5174)
|
|
|
|
// Credentials
|
|
APIKey string // A valid API key for positive tests (auto-generated if empty)
|
|
|
|
// Flags
|
|
NoColor bool // Disable ANSI color codes
|
|
Verbose bool // Enable verbose output
|
|
}
|
|
|
|
// LoadConfig reads environment variables with sensible defaults.
|
|
func LoadConfig() *Config {
|
|
return &Config{
|
|
APIURL: envOr("SIRIUS_API_URL", "http://localhost:9001"),
|
|
UIURL: envOr("SIRIUS_UI_URL", "http://localhost:3000"),
|
|
GRPCAddr: envOr("SIRIUS_GRPC_ADDR", "localhost:50051"),
|
|
ValkeyAddr: envOr("SIRIUS_VALKEY_ADDR", "localhost:6379"),
|
|
PostgresAddr: envOr("SIRIUS_POSTGRES_ADDR", "localhost:5432"),
|
|
RabbitMQAddr: envOr("SIRIUS_RABBITMQ_ADDR", "localhost:5672"),
|
|
RabbitMQMgmt: envOr("SIRIUS_RABBITMQ_MGMT_ADDR", "localhost:15672"),
|
|
EngineHTTPAddr: envOr("SIRIUS_ENGINE_ADDR", "localhost:5174"),
|
|
APIKey: os.Getenv("SIRIUS_API_KEY"),
|
|
}
|
|
}
|
|
|
|
func envOr(key, fallback string) string {
|
|
if v := os.Getenv(key); v != "" {
|
|
return v
|
|
}
|
|
return fallback
|
|
}
|