Codebase list golang-github-nlopes-slack / a2fe65a
A Pointer Allows The Roundtrip To Omit A Field Joe Fitzgerald 8 years ago
6 changed file(s) with 20 addition(s) and 20 deletion(s). Raw diff Collapse all Expand all
4545 Purpose ChannelPurpose `json:"purpose"`
4646 IsMember bool `json:"is_member"`
4747 LastRead string `json:"last_read,omitempty"`
48 Latest Message `json:"latest,omitempty"`
48 Latest *Message `json:"latest,omitempty"`
4949 UnreadCount int `json:"unread_count,omitempty"`
5050 NumMembers int `json:"num_members,omitempty"`
5151 UnreadCountDisplay int `json:"unread_count_display,omitempty"`
1919 Topic ChannelTopic `json:"topic"`
2020 Purpose ChannelPurpose `json:"purpose"`
2121 LastRead string `json:"last_read,omitempty"`
22 Latest Message `json:"latest,omitempty"`
22 Latest *Message `json:"latest,omitempty"`
2323 UnreadCount int `json:"unread_count,omitempty"`
2424 NumMembers int `json:"num_members,omitempty"`
2525 UnreadCountDisplay int `json:"unread_count_display,omitempty"`
144144 // Info contains various details about Users, Channels, Bots and the authenticated user
145145 // It is returned by StartRTM
146146 type Info struct {
147 Url string `json:"url,omitempty"`
148 User UserDetails `json:"self,omitempty"`
149 Team Team `json:"team,omitempty"`
150 Users []User `json:"users,omitempty"`
151 Channels []Channel `json:"channels,omitempty"`
152 Groups []Group `json:"groups,omitempty"`
153 Bots []Bot `json:"bots,omitempty"`
154 IMs []IM `json:"ims,omitempty"`
147 Url string `json:"url,omitempty"`
148 User *UserDetails `json:"self,omitempty"`
149 Team *Team `json:"team,omitempty"`
150 Users []User `json:"users,omitempty"`
151 Channels []Channel `json:"channels,omitempty"`
152 Groups []Group `json:"groups,omitempty"`
153 Bots []Bot `json:"bots,omitempty"`
154 IMs []IM `json:"ims,omitempty"`
155155 }
156156
157157 type infoResponseFull struct {
99 // Message is an auxiliary type to allow us to have a message containing sub messages
1010 type Message struct {
1111 Msg
12 SubMessage Msg `json:"message,omitempty"`
12 SubMessage *Msg `json:"message,omitempty"`
1313 }
1414
1515 // Msg contains information about a slack message
2222 Timestamp string `json:"ts,omitempty"`
2323 Text string `json:"text,omitempty"`
2424 Team string `json:"team,omitempty"`
25 File File `json:"file,omitempty"`
25 File *File `json:"file,omitempty"`
2626 // Type may come if it's part of a message list
2727 // e.g.: channel.history
2828 Type string `json:"type,omitempty"`
2323 // channel_deleted
2424 // channel_archive
2525 // channel_unarchive
26 Type string `json:"type"`
27 ChannelId string `json:"channel"`
28 UserId string `json:"user,omitempty"`
29 Timestamp JSONTimeString `json:"ts,omitempty"`
26 Type string `json:"type"`
27 ChannelId string `json:"channel"`
28 UserId string `json:"user,omitempty"`
29 Timestamp *JSONTimeString `json:"ts,omitempty"`
3030 }
3131
3232 type ChannelRenameEvent struct {
11
22 type TeamJoinEvent struct {
33 Type string `json:"type"`
4 User User `json:"user,omitempty"`
4 User *User `json:"user,omitempty"`
55 }
66
77 type TeamRenameEvent struct {
8 Type string `json:"type"`
9 Name string `json:"name,omitempty"`
10 EventTimestamp JSONTimeString `json:"event_ts,omitempty"`
8 Type string `json:"type"`
9 Name string `json:"name,omitempty"`
10 EventTimestamp *JSONTimeString `json:"event_ts,omitempty"`
1111 }
1212
1313 type TeamPrefChangeEvent struct {