Documentation ¶
Overview ¶
Package slack provides a generic interface for slack clients and some basic types to enable the creation of slack clients.
See the webhook sub directory for an example of such a client.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { // Send sends the request to slack. Send(url string, message, response interface{}) error }
Client represents a slack client.
type Error ¶
type Error struct { // StatusCode is the status code returned by the request. StatusCode int // Message is the message, if any, returned in the body. Message string }
Error represents an error from the Slack API.
type Response ¶
type Response struct { OK bool `json:"ok"` Error string `json:"error,omitempty"` Warning string `json:"warning,omitempty"` }
Response is a generic response from slack which implements SendResponse.
type SendResponse ¶
SendResponse is the interface that responses implement.
Directories ¶
Path | Synopsis |
---|---|
Package chat implements the types needed to post chat messages to slack.
|
Package chat implements the types needed to post chat messages to slack. |
cmd
|
|
slackit
slackit is a command line golang slack client.
|
slackit is a command line golang slack client. |
Package lrhook provides logrus hook for the Slack.
|
Package lrhook provides logrus hook for the Slack. |
Package test provides a slack client implementation which uses the slack api.test endpoint so is suitable to testing.
|
Package test provides a slack client implementation which uses the slack api.test endpoint so is suitable to testing. |
Package webhook provides a slack webhook client implementation.
|
Package webhook provides a slack webhook client implementation. |
Click to show internal directories.
Click to hide internal directories.