{"modulePath":"github.com/codeGROOVE-dev/slacker","version":"v0.0.0-20260117180538-72f1ef61c586","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package config\n\nPackage config manages server and repository configurations.\n\n## Types\n\n```go\ntype Manager struct {\n\t// contains filtered or unexported fields\n}\n```\nManager manages repository configurations.\n\n```go\nfunc New() *Manager\n```\nNew creates a new config manager.\n\n```go\nfunc (m *Manager) CacheStats() (hits, misses int64)\n```\nCacheStats returns cache hit and miss statistics for monitoring performance.\n\n```go\nfunc (m *Manager) ChannelsForRepo(org, repo string) []string\n```\nChannelsForRepo returns the Slack channels configured for a specific repo. It first checks explicit YAML configuration, then falls back to auto-discovery where a repo named \"goose\" would automatically map to channel \"#goose\".\n\n```go\nfunc (m *Manager) Config(org string) (*RepoConfig, bool)\n```\nConfig returns the configuration for a GitHub org.\n\n```go\nfunc (m *Manager) DailyRemindersEnabled(org string) bool\n```\nDailyRemindersEnabled returns whether daily reminders are enabled for an org.\n\n```go\nfunc (m *Manager) Domain(org string) string\n```\nDomain returns the email domain for GitHub-to-Slack user mapping for the given organization.\n\n```go\nfunc (m *Manager) InvalidateAllConfigs()\n```\nInvalidateAllConfigs removes all cached configurations. This can be useful during testing or major configuration changes.\n\n```go\nfunc (m *Manager) InvalidateConfig(org string)\n```\nInvalidateConfig removes the cached configuration for a specific organization. This is used when .codeGROOVE repository events are received to ensure fresh config loading.\n\n```go\nfunc (m *Manager) IsChannelMuted(org, channel string) bool\n```\nIsChannelMuted checks if a specific channel is muted for an org.\n\n```go\nfunc (m *Manager) LoadConfig(ctx context.Context, org string) error\n```\nLoadConfig loads the configuration for a GitHub org with retry logic.\n\n```go\nfunc (m *Manager) ReloadConfig(ctx context.Context, org string) error\n```\nReloadConfig reloads the configuration for an org (e.g., when .codeGROOVE repo is updated).\n\n```go\nfunc (m *Manager) ReminderDMDelay(org, channel string) int\n```\nReminderDMDelay returns the follow-up reminder delay in minutes for a specific channel. Returns the channel-specific delay if set, otherwise the global delay (default: 65 minutes). A value of 0 means the feature is disabled.\n\n```go\nfunc (m *Manager) SetGitHubClient(org string, client any)\n```\nSetGitHubClient sets the GitHub client for a specific org.\n\n```go\nfunc (m *Manager) SetWorkspaceName(workspaceName string)\n```\nSetWorkspaceName sets the Slack workspace name for validation.\n\n```go\nfunc (m *Manager) When(org, channel string) string\n```\nWhen returns the posting threshold for a channel. Returns \"immediate\" (default), \"assigned\", \"blocked\", or \"passing\".\n\n```go\nfunc (m *Manager) WorkspaceName(org string) string\n```\nWorkspaceName returns the Slack workspace team\\_id for an organization. Returns empty string if no workspace is configured.\n\n```go\ntype RepoConfig struct {\n\tChannels map[string]struct {\n\t\tReminderDMDelay *int     `yaml:\"reminder_dm_delay\"`\n\t\tWhen            *string  `yaml:\"when\"`  // Optional: when to post threads (\"immediate\", \"assigned\", \"blocked\", \"passing\")\n\t\tRepos           []string `yaml:\"repos\"` // Optional: override global delay for this channel (0 = disabled)\n\n\t\tMute bool `yaml:\"mute\"`\n\t} `yaml:\"channels\"`\n\tUsers  map[string]string `yaml:\"users\"`\n\tGlobal struct {\n\t\tTeamID             string `yaml:\"team_id\"`\n\t\tEmailDomain        string `yaml:\"email_domain\"`\n\t\tReminderDMDelay    int    `yaml:\"reminder_dm_delay\"`\n\t\tWhen               string `yaml:\"when\"`                 // When to post threads: \"immediate\" (default), \"assigned\", \"blocked\", \"passing\"\n\t\tDisableDailyReport bool   `yaml:\"disable_daily_report\"` // Default false (reports enabled)\n\t} `yaml:\"global\"` // Minutes to wait before sending DM if user tagged in channel (0 = disabled)\n}\n```\nRepoConfig represents the slack.yaml configuration for a GitHub org.\n\n```go\ntype ServerConfig struct {\n\tDataDir               string\n\tSlackSigningSecret    string\n\tGitHubAppID           string\n\tGitHubPrivateKey      string\n\tSprinklerURL          string\n\tAllowPersonalAccounts bool // Allow processing GitHub personal accounts (default: false for DoS protection)\n}\n```\nServerConfig holds the server configuration from environment variables.\n\n","path":"github.com/codeGROOVE-dev/slacker/pkg/config","name":"config","synopsis":"Package config manages server and repository configurations.","isRedistributable":true}
