slack

package
v0.0.0-...-97dd600 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2016 License: MIT Imports: 5 Imported by: 0

Documentation

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
}

func NewClient

func NewClient(token string) *Client

func (*Client) SendMessage

func (this *Client) SendMessage(channelID, text string) error

func (*Client) SendMessageWithEmoji

func (this *Client) SendMessageWithEmoji(channelID, text, emoji string) error

func (*Client) SendPostponedMessage

func (this *Client) SendPostponedMessage(responseURL, message string) error

type SlackAttachment

type SlackAttachment struct {
	ImageUrl string `json:"image_url,omitempty"`
	ThumbUrl string `json:"thumb_url,omitempty"`
	Text     string `json:"text,omitempty"`
	Fallback string `json:"fallback,omitempty"`
}

SlackAttachment is a message attachment

type SlackResult

type SlackResult struct {
	Text        string             `json:"text"`
	Username    string             `json:"username,omitempty"`
	IconUrl     string             `json:"icon_url,omitempty"`
	IconEmoji   string             `json:"icon_emoji,omitempty"`
	Channel     string             `json:"channel,omitempty"`
	Attachments []*SlackAttachment `json:"attachments,omitempty"`
}

SlackResult holds the result of processing the command. json encoding is the `payload` message to a slack incoming hook integration.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL