Documentation
¶
Index ¶
- Variables
- type Bot
- func (b *Bot) Excuse(ev *slack.MessageEvent, err error)
- func (b *Bot) HandleHelp(ev *slack.MessageEvent, matches []string)
- func (b *Bot) HandleLookup(ev *slack.MessageEvent, matches []string)
- func (b *Bot) HandleSummon(ev *slack.MessageEvent, matches []string)
- func (b *Bot) HandleUsage(ev *slack.MessageEvent, matches []string)
- func (b *Bot) ProcessIMOpen(ev *slack.IMOpenEvent)
- func (b *Bot) ProcessMessage(ev *slack.MessageEvent)
- type SlackService
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Bot ¶
type Bot struct {
Slacker *SlackService
Factory *factories.GonduitFactory
// contains filtered or unexported fields
}
Bot represents the state of the bot. It also contains functions related to the interactive portion of Phabulous.
func NewBot ¶
NewBot creates a new instance of a Bot.
func (*Bot) Excuse ¶
func (b *Bot) Excuse(ev *slack.MessageEvent, err error)
Excuse comes up with an excuse of why something failed.
func (*Bot) HandleHelp ¶
func (b *Bot) HandleHelp(ev *slack.MessageEvent, matches []string)
HandleHelp shows help.
func (*Bot) HandleLookup ¶
func (b *Bot) HandleLookup(ev *slack.MessageEvent, matches []string)
HandleLookup looks up information about a Phabricator object.
func (*Bot) HandleSummon ¶
func (b *Bot) HandleSummon(ev *slack.MessageEvent, matches []string)
HandleSummon shows usage tip.
func (*Bot) HandleUsage ¶
func (b *Bot) HandleUsage(ev *slack.MessageEvent, matches []string)
HandleUsage shows usage tip.
func (*Bot) ProcessIMOpen ¶
func (b *Bot) ProcessIMOpen(ev *slack.IMOpenEvent)
ProcessIMOpen handles IM open events.
func (*Bot) ProcessMessage ¶
func (b *Bot) ProcessMessage(ev *slack.MessageEvent)
ProcessMessage processes incoming messages events and calls the appropriate handlers.
type SlackService ¶
type SlackService struct {
Config *confer.Config `inject:""`
Logger *logrus.Logger `inject:""`
Factory *factories.GonduitFactory `inject:""`
Slack *slack.Client
Bot *Bot
}
SlackService provides access to the Slack service.
func (*SlackService) BootRTM ¶
func (s *SlackService) BootRTM()
BootRTM handles RTM events in Slack.
func (*SlackService) FeedPost ¶
func (s *SlackService) FeedPost(storyText string) error
FeedPost posts a message to Slack on the default bot channel.
func (*SlackService) GetFeedChannel ¶
func (s *SlackService) GetFeedChannel() string
GetFeedChannel returns the default channel for the bot.
Source Files
¶
- bot.go
- bot_help.go
- bot_lookup.go
- bot_summon.go
- rtm.go
- service.go