Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
HTTPAddress string
GRPCAddress string
DatabaseURL string
JWTIssuer string
JWTPrivateKeyPath string
JWTPublicKeyPath string
RefreshTokenExpiration time.Duration
AccessTokenExpiration time.Duration
PublicURL string
MailmanGRPCAddress string
EmailWebhookURL string
Environment string
EncryptionKey string
TrustedProxyMode bool // Enable IP extraction from X-Forwarded-For when behind reverse proxy
// ProxySecret, when set, requires a matching X-Proxy-Secret header on every request
// except the health check, so only traffic through the trusted edge is served.
ProxySecret string
CORSAllowedOrigins []string
// OAuth provider configuration for individual logins
GoogleClientID string
GoogleClientSecret string
GoogleIssuerURL string
MicrosoftClientID string
MicrosoftClientSecret string
MicrosoftTenantID string
MicrosoftIssuerURL string
GitHubClientID string
GitHubClientSecret string
GitHubAuthURL string
GitHubTokenURL string
GitHubAPIBase string
TOTPPeriod uint // TOTP time window in seconds (default 30, use smaller value for tests)
}
Config holds the configuration for creating a new server
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server wraps the HTTP and gRPC servers and their dependencies. Held as interfaces so the shutdown ordering is testable without real infrastructure.
func (*Server) Shutdown ¶
Shutdown drains both servers before releasing anything they depend on. The order matters: Shutdown and GracefulStop each block until in-flight work returns, and that work is still querying and still sending mail. The deferred closes run even if draining fails, so a timeout cannot leak the pool.
Click to show internal directories.
Click to hide internal directories.