slackgw

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package slackgw implements the gateway.Adapter for Slack.

Index

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.Adapter for Slack using Socket Mode.

func New

func New(botToken, appToken string) *Adapter

New creates a new Slack adapter using Socket Mode.

func (*Adapter) Channels

func (a *Adapter) Channels(_ context.Context) ([]gateway.ExternalChannel, error)

func (*Adapter) Health

func (a *Adapter) Health(ctx context.Context) error

func (*Adapter) Name

func (a *Adapter) Name() string

func (*Adapter) Send

func (a *Adapter) Send(ctx context.Context, channelID, sender, content string) error

func (*Adapter) SendFile

func (a *Adapter) SendFile(ctx context.Context, channelID, sender, filename string, data []byte, mimeType string) error

SendFile uploads a file to a Slack channel.

func (*Adapter) Start

func (a *Adapter) Start(ctx context.Context, onMessage func(gateway.InboundMessage)) error

func (*Adapter) Status

func (a *Adapter) Status() gateway.AdapterStatus

Status returns the current connection state.

func (*Adapter) Stop

func (a *Adapter) Stop(_ context.Context) error

Jump to

Keyboard shortcuts

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