Documentation ¶
Index ¶
- Constants
- type Admin
- type Bot
- type BotConfig
- type LogContext
- type Logger
- type NilLogger
- func (l *NilLogger) Debugf(format string, args ...interface{})
- func (l *NilLogger) Errorf(format string, args ...interface{})
- func (l *NilLogger) Infof(format string, args ...interface{})
- func (l *NilLogger) Timed() Logger
- func (l *NilLogger) Warnf(format string, args ...interface{})
- func (l *NilLogger) With(logContext LogContext) Logger
- type NilPoster
- type Poster
- type TestLogger
- func (l *TestLogger) Debugf(format string, args ...interface{})
- func (l *TestLogger) Errorf(format string, args ...interface{})
- func (l *TestLogger) Infof(format string, args ...interface{})
- func (l *TestLogger) Timed() Logger
- func (l *TestLogger) Warnf(format string, args ...interface{})
- func (l *TestLogger) With(logContext LogContext) Logger
- type TestPost
- type TestPoster
Constants ¶
View Source
const Elapsed = "Elapsed"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BotConfig ¶
type BotConfig struct { // AdminUserIDs contains a comma-separated list of user IDs that are allowed // to administer plugin functions, even if not Mattermost sysadmins. AdminUserIDs string // AdminLogLevel is "debug", "info", "warn", or "error". AdminLogLevel string // AdminLogVerbose: set to include full context with admin log messages. AdminLogVerbose bool }
func (BotConfig) ToStorable ¶
type LogContext ¶
type LogContext map[string]interface{}
type NilLogger ¶
type NilLogger struct{}
func (*NilLogger) With ¶
func (l *NilLogger) With(logContext LogContext) Logger
type NilPoster ¶
type NilPoster struct{}
func (*NilPoster) DMWithAttachments ¶
func (p *NilPoster) DMWithAttachments(userID string, attachments ...*model.SlackAttachment) error
type Poster ¶
type Poster interface { // DM posts a simple Direct Message to the specified user DM(userID, format string, args ...interface{}) error // DMWithAttachments posts a Direct Message that contains Slack attachments. // Often used to include post actions. DMWithAttachments(userID string, attachments ...*model.SlackAttachment) error // Ephemeral sends an ephemeral message to a user Ephemeral(userID, channelID, format string, args ...interface{}) }
type TestLogger ¶
func (*TestLogger) Debugf ¶
func (l *TestLogger) Debugf(format string, args ...interface{})
func (*TestLogger) Errorf ¶
func (l *TestLogger) Errorf(format string, args ...interface{})
func (*TestLogger) Infof ¶
func (l *TestLogger) Infof(format string, args ...interface{})
func (*TestLogger) Timed ¶
func (l *TestLogger) Timed() Logger
func (*TestLogger) Warnf ¶
func (l *TestLogger) Warnf(format string, args ...interface{})
func (*TestLogger) With ¶
func (l *TestLogger) With(logContext LogContext) Logger
type TestPost ¶
type TestPost struct { UserID string ChannelID string Message string Attachments []*model.SlackAttachment }
type TestPoster ¶
func (*TestPoster) DM ¶
func (p *TestPoster) DM(userID, format string, args ...interface{}) error
func (*TestPoster) DMWithAttachments ¶
func (p *TestPoster) DMWithAttachments(userID string, attachments ...*model.SlackAttachment) error
func (*TestPoster) Ephemeral ¶
func (p *TestPoster) Ephemeral(userID, channelID, format string, args ...interface{})
func (*TestPoster) Reset ¶
func (p *TestPoster) Reset()
Click to show internal directories.
Click to hide internal directories.