slack

package
v0.0.0-...-972cdf1 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2015 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 Payload

type Payload struct {
	Channel string `json:"channel"`
	Message string `json:"text"`
}

type Slack

type Slack struct {
	// Slack URL endpoint
	SlackPushURL string

	// Template for push notification
	NotificationTmpl *tmpl.Template

	// Channel to push
	Channel string
}

func NewSlack

func NewSlack(url, channel string, gen *tmpl.Template) *Slack

func (*Slack) Funcs

func (s *Slack) Funcs(fm tmpl.FuncMap) *tmpl.Template

func (*Slack) Push

func (s *Slack) Push(c ctx.Context, data interface{}) error

func (*Slack) PushData

func (s *Slack) PushData(c ctx.Context, data Payload) error

func (*Slack) Template

func (s *Slack) Template() *tmpl.Template

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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