Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIResp ¶
type APIResp struct { Ok bool `json:"ok"` Self Self `json:"self"` Error string `json:"error"` Users []User `json:"users"` Channels []Channel `json:"channels"` URL string `json:"url"` }
APIResp represents the API response of rtm.start See https://api.slack.com/methods/rtm.start
type Client ¶
func (*Client) HandleFunc ¶
func (sc *Client) HandleFunc(msgType string, hf HandlerFunc)
type Event ¶
type Event struct { ID int64 `json:"id"` // Every event should have a unique (for that connection) positive integer ID. Error *Error `json:"error,omitempty"` Type string `json:"type"` ChannelID string `json:"channel"` Channelname string `json:"-"` UserID string `json:"user,omitempty"` Username string `json:"-"` Text string `json:"text,omitempty"` Presence string `json:"presence,omitempty"` //active, away SubType string `json:"subtype,omitempty"` Team string `json:"team,omitempty"` Ts string `json:"ts,omitempty"` }
type FileApiResp ¶
type FileEvent ¶
UserEvent carries a UserProfile instead of a UserID under the `user` key (in contrast to Event)
type HandlerFunc ¶
type User ¶
type User struct { ID string `json:"id"` Name string `json:"name"` RealName string `json:"real_name,omitempty"` Profile Profile `json:"profile"` Deleted bool `json:"deleted"` IsBot bool `json:"is_bot"` IsAdmin bool `json:"is_admin"` Presence string `json:"presence"` //active, away LastSeen time.Time `json:"-"` }
type UserEvent ¶
type UserEvent struct { ID int64 `json:"id"` // Every event should have a unique (for that connection) positive integer ID. Error *Error `json:"error,omitempty"` Type string `json:"type"` ChannelID string `json:"channel,omitempty"` Channelname string `json:"-"` User *User `json:"user,omitempty"` Text string `json:"text,omitempty"` Ts string `json:"ts,omitempty"` }
UserEvent carries a UserProfile instead of a UserID under the `user` key (in contrast to Event)
Click to show internal directories.
Click to hide internal directories.