Documentation
¶
Overview ¶
Package slackgw implements the gateway.NotificationAdapter for Slack.
Index ¶
- type Adapter
- func (a *Adapter) Channels() []gateway.ChannelInfo
- func (a *Adapter) HTTPHandler() http.Handler
- func (a *Adapter) Name() string
- func (a *Adapter) Send(ctx context.Context, channelID, sender, content string) error
- func (a *Adapter) SendFile(ctx context.Context, channelID, sender, filename string, data []byte, _ string) error
- func (a *Adapter) Start(ctx context.Context, handler func(gateway.Notification)) error
- func (a *Adapter) Status() gateway.AdapterStatus
- func (a *Adapter) Stop() error
- func (a *Adapter) Type() gateway.AdapterType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
Adapter implements gateway.NotificationAdapter for Slack using Socket Mode. It also supports outbound messaging via Send and SendFile methods.
func (*Adapter) Channels ¶
func (a *Adapter) Channels() []gateway.ChannelInfo
Channels returns discovered channels.
func (*Adapter) HTTPHandler ¶ added in v0.2.1
HTTPHandler returns nil since Slack uses Socket Mode, not webhooks.
func (*Adapter) SendFile ¶
func (a *Adapter) SendFile(ctx context.Context, channelID, sender, filename string, data []byte, _ string) error
SendFile uploads a file to a Slack channel.
func (*Adapter) Status ¶
func (a *Adapter) Status() gateway.AdapterStatus
Status returns the current connection state.
func (*Adapter) Type ¶ added in v0.2.1
func (a *Adapter) Type() gateway.AdapterType
Type returns AdapterSocket since Slack uses WebSocket via Socket Mode.
Click to show internal directories.
Click to hide internal directories.