Documentation ¶
Index ¶
- type BotConfig
- func (c *BotConfig) AsDiscordConfig() (DiscordConfig, error)
- func (c *BotConfig) AsMatrixConfig() (MatrixConfig, error)
- func (c *BotConfig) AsMattermostConfig() (MattermostConfig, error)
- func (c *BotConfig) AsSlackConfig() (SlackConfig, error)
- func (c *BotConfig) AsTwitchConfig() (TwitchConfig, error)
- type BotConfigs
- type DiscordConfig
- type GeneralConfig
- type MatrixConfig
- type MattermostConfig
- type PluginConfig
- type PluginConfigs
- type SlackConfig
- type StorageConfig
- type TwitchConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BotConfig ¶
type BotConfig struct { BotID string `toml:"id" bson:"id"` Type string `toml:"type" bson:"type"` Enabled bool `toml:"enabled" bson:"enabled"` GeneralConfig GeneralConfig `toml:"general" bson:"general"` StorageConfig StorageConfig `toml:"storage" bson:"storage"` Config map[string]interface{} `toml:"config" bson:"config"` Plugins PluginConfigs `toml:"plugins" bson:"plugins"` }
BotConfig holds the configuration for one bot
func (*BotConfig) AsDiscordConfig ¶
func (c *BotConfig) AsDiscordConfig() (DiscordConfig, error)
AsDiscordConfig converts the config to a DiscordConfig
func (*BotConfig) AsMatrixConfig ¶
func (c *BotConfig) AsMatrixConfig() (MatrixConfig, error)
AsMatrixConfig converts the config to a MatrixConfig
func (*BotConfig) AsMattermostConfig ¶
func (c *BotConfig) AsMattermostConfig() (MattermostConfig, error)
AsMattermostConfig converts the config to a MattermostConfig
func (*BotConfig) AsSlackConfig ¶
func (c *BotConfig) AsSlackConfig() (SlackConfig, error)
AsSlackConfig converts the config to a SlackConfig
func (*BotConfig) AsTwitchConfig ¶
func (c *BotConfig) AsTwitchConfig() (TwitchConfig, error)
AsTwitchConfig converts the config to a TwitchConfig
type BotConfigs ¶
BotConfigs holds a collection of BotConfigs identified by an unique id
type DiscordConfig ¶
type DiscordConfig struct { ID string `toml:"id" json:"id"` Token string `toml:"token" json:"token"` Secret string `toml:"secret" json:"secret"` }
DiscordConfig contains config related to the Discord component
type GeneralConfig ¶
type GeneralConfig struct {
CallPrefix string `toml:"callprefix" json:"callprefix"`
}
GeneralConfig contains all parameters related to the general behavior of redseligg
type MatrixConfig ¶
type MatrixConfig struct { Server string `toml:"server" json:"server"` Username string `toml:"username" json:"username"` Password string `toml:"password" json:"password"` }
MatrixConfig contains config related to the Matrix component
type MattermostConfig ¶
type MattermostConfig struct { Server string `toml:"server" json:"server"` Username string `toml:"username" json:"username"` Password string `toml:"password" json:"password"` }
MattermostConfig contains config related to the Mattermost component
type PluginConfig ¶
type PluginConfig struct { Type string `toml:"type" bson:"type"` Config map[string]interface{} `toml:"config" bson:"config"` }
PluginConfig holds the configuration for one plugin
type PluginConfigs ¶
type PluginConfigs map[string]PluginConfig
PluginConfigs holds a collection of PluginConfigs identified by an unique id
type SlackConfig ¶
type SlackConfig struct { Workspace string `toml:"workspace" json:"workspace"` Token string `toml:"token" json:"token"` }
SlackConfig contains config related to the Mattermost component
type StorageConfig ¶
type StorageConfig struct { Type string `toml:"type" bson:"type"` Config map[string]interface{} `toml:"config" bson:"config"` }
StorageConfig holds the configuration for a storage
type TwitchConfig ¶
type TwitchConfig struct { Username string `toml:"username" json:"username"` Token string `toml:"token" json:"token"` Channels []string `toml:"channels" json:"channels"` }
TwitchConfig contains config related to the Twitch component