slacksm

package
v0.11.0-rc.6 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

Package slacksm provides the Slack SocketMode implementation of the communication interface.

Index

Constants

View Source
const CommunicationType = "slacksm"

CommunicationType defines a workspace type.

Variables

This section is empty.

Functions

This section is empty.

Types

type Assistant

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

Assistant provides a service for interaction with a communication channel.

func NewAssistant

func NewAssistant(cfg *config.Credentials, appCfg *config.Config, pack *features.Pack,
	platformClient *platform.Client, sessionStorage storage.SessionStorage) *Assistant

NewAssistant returns a new assistant service.

func (*Assistant) AddChannel

func (a *Assistant) AddChannel(channelID string, dbLabInstance *dblab.Instance)

AddChannel sets a message processor for a specific channel.

func (*Assistant) CheckIdleSessions

func (a *Assistant) CheckIdleSessions(ctx context.Context)

CheckIdleSessions check the running user sessions for idleness.

func (*Assistant) Deregister

func (a *Assistant) Deregister(_ context.Context) error

Deregister deregisters the assistant service.

func (*Assistant) DumpSessions

func (a *Assistant) DumpSessions()

DumpSessions collects user's data from every message processor to sessionStorage.

func (*Assistant) Init

func (a *Assistant) Init() error

Init initializes assistant handlers.

func (*Assistant) Register

func (a *Assistant) Register(ctx context.Context) error

Register registers the assistant service.

func (*Assistant) RestoreSessions

func (a *Assistant) RestoreSessions(ctx context.Context) error

RestoreSessions checks sessions after restart and establishes DB connection.

type Config

type Config struct {
	AccessToken   string
	AppLevelToken string
}

Config defines a slack configuration parameters.

Jump to

Keyboard shortcuts

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