Discover Packages
github.com/multiplay/go-slack
webhook
package
Version:
v0.0.0-...-0762aee
Opens a new window with list of versions in this module.
Published: Apr 28, 2022
License: BSD-2-Clause
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 22
Opens a new window with list of known importers.
Documentation
Documentation
¶
type Client struct {
URL string
}
Client is a slack webhook client for posting messages using a webhook URL.
New returns a new Client which sends request using the webhook URL.
c := New("https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX")
m := &chat.Message{Text: "test message"}
m.Send(c)
Output:
Send sends the request to slack using the webhook protocol.
The url parameter only exists to satisfy the slack.Client interface
and is not used by the webhook Client.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.