Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
IRC IRCConfig `yaml:"IRC"`
Slack SlackConfig `yaml:"Slack"`
ChannelMapping map[SlackChannel]IRCChannel `yaml:"ChannelMapping"`
}
Config holds the configuration that Pino expects
func LoadConfig ¶
LoadConfig returns the Config parsed from the given config file path
type IRCChannelKey ¶
type IRCChannelKey string
IRCChannelKey is an optional password for an IRC channel
type IRCConfig ¶
type IRCConfig struct {
Nickname string `yaml:"Nickname"`
Name string `yaml:"Name"`
Server string `yaml:"Server"`
Password string `yaml:"Password"`
IsSSL bool `yaml:"IsSSL"`
Channels map[IRCChannel]IRCChannelKey `yaml:"Channels"`
HighlightRules []IRCHighlightRuleConfig `yaml:"HighlightRules"`
}
IRCConfig define the IRC-specific config
type IRCHighlightRuleConfig ¶
type IRCHighlightRuleConfig struct {
NickPattern string `yaml:"NickPattern"`
MessagePattern string `yaml:"MessagePattern"`
ShouldHighlight bool `yaml:"ShouldHighlight"`
}
IRCHighlightRuleConfig defines when to directly ping the owner on Slack. You can define a nick pattern, a message pattern, or both. If a pattern is not defined, then it is assumed to match all values for that. The first rule that matches is executed. Default is to not highlight.
type Pino ¶
type Pino struct {
// contains filtered or unexported fields
}
Pino is the central orchestrator
type SlackChannel ¶
type SlackChannel string
SlackChannel is the name of a Slack channel, like "#CAA-on-Slack"
type SlackConfig ¶
type SlackConfig struct {
Owner string `yaml:"Owner"`
Token string `yaml:"Token"`
Channels map[SlackChannel]string `yaml:"Channels"`
}
SlackConfig defines the Slack-specific config