Versions in this module Expand all Collapse all v1 v1.0.1 Jan 15, 2024 v1.0.0 Jan 15, 2024 Changes in this version + const EventTypeConnected + const EventTypeConnecting + const EventTypeConnectionError + const EventTypeDisconnect + const EventTypeErrorBadMessage + const EventTypeErrorWriteFailed + const EventTypeEventsAPI + const EventTypeHello + const EventTypeIncomingError + const EventTypeInteractive + const EventTypeInvalidAuth + const EventTypeSlashCommand + const RequestTypeDisconnect + const RequestTypeEventsAPI + const RequestTypeHello + const RequestTypeInteractive + const RequestTypeSlashCommands + func OptionDebug(b bool) func(*Client) + func OptionLog(l logger) func(*Client) + type Client struct + Events chan Event + func New(api *slack.Client, options ...Option) *Client + func (smc *Client) Ack(req Request, payload ...interface{}) + func (smc *Client) AckCtx(ctx context.Context, reqID string, payload interface{}) error + func (smc *Client) Debugf(format string, v ...interface{}) + func (smc *Client) Debugln(v ...interface{}) + func (smc *Client) Open() (info *slack.SocketModeConnection, websocketURL string, err error) + func (smc *Client) OpenContext(ctx context.Context) (info *slack.SocketModeConnection, websocketURL string, err error) + func (smc *Client) Run() error + func (smc *Client) RunContext(ctx context.Context) error + func (smc *Client) Send(res Response) + func (smc *Client) SendCtx(ctx context.Context, res Response) error + type ConnectedEvent struct + ConnectionCount int + Info *slack.SocketModeConnection + type ConnectionInfo struct + AppID string + type DebugInfo struct + ApproximateConnectionTime int + BuildNumber int + Host string + type ErrorBadMessage struct + Cause error + Message json.RawMessage + type ErrorWriteFailed struct + Cause error + Response *Response + type Event struct + Data interface{} + Request *Request + Type EventType + type EventType string + type Option func(client *Client) + func OptionDialer(d *websocket.Dialer) Option + func OptionPingInterval(d time.Duration) Option + type Request struct + AcceptsResponsePayload bool + ConnectionInfo ConnectionInfo + DebugInfo DebugInfo + EnvelopeID string + NumConnections int + Payload json.RawMessage + Reason string + RetryAttempt int + RetryReason string + Type string + type Response struct + EnvelopeID string + Payload interface{} + type SocketModeMessagePayload struct + Event json.RawMessage + type SocketmodeHandler struct + Client *Client + Default SocketmodeHandlerFunc + EventApiMap map[slackevents.EventsAPIType][]SocketmodeHandlerFunc + EventMap map[EventType][]SocketmodeHandlerFunc + InteractionBlockActionEventMap map[string]SocketmodeHandlerFunc + InteractionEventMap map[slack.InteractionType][]SocketmodeHandlerFunc + SlashCommandMap map[string]SocketmodeHandlerFunc + func NewSocketmodeHandler(client *Client) *SocketmodeHandler + func (r *SocketmodeHandler) Handle(et EventType, f SocketmodeHandlerFunc) + func (r *SocketmodeHandler) HandleDefault(f SocketmodeHandlerFunc) + func (r *SocketmodeHandler) HandleEvents(et slackevents.EventsAPIType, f SocketmodeHandlerFunc) + func (r *SocketmodeHandler) HandleInteraction(et slack.InteractionType, f SocketmodeHandlerFunc) + func (r *SocketmodeHandler) HandleInteractionBlockAction(actionID string, f SocketmodeHandlerFunc) + func (r *SocketmodeHandler) HandleSlashCommand(command string, f SocketmodeHandlerFunc) + func (r *SocketmodeHandler) RunEventLoop() error + func (r *SocketmodeHandler) RunEventLoopContext(ctx context.Context) error + type SocketmodeHandlerFunc func(*Event, *Client) + type SocketmodeMiddlewareFunc func(SocketmodeHandlerFunc) SocketmodeHandlerFunc