Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // BadRequestError represents a JSON response for status 400 BadRequestError = ErrorResponse{"error": "Bad Request"} UnauthorizedError = ErrorResponse{"error": "Unauthorized"} // NotFoundError represents a JSON response for status 404 NotFoundError = ErrorResponse{"error": "Not Found"} // InternalError represents a JSON response for status 500 InternalError = ErrorResponse{"error": "Internal Server Error"} )
Functions ¶
This section is empty.
Types ¶
type ErrorResponse ¶
ErrorResponse represents a JSON response to be returned in failure cases
func CustomError ¶
func CustomError(message string) ErrorResponse
CustomError creates an ErrorResponse with a custom message
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server provides an HTTP interface to manipulate Playbooks and Instances
func New ¶
New instantiates a new Server and binds its handlers. The Server will look for playbooks and instances in store `s`
type SlackCommand ¶
type SlackCommand struct {
Token string `form:"token"`
TeamID string `form:"team_id"`
TeamDomain string `form:"team_domain"`
ChannelID string `form:"channel_id"`
ChannelName string `form:"channel_name"`
UserID string `form:"user_id"`
UserName string `form:"user_name"`
Command string `form:"command"`
Text string `form:"text"`
ResponseURL string `form:"response_url"`
}
SlackCommand represents the unmarshalled JSON post data from Slack
Click to show internal directories.
Click to hide internal directories.