Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChannelConfig ¶
type ChannelConfig struct { // The list of Trac instances allowed from this channel TracInstances []string `yaml:"trac_instances"` // The default Trac instance to query if a bug ID is given without an // explicit Trac ID. DefaultTracInstance string `yaml:"default_trac_instance,omitempty"` }
ChannelConfig represents the configuration for a given channel. The Mattermost bot can join several channels, with a different configuration for each.
type Config ¶
type Config struct { // URL of the Mattermost server, eg. http://server.domain:8080 Server string `yaml:"server"` // Username of the bot on the Mattermost server Username string `yaml:"username"` // Password of the bot on the Mattermost server Password string `yaml:"password"` // Team of the bot on the Mattermost server Team string `yaml:"team"` // Go template (see the doc of template/text) for formatting ticket information TicketTemplate string `yaml:"ticket_template"` // List of configured Trac servers Tracs map[string]TracConfig `yaml:"tracs"` // Per-channel configuration Channels map[string]ChannelConfig `yaml:"channels"` }
Config is the main configuration of the Mattermost bot.
func LoadFromFile ¶
type TracConfig ¶
type TracConfig struct { // URL of the Trac instance, eg. http://mytrac.domain:8080 URL string `yaml:"url"` // Username of the bot on that Trac instance Username string `yaml:"username"` // Password of the bot on that Trac instance Password string `yaml:"password"` // Whether to accept HTTPS from unknown authorities Insecure bool `yaml:"insecure"` // The authentication mechanism to use: // - http: HTTP Basic Auth // - form: Trac login form AuthType string `yaml:"auth_type"` }
TracConfig represents a configured Trac server. This server will be queried for ticket information.
Click to show internal directories.
Click to hide internal directories.