slack

package
v0.0.0-...-06fd498 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Messager

type Messager struct {
	Config *slack.PostMessageParameters
	// contains filtered or unexported fields
}

Messager contains required information

func NewMessager

func NewMessager(token string, channel string, config *slack.PostMessageParameters) (*Messager, error)

NewMessager creates a new messager for channel messaging.

func (*Messager) PostMessage

func (m *Messager) PostMessage(message string, labels ...string) error

PostMessage send message to the specified channel.

type RateLimitedError

type RateLimitedError struct {
	RetryAfter time.Duration
}

RateLimitedError implements error interface

func (*RateLimitedError) Error

func (e *RateLimitedError) Error() string

type Webhook

type Webhook struct {
	// contains filtered or unexported fields
}

Webhook contains required information

func NewWebhook

func NewWebhook(url string) *Webhook

NewWebhook return a incoming webhook for sending data into Slack in real-time.

func (*Webhook) PostMessage

func (w *Webhook) PostMessage(message string, labels ...string) error

PostMessage send message to the specified channel. This channel is determined when you create a webhook.

Jump to

Keyboard shortcuts

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