/
resulttypes.go
133 lines (113 loc) · 3.11 KB
/
resulttypes.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
package tension
// APIResult is the common field set for all API result types.
type APIResult struct {
Ok bool `json:"ok"`
ErrorMsg string `json:"error"`
}
// APITestResult contains a delightful affirmation of your competence.
type APITestResult struct {
APIResult
}
// AuthTestResult includes the response to an AuthTest API call.
type AuthTestResult struct {
APIResult
URL string
Team string
Name string `json:"user"`
Team_Id string
User_Id UserId
}
// AuthRevokeResult includes the response to an AuthRevoke API call. Note that
// `Revoked` is useful to distinguish whether the API was called in "test mode"
type AuthRevokeResult struct {
APIResult
Revoked bool
}
// BotsInfoResult contains the response to a BotsInfo request.
type BotsInfoResult struct {
APIResult
Bot BotInfo
}
// ChannelListResult contains the response to a ChannelList request.
type ChannelListResult struct {
APIResult
Channels []ChannelSummary
}
// ChannelInfoResult contains the response to a ChannelInfo request.
type ChannelInfoResult struct {
APIResult
Channel ChannelFull
}
// ChannelArchiveResult contains the response to a ChannelArchive request.
type ChannelArchiveResult struct {
APIResult
}
// ChannelCreateResult contains the response to a ChannelCreate request.
type ChannelCreateResult struct {
APIResult
Channel ChannelFull
}
// ChannelHistoryResult contains the response to a ChannelHistory request.
type ChannelHistoryResult struct {
APIResult
Latest SlackTime
Messages []Message
Has_More bool
Is_Limited bool
}
// ChannelInviteResult contains the response to a ChannelInvite request.
type ChannelInviteResult struct {
APIResult
Channel ChannelFull
}
// ChannelJoinResult contains the response to a ChannelJoin request.
type ChannelJoinResult struct {
APIResult
Already_In_Channel bool
Channel ChannelFull
}
// ChannelKickResult contains the response to a ChannelKick request.
type ChannelKickResult struct {
APIResult
}
// ChannelLeaveResult contains the response to a ChannelLeave request.
type ChannelLeaveResult struct {
APIResult
Not_In_Channel bool
}
// ChannelMarkResult contains the response to a ChannelMark request.
type ChannelMarkResult struct {
APIResult
}
// ChannelRenameResult contains the response to a ChannelRename request.
type ChannelRenameResult struct {
APIResult
Channel ChannelMinimal
}
// ChannelSetPurposeResult contains the response to a ChannelSetPurpose request.
type ChannelSetPurposeResult struct {
APIResult
Purpose string
}
// ChannelSetTopicResult contains the response to a ChannelSetTopic request.
type ChannelSetTopicResult struct {
APIResult
Topic string
}
// ChannelUnarchiveResult contains the response to a ChannelUnarchive request.
type ChannelUnarchiveResult struct {
APIResult
}
// RTMStartResult contains the response to a RTMStart request, and a bunch of
// details about the Slack you're about to start receiving streaming events for.
type RTMStartResult struct {
APIResult
URL string
Self UserBrief
Team TeamSummary
Users []UserSummary
Channels []ChannelSummary
Groups []GroupFull
MPIMs []MPIMFull
IMs []IMFull
}