Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClientOptions ¶
type ClientOptions struct { // Debug will print extra debug log messages. Debug bool // Webhook contains the options for the slack webhook. Webhook WebhookOptions }
ClientOptions are the configurable options of the slack client.
type WebhookOptions ¶
type WebhookOptions struct { // Enabled will start the webhook endpoint if true. Enabled bool // Addr is the address on which the webhook will be run. Required // if EnableWebhook is true. Addr string // UseHTTPS will use HTTPS instead of HTTP to serve the webhook. // Note that using HTTPS is required by slack for receiving webhooks. UseHTTPS bool // CertFile is the path to the SSL certificate. If UseHTTPS is true it is required. CertFile string // KeyFile is the path to the SSL key. If UseHTTPS is true it is required. KeyFile string }
WebhookOptions are the configurable options of the slack webhook.
type WebhookService ¶
type WebhookService struct {
// contains filtered or unexported fields
}
WebhookService is a service to handle slack interactive messages callbacks.
func NewWebhookService ¶
func NewWebhookService(token string) *WebhookService
NewWebhookService returns a new WebhookService with the given token.
func (*WebhookService) Consume ¶
func (s *WebhookService) Consume() <-chan slack.AttachmentActionCallback
Consume returns a channel where callbacks will be sent.
func (*WebhookService) ServeHTTP ¶
func (s *WebhookService) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP is the actual HTTP handler of the service.
Click to show internal directories.
Click to hide internal directories.