Documentation
¶
Index ¶
Constants ¶
View Source
const VERSION = "26.15"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BroadcastConfig ¶
type BroadcastConfig struct {
DefaultRateLimit int // Default rate limit per minute for broadcasts (0 means use service default)
}
type Config ¶
type Config struct {
Server ServerConfig
Database DatabaseConfig
Security SecurityConfig
Tracing TracingConfig
SMTP SMTPConfig
SMTPRelay SMTPRelayConfig
Demo DemoConfig
Broadcast BroadcastConfig
TaskScheduler TaskSchedulerConfig
AutomationScheduler AutomationSchedulerConfig
Telemetry bool
CheckForUpdates bool
RootEmail string
Environment string
APIEndpoint string
WebhookEndpoint string
LogLevel string
Version string
IsInstalled bool // NEW: Indicates if setup wizard has been completed
// Track which values came from actual environment variables (not database, not generated)
EnvValues EnvValues
}
func LoadWithOptions ¶
func LoadWithOptions(opts LoadOptions) (*Config, error)
LoadWithOptions loads the configuration with the specified options
func (*Config) GetEnvValues ¶
func (c *Config) GetEnvValues() (rootEmail, apiEndpoint, smtpHost, smtpUsername, smtpPassword, smtpFromEmail, smtpFromName string, smtpPort int, smtpUseTLS string, smtpRelayEnabled string, smtpRelayDomain, smtpRelayTLSCertBase64, smtpRelayTLSKeyBase64 string, smtpRelayPort int)
GetEnvValues returns configuration values that came from actual environment variables This is used by the setup service to determine which settings are already configured
func (*Config) IsDevelopment ¶
IsDevelopment returns true if the environment is set to development
func (*Config) IsProduction ¶
type DatabaseConfig ¶
type DatabaseConfig struct {
Host string
Port int
User string
Password string
DBName string
Prefix string
SSLMode string
MaxConnections int // Total max connections across all databases
MaxConnectionsPerDB int // Max connections per individual workspace database
ConnectionMaxLifetime time.Duration // Maximum lifetime of a connection
ConnectionMaxIdleTime time.Duration // Maximum idle time before closing
}
type DemoConfig ¶
type EnvValues ¶
type EnvValues struct {
RootEmail string
APIEndpoint string
SMTPHost string
SMTPPort int
SMTPUsername string
SMTPPassword string
SMTPFromEmail string
SMTPFromName string
SMTPUseTLS string // "true", "false", or "" (empty = not set, defaults to true)
SMTPRelayEnabled string // "true", "false", or "" (empty = not set, allows setup wizard to configure)
SMTPRelayDomain string
SMTPRelayPort int
SMTPRelayTLSCertBase64 string
SMTPRelayTLSKeyBase64 string
}
EnvValues tracks configuration that came from actual environment variables
type LoadOptions ¶
type LoadOptions struct {
EnvFile string // Optional environment file to load (e.g., ".env", ".env.test")
}
LoadOptions contains options for loading configuration
type SMTPConfig ¶
type SMTPRelayConfig ¶
type SMTPRelayConfig struct {
Enabled bool // Enable SMTP relay server for receiving emails
Port int // Port to listen on (default: 587)
Host string // Host to bind to (default: "0.0.0.0")
Domain string // Server domain name for SMTP greeting
TLSCertBase64 string // Base64 encoded TLS certificate
TLSKeyBase64 string // Base64 encoded TLS private key
}
type SecurityConfig ¶
type ServerConfig ¶
type SystemSettings ¶
type SystemSettings struct {
IsInstalled bool
RootEmail string
APIEndpoint string
SMTPHost string
SMTPPort int
SMTPUsername string
SMTPPassword string
SMTPFromEmail string
SMTPFromName string
SMTPUseTLS bool
TelemetryEnabled bool
CheckForUpdates bool
SMTPRelayEnabled bool
SMTPRelayDomain string
SMTPRelayPort int
SMTPRelayTLSCertBase64 string
SMTPRelayTLSKeyBase64 string
}
SystemSettings holds configuration loaded from database
type TaskSchedulerConfig ¶
type TracingConfig ¶
type TracingConfig struct {
Enabled bool
ServiceName string
SamplingProbability float64
// Trace exporter configuration
TraceExporter string // "jaeger", "stackdriver", "zipkin", "azure", "datadog", "xray", "none"
// Jaeger settings
JaegerEndpoint string
// Zipkin settings
ZipkinEndpoint string
// Stackdriver settings
StackdriverProjectID string
// Azure Monitor settings
AzureInstrumentationKey string
// Datadog settings
DatadogAgentAddress string
DatadogAPIKey string
// AWS X-Ray settings
XRayRegion string
// General agent endpoint (for exporters that support a common agent)
AgentEndpoint string
// Metrics exporter configuration
MetricsExporter string // "prometheus", "stackdriver", "datadog", "none" or comma-separated list
PrometheusPort int
}
Click to show internal directories.
Click to hide internal directories.