File size: 1,064 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
package mockslack

// API allows making calls to implemented Slack API methods.
//
// API methods implement permission/scope checking.
type API state

// API returns an API instance.
func (st *state) API() *API { return (*API)(st) }

// Channel represents a Slack channel or group.
type Channel struct {
	ID   string `json:"id"`
	Name string `json:"name"`

	IsChannel  bool `json:"is_channel"`
	IsGroup    bool `json:"is_group"`
	IsArchived bool `json:"is_archived"`
}

// Message represents a Slack message.
type Message struct {
	TS        string `json:"ts"`
	ThreadTS  string `json:"thread_ts"`
	UpdateTS  string `json:"update_ts"`
	Text      string `json:"text"`
	User      string `json:"user"`
	Broadcast bool   `json:"reply_broadcast"`
	Color     string `json:"color"`

	ChannelID string
	ToUserID  string

	Actions []Action
}

// UserGroup represents a Slack user group.
type UserGroup struct {
	ID     string `json:"id"`
	Name   string `json:"name"`
	Handle string `json:"handle"`

	IsUserGroup bool `json:"is_usergroup"`

	Users []string `json:"users"`
}