Documentation
¶
Index ¶
- type Config
- type SlackEngine
- func (e *SlackEngine) Close(errCode int)
- func (e *SlackEngine) FileUpload(channel string, file io.Reader, filename string) error
- func (e *SlackEngine) FileUploadWithType(channel string, file io.Reader, filename, filetype string) error
- func (e *SlackEngine) GetEmojiByRandom() (string, error)
- func (e *SlackEngine) GetUserByID(userID string) (engine.User, error)
- func (e *SlackEngine) Init(conf engine.Config) error
- func (e *SlackEngine) KeepAlive()
- func (e *SlackEngine) ReactEmoji(channel, emoji, msgTimestamp string) error
- func (e *SlackEngine) Reload()
- func (e *SlackEngine) Reply(channel, text string) error
- func (e *SlackEngine) ReplyThread(channel, text, threadTimestamp string) error
- func (e *SlackEngine) Run() int
- type SlackLogger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SlackEngine ¶
type SlackEngine struct {
// contains filtered or unexported fields
}
SlackEngine is a client for Slack.
func (*SlackEngine) FileUpload ¶
FileUpload uploads file.
func (*SlackEngine) FileUploadWithType ¶
func (e *SlackEngine) FileUploadWithType(channel string, file io.Reader, filename, filetype string) error
FileUploadWithType uploads file with file type. erf: https://api.slack.com/types/file#file_types
func (*SlackEngine) GetEmojiByRandom ¶
func (e *SlackEngine) GetEmojiByRandom() (string, error)
GetEmojiByRandom gets emoji randomly.
func (*SlackEngine) GetUserByID ¶
func (e *SlackEngine) GetUserByID(userID string) (engine.User, error)
GetUserByID gets user by given userID.
func (*SlackEngine) Init ¶
func (e *SlackEngine) Init(conf engine.Config) error
Init initializes slack engine with Config.
func (*SlackEngine) KeepAlive ¶
func (e *SlackEngine) KeepAlive()
KeepAlive keeps the connection in case of disconnection for long-running process.
func (*SlackEngine) ReactEmoji ¶
func (e *SlackEngine) ReactEmoji(channel, emoji, msgTimestamp string) error
ReactEmoji adds reaction emoji to a message.
func (*SlackEngine) Reply ¶
func (e *SlackEngine) Reply(channel, text string) error
ReplyThread sends a message in the channel.
func (*SlackEngine) ReplyThread ¶
func (e *SlackEngine) ReplyThread(channel, text, threadTimestamp string) error
ReplyThread sends a message in the thread of threadTimestamp.
type SlackLogger ¶
type SlackLogger struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.