Documentation
¶
Index ¶
Constants ¶
View Source
const ( DisplayName = "Slack" HandlerKey = "slack" MessageDirection = "in" )
Variables ¶
This section is empty.
Functions ¶
func BuildInboundMessageBytes ¶
func BuildInboundMessageBytes(ctx *fasthttp.RequestCtx) []byte
Types ¶
type Handler ¶
type Handler struct {
Config config.Configuration
Adapter adapters.Adapter
}
FastHttp request handler constructor for Slack inbound webhook
func NewHandler ¶
func NewHandler(config config.Configuration, adapter adapters.Adapter) Handler
FastHttp request handler constructor for Slack in bound webhook
func (Handler) HandleFastHTTP ¶
func (h Handler) HandleFastHTTP(ctx *fasthttp.RequestCtx)
HandleFastHTTP is the method to respond to a fasthttp request.
func (Handler) HandlerKey ¶
func (Handler) MessageDirection ¶
type SlackWebhookMessage ¶
type SlackWebhookMessage struct {
Username string `json:"username"`
IconEmoji string `json:"icon_emoji"`
IconURL string `json:"icon_url"`
Text string `json:"text"`
}
func SlackWebhookMessageFromBytes ¶
func SlackWebhookMessageFromBytes(bytes []byte) (SlackWebhookMessage, error)
Click to show internal directories.
Click to hide internal directories.