Documentation
¶
Index ¶
- Variables
- func SetLogLevel(level logrus.Level)
- func SetLogger(l *logrus.Entry)
- type AIConfig
- type BridgeConfig
- type Config
- func (c *Config) AI() *AIConfig
- func (c *Config) Current() *RuntimeConfig
- func (c *Config) Mastodon() *MastodonConfig
- func (c *Config) Mattermost() *MattermostConfig
- func (c *Config) RegisterReloadHook(hook func(rc *RuntimeConfig))
- func (c *Config) Reload() error
- func (c *Config) Slack() *SlackConfig
- type FormatterConfig
- type GlobalConfig
- type MastodonConfig
- type MattermostConfig
- type RuntimeConfig
- type SlackConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ( LogLevel string UserAgent string )
Functions ¶
func SetLogLevel ¶ added in v0.31.0
Types ¶
type AIConfig ¶ added in v0.32.0
type AIConfig struct {
Enabled bool
Provider string // "gemini" (default) or "copilot"
Token string // GitHub token for Copilot
ServiceAccountFile string // Gemini / Vertex AI
Project string
Location string
Model string // Fallback model if not specified in Models map
Models map[string]string // Provider-specific models, e.g. { "gemini": "gemini-3.8-flash", "copilot": "gpt-4o-mini" }
Prompt string
DefaultPostLimit int
MaxPostLimit int
}
type BridgeConfig ¶ added in v0.31.0
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (*Config) Current ¶ added in v0.31.0
func (c *Config) Current() *RuntimeConfig
func (*Config) Mastodon ¶ added in v0.31.0
func (c *Config) Mastodon() *MastodonConfig
func (*Config) Mattermost ¶ added in v0.17.0
func (c *Config) Mattermost() *MattermostConfig
func (*Config) RegisterReloadHook ¶ added in v0.31.0
func (c *Config) RegisterReloadHook(hook func(rc *RuntimeConfig))
RegisterReloadHook allows other packages to execute logic when the config file changes.
func (*Config) Reload ¶ added in v0.31.0
Reload re-reads the config file, updates the atomic pointer, and triggers hooks.
func (*Config) Slack ¶ added in v0.17.0
func (c *Config) Slack() *SlackConfig
type FormatterConfig ¶ added in v0.31.0
type FormatterConfig struct {
DisableEmoji bool
CustomEmoji map[string]string
DisableMarkdown bool
DisableMarkdownBlockQuote bool
MarkdownBlockQuoteChar string
MarkdownInlineCode string
SyntaxHighlighting string
DisableCodeBlockPrefix bool
CodeBlockPrefix string
CodeBlockSeparator string
Unicode bool
EnableIRCHexColors bool
PreserveNewLines string
}
type GlobalConfig ¶ added in v0.31.0
type MastodonConfig ¶ added in v0.31.0
type MastodonConfig struct {
Bridge BridgeConfig
Formatter FormatterConfig
Server string
ClientID string
ClientSecret string
AccessToken string
}
type MattermostConfig ¶ added in v0.31.0
type MattermostConfig struct {
Bridge BridgeConfig
Formatter FormatterConfig
MatterclientLogLevel string
DefaultServer string
DefaultTeam string
Insecure bool
IgnoreServerVersion bool
CollapseScrollback bool
SkipTLSVerify bool
PrefixMainTeam bool
ForceAntiIdle bool
AntiIdleChannel string
AntiIdleInterval int
PreferNickname bool
HideReplies bool
ShortenRepliesTo int
HideReactions bool
ShowOwnReactions bool
ShowMentions bool
DisableDefaultMentions bool
DisableShowOwnModified bool
DisableAutoView bool
LastViewedSaveFile string
ReplayStrategy string
EnableLazyJoin bool
LazyJoinExclude []string
ReplayExclude []string
ForceSyncOnReconnect bool
JoinReplayDuration time.Duration
MaxReplayDuration time.Duration
LazyJoinDuration time.Duration
DefaultDMOfflineThreshold time.Duration
HeavySyncThreshold time.Duration
MessageAttachmentShortFieldMaxLineLength int
MessageAttachmentOmitFieldTitles bool
}
type RuntimeConfig ¶ added in v0.31.0
type RuntimeConfig struct {
GlobalConfig
AI AIConfig
Mattermost MattermostConfig
Slack SlackConfig
Mastodon MastodonConfig
}
RuntimeConfig is immutable.
A new RuntimeConfig is constructed whenever the configuration is reloaded and atomically published. Callers must never modify it.
type SlackConfig ¶ added in v0.31.0
type SlackConfig struct {
Bridge BridgeConfig
Formatter FormatterConfig
Disable bool
DenyUsers []string
UseDisplayName bool
PreferNickname bool
}
Click to show internal directories.
Click to hide internal directories.