Documentation
¶
Index ¶
- type Attachment
- type Field
- type SlackMessage
- type SlackPlugin
- func (p *SlackPlugin) OnLoad(ctx *plugins.PluginContext) error
- func (p *SlackPlugin) OnSessionCreated(ctx *plugins.PluginContext, session interface{}) error
- func (p *SlackPlugin) OnSessionHibernated(ctx *plugins.PluginContext, session interface{}) error
- func (p *SlackPlugin) OnUnload(ctx *plugins.PluginContext) error
- func (p *SlackPlugin) OnUserCreated(ctx *plugins.PluginContext, user interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
type Attachment struct {
Color string `json:"color,omitempty"`
Title string `json:"title,omitempty"`
Text string `json:"text,omitempty"`
Fields []Field `json:"fields,omitempty"`
Timestamp int64 `json:"ts,omitempty"`
}
Attachment represents a Slack message attachment
type Field ¶
type Field struct {
Title string `json:"title"`
Value string `json:"value"`
Short bool `json:"short"`
}
Field represents a field in a Slack attachment
type SlackMessage ¶
type SlackMessage struct {
Text string `json:"text,omitempty"`
Channel string `json:"channel,omitempty"`
Username string `json:"username,omitempty"`
IconEmoji string `json:"icon_emoji,omitempty"`
Attachments []Attachment `json:"attachments,omitempty"`
}
SlackMessage represents a Slack message payload
type SlackPlugin ¶
type SlackPlugin struct {
plugins.BasePlugin
// contains filtered or unexported fields
}
SlackPlugin implements Slack notification integration
func NewSlackPlugin ¶
func NewSlackPlugin() *SlackPlugin
NewSlackPlugin creates a new Slack plugin instance
func (*SlackPlugin) OnLoad ¶
func (p *SlackPlugin) OnLoad(ctx *plugins.PluginContext) error
OnLoad is called when the plugin is loaded
func (*SlackPlugin) OnSessionCreated ¶
func (p *SlackPlugin) OnSessionCreated(ctx *plugins.PluginContext, session interface{}) error
OnSessionCreated is called when a session is created
func (*SlackPlugin) OnSessionHibernated ¶
func (p *SlackPlugin) OnSessionHibernated(ctx *plugins.PluginContext, session interface{}) error
OnSessionHibernated is called when a session is hibernated
func (*SlackPlugin) OnUnload ¶
func (p *SlackPlugin) OnUnload(ctx *plugins.PluginContext) error
OnUnload is called when the plugin is unloaded
func (*SlackPlugin) OnUserCreated ¶
func (p *SlackPlugin) OnUserCreated(ctx *plugins.PluginContext, user interface{}) error
OnUserCreated is called when a user is created
Click to show internal directories.
Click to hide internal directories.