Documentation ¶
Index ¶
- type Attachment
- type Client
- func (c *Client) Send(n *Notification) error
- func (c *Client) SendError(format string, args ...interface{}) error
- func (c *Client) SendInfo(format string, args ...interface{}) error
- func (c *Client) SendSuccess(format string, args ...interface{}) error
- func (c *Client) SendWarning(format string, args ...interface{}) error
- type Field
- type Notification
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
type Client ¶
type Client struct { WebhookURL string `json:"webhook_url,omitempty"` DefaultChannel string `json:"channel,omitempty"` DefaultUsername string `json:"username,omitempty"` DefaultEmoji string `json:"emoji,omitempty"` }
func (*Client) Send ¶
func (c *Client) Send(n *Notification) error
func (*Client) SendSuccess ¶
func (*Client) SendWarning ¶
type Notification ¶
type Notification struct { Text string `json:"text"` Channel string `json:"channel,omitempty"` Username string `json:"username,omitempty"` Emoji string `json:"icon_emoji,omitempty"` Attachments []Attachment `json:"attachments,omitempty"` }
Click to show internal directories.
Click to hide internal directories.