Documentation
¶
Index ¶
Constants ¶
View Source
const ServiceType = "slackapi"
ServiceType of the Slack API service
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct { types.DefaultService // The URL which should be given to an outgoing slack webhook - Populated by Go-NEB after Service registration. WebhookURL string `json:"webhook_url"` RoomID id.RoomID `json:"room_id"` MessageType event.MessageType `json:"message_type"` // contains filtered or unexported fields }
Service contains the Config fields for the Slack API service.
This service will send HTML formatted messages into a room when an outgoing slack webhook hits WebhookURL.
Example JSON request:
{ "room_id": "!someroomid:some.domain.com", "message_type": "m.text" }
func (*Service) OnReceiveWebhook ¶
func (s *Service) OnReceiveWebhook(w http.ResponseWriter, req *http.Request, cli types.MatrixClient)
OnReceiveWebhook receives requests from a slack outgoing webhook and possibly sends requests to Matrix as a result.
This requires that the WebhookURL is given to an outgoing slack webhook (see https://api.slack.com/outgoing-webhooks)
Click to show internal directories.
Click to hide internal directories.