Documentation ¶
Overview ¶
Package slack is a basic client for the official Slack API used to send messages via a Webhook.
This package is based on https://api.slack.com/messaging/webhooks and provides a simple interface for sending messages to a Slack channel.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the implementation of the service client.
func New ¶
New creates a new instance of the Slack service client. The arguments other than "addr" (Slack Webhook URL) are optional, they can be set in the Webhook configuration or in each individual message.
func (*Client) HealthCheck ¶
HealthCheck performs a status check on this service.
type HTTPClient ¶
HTTPClient contains the function to perform the actual HTTP request.
type Option ¶
type Option func(c *Client)
Option is the interface that allows to set client options.
func WithHTTPClient ¶
func WithHTTPClient(hc HTTPClient) Option
WithHTTPClient overrides the default HTTP client.
func WithPingTimeout ¶
WithPingTimeout overrides the default ping timeout.
func WithPingURL ¶
WithPingURL overrides the default ping timeout.
func WithRetryAttempts ¶
WithRetryAttempts overrides the default HTTP client.
func WithTimeout ¶
WithTimeout overrides the default request timeout.