forked from slack-go/slack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
websocket_channels.go
55 lines (47 loc) · 1.48 KB
/
websocket_channels.go
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package slack
type ChannelCreatedEvent struct {
Type string `json:"type"`
Channel ChannelCreatedInfo `json:"channel"`
EventTimestamp JSONTimeString `json:"event_ts"`
}
type ChannelCreatedInfo struct {
Id string `json:"id"`
IsChannel bool `json:"is_channel"`
Name string `json:"name"`
Created int `json:"created"`
Creator string `json:"creator"`
}
type ChannelJoinedEvent struct {
Type string `json:"type"`
Channel Channel `json:"channel"`
}
type ChannelInfoEvent struct {
// channel_left
// channel_deleted
// channel_archive
// channel_unarchive
Type string `json:"type"`
Channel string `json:"channel"`
User string `json:"user,omitempty"`
Timestamp *JSONTimeString `json:"ts,omitempty"`
}
type ChannelRenameEvent struct {
Type string `json:"type"`
Channel ChannelRenameInfo `json:"channel"`
}
type ChannelRenameInfo struct {
ID string `json:"id"`
Name string `json:"name"`
Created JSONTimeString `json:"created"`
}
type ChannelHistoryChangedEvent struct {
Type string `json:"type"`
Latest JSONTimeString `json:"latest"`
Timestamp JSONTimeString `json:"ts"`
EventTimestamp JSONTimeString `json:"event_ts"`
}
type ChannelMarkedEvent ChannelInfoEvent
type ChannelLeftEvent ChannelInfoEvent
type ChannelDeletedEvent ChannelInfoEvent
type ChannelArchiveEvent ChannelInfoEvent
type ChannelUnarchiveEvent ChannelInfoEvent