slack

package
v0.92.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2026 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Overview

Package slack implements the Slack platform integration.

Index

Constants

View Source
const ID = "slack"

Variables

This section is empty.

Functions

func NewDriver

func NewDriver(_ *config.Type, _ store.Adapter) protocol.Driver

Types

type Action

type Action struct {
	// contains filtered or unexported fields
}

func (*Action) CreateChannel

func (*Action) CreateChannel(_ protocol.Request) protocol.Response

func (*Action) DeleteMessage added in v0.92.0

func (a *Action) DeleteMessage(req protocol.Request) protocol.Response

DeleteMessage deletes an existing message.

func (*Action) GetChannelInfo

func (*Action) GetChannelInfo(_ protocol.Request) protocol.Response

func (*Action) GetChannelList

func (*Action) GetChannelList(_ protocol.Request) protocol.Response

func (*Action) GetLatestEvents

func (*Action) GetLatestEvents(_ protocol.Request) protocol.Response

func (*Action) GetStatus

func (*Action) GetStatus(_ protocol.Request) protocol.Response

func (*Action) GetSupportedActions

func (*Action) GetSupportedActions(_ protocol.Request) protocol.Response

func (*Action) GetUserInfo

func (*Action) GetUserInfo(_ protocol.Request) protocol.Response

func (*Action) GetVersion

func (*Action) GetVersion(_ protocol.Request) protocol.Response

func (*Action) RegisterChannels

func (*Action) RegisterChannels(_ protocol.Request) protocol.Response

func (*Action) RegisterSlashCommands

func (*Action) RegisterSlashCommands(_ protocol.Request) protocol.Response

func (*Action) SendMessage

func (a *Action) SendMessage(req protocol.Request) protocol.Response

func (*Action) SendStatusMessage added in v0.92.0

func (a *Action) SendStatusMessage(channel, statusText string) (string, error)

SendStatusMessage posts a temporary status/thinking indicator and returns the message timestamp so it can later be updated with the final result.

func (*Action) UpdateMessage added in v0.92.0

func (a *Action) UpdateMessage(req protocol.Request) protocol.Response

UpdateMessage updates an existing message (e.g. replace a "thinking…" indicator with the final result).

type ActionCardDef added in v0.92.0

type ActionCardDef struct {
	Title       string
	Description string
	Fields      map[string]string // key-value fields displayed in the card
	ImageURL    string            // optional thumbnail
	Buttons     []ButtonDef
	Footer      string
}

ActionCardDef describes a rich action card.

type Adapter

type Adapter struct{}

func (*Adapter) EventConvert

func (*Adapter) EventConvert(data any) protocol.Event

func (*Adapter) MessageConvert

func (*Adapter) MessageConvert(data any) protocol.Message

type ButtonDef added in v0.92.0

type ButtonDef struct {
	Text     string
	ActionID string
	Value    string
	Style    slack.Style // slack.StylePrimary or slack.StyleDanger
	URL      string
	Confirm  *slack.ConfirmationBlockObject
}

ButtonDef describes a button for actionButtons.

type Driver

type Driver struct {
	// contains filtered or unexported fields
}

func (*Driver) HttpServer

func (*Driver) HttpServer(_ fiber.Ctx) error

func (*Driver) HttpWebhookClient

func (*Driver) HttpWebhookClient(_ protocol.Message) error

func (*Driver) Shutdown added in v0.92.0

func (d *Driver) Shutdown() error

func (*Driver) WebSocketClient

func (d *Driver) WebSocketClient()

func (*Driver) WebSocketServer

func (*Driver) WebSocketServer()

type FormFieldDef added in v0.92.0

type FormFieldDef struct {
	Label       string
	Key         string
	Type        string
	Placeholder string
	Options     []string
	Optional    bool
	InitialVal  string
}

FormFieldDef describes a field in a form segment.

Jump to

Keyboard shortcuts

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