Documentation
¶
Overview ¶
Package config provides application configuration loaded from environment variables.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
DebugEnabled bool
GitHubOrg string
GitHubWebhookSecret string
GitHubBaseURL string
GitHubAppID int64
GitHubAppPrivateKey []byte
GitHubInstallID int64
OktaDomain string
OktaClientID string
OktaPrivateKey []byte
OktaScopes []string
OktaBaseURL string
OktaSyncRules []okta.SyncRule
OktaGitHubUserField string
OktaSyncSafetyThreshold float64
PRComplianceEnabled bool
PRMonitoredBranches []string
OktaOrphanedUserNotifications bool
SlackEnabled bool
SlackToken string
SlackChannel string
SlackAPIURL string
}
Config holds all application configuration loaded from environment variables.
func NewConfig ¶
NewConfig loads configuration from environment variables. returns error if required values are missing or invalid. supports SSM parameter references in format: arn:aws:ssm:REGION:ACCOUNT:parameter/path/to/param
func NewConfigWithContext ¶
NewConfigWithContext loads configuration from environment variables with the given context. supports SSM parameter resolution with automatic decryption.
func (*Config) IsGitHubConfigured ¶
IsGitHubConfigured returns true if GitHub App credentials are configured.
func (*Config) IsOktaSyncEnabled ¶
IsOktaSyncEnabled returns true if Okta sync is fully configured.
func (*Config) IsPRComplianceEnabled ¶
IsPRComplianceEnabled returns true if PR compliance checking is enabled.
func (*Config) Redacted ¶
func (c *Config) Redacted() RedactedConfig
Redacted returns a copy of the config with secrets redacted.
func (*Config) ShouldMonitorBranch ¶
ShouldMonitorBranch returns true if the given branch should be monitored for PR compliance.
type RedactedConfig ¶
type RedactedConfig struct {
DebugEnabled bool `json:"debug_enabled"`
GitHubOrg string `json:"github_org"`
GitHubWebhookSecret string `json:"github_webhook_secret"`
GitHubBaseURL string `json:"github_base_url"`
GitHubAppID int64 `json:"github_app_id"`
GitHubAppPrivateKey string `json:"github_app_private_key"`
GitHubInstallID int64 `json:"github_install_id"`
OktaDomain string `json:"okta_domain"`
OktaClientID string `json:"okta_client_id"`
OktaPrivateKey string `json:"okta_private_key"`
OktaScopes []string `json:"okta_scopes"`
OktaBaseURL string `json:"okta_base_url"`
OktaSyncRules []okta.SyncRule `json:"okta_sync_rules"`
OktaGitHubUserField string `json:"okta_github_user_field"`
OktaSyncSafetyThreshold float64 `json:"okta_sync_safety_threshold"`
PRComplianceEnabled bool `json:"pr_compliance_enabled"`
PRMonitoredBranches []string `json:"pr_monitored_branches"`
OktaOrphanedUserNotifications bool `json:"okta_orphaned_user_notifications"`
SlackEnabled bool `json:"slack_enabled"`
SlackToken string `json:"slack_token"`
SlackChannel string `json:"slack_channel"`
SlackAPIURL string `json:"slack_api_url"`
}
RedactedConfig contains configuration with sensitive values redacted. safe for logging and API responses.