File: event.go

package info (click to toggle)
golang-github-slack-go-slack 0.11.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 1,720 kB
  • sloc: makefile: 54
file content (30 lines) | stat: -rw-r--r-- 602 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package socketmode

import "encoding/json"

// Event is the event sent to the consumer of Client
type Event struct {
	Type EventType
	Data interface{}

	// Request is the json-decoded raw WebSocket message that is received via the Slack Socket Mode
	// WebSocket connection.
	Request *Request
}

type ErrorBadMessage struct {
	Cause   error
	Message json.RawMessage
}

type ErrorWriteFailed struct {
	Cause    error
	Response *Response
}

type errorRequestedDisconnect struct {
}

func (e errorRequestedDisconnect) Error() string {
	return "disconnection requested: Slack requested us to disconnect"
}