bot

package
v0.0.0-...-1852850 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2017 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bot

type Bot struct {
	// contains filtered or unexported fields
}

Bot structure

func NewBot

func NewBot(slackBotAPI *slack.Client, dsClient *datastore.Client, traceClient *trace.Client, twitterAPI *anaconda.TwitterApi, httpClient Client, gerritLink, name, token, version string, devMode bool, log Logger) *Bot

NewBot will create a new Slack bot

func (*Bot) GetLastSeenCL

func (b *Bot) GetLastSeenCL(ctx context.Context) (int, error)

func (*Bot) GoTimeFM

func (b *Bot) GoTimeFM()

func (*Bot) HandleMessage

func (b *Bot) HandleMessage(event *slack.MessageEvent)

HandleMessage will process the incoming message and repspond appropriately

func (*Bot) Init

func (b *Bot) Init(ctx context.Context, rtm *slack.RTM, span *trace.Span) error

Init must be called before anything else in order to initialize the bot

func (*Bot) MonitorGerrit

func (b *Bot) MonitorGerrit(duration time.Duration)

MonitorGerrit handles the Gerrit changes

func (*Bot) TeamJoined

func (b *Bot) TeamJoined(event *slack.TeamJoinEvent)

TeamJoined is called when the someone joins the team

type Client

type Client interface {
	Do(r *http.Request) (*http.Response, error)
}

Client is the HTTP client

type Logger

type Logger func(message string, args ...interface{})

Logger function

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL