slack

package
v0.0.0-...-b2d74e5 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GROUP_NAME          = "global"
	TYPE_NAME           = "notifier"
	MODULE_NAME         = "slack"
	SlackHookSite       = "https://hooks.slack.com/services"
	HeaderContentType   = "Content-Type"
	MIMEApplicationJSON = "application/json"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Hook           string
	MessageSuccess string
	MessageFail    string
	Success        bool
}

func (*Config) NotifySlackChannel

func (c *Config) NotifySlackChannel() error

type GlobalNotifierSlack

type GlobalNotifierSlack struct {
	core.Module
	// contains filtered or unexported fields
}

func (*GlobalNotifierSlack) Close

func (m *GlobalNotifierSlack) Close() error

func (*GlobalNotifierSlack) GetConfig

func (m *GlobalNotifierSlack) GetConfig() interface{}

func (*GlobalNotifierSlack) GetGroup

func (m *GlobalNotifierSlack) GetGroup() core.ModuleGroup

func (*GlobalNotifierSlack) GetName

func (m *GlobalNotifierSlack) GetName() string

func (*GlobalNotifierSlack) GetType

func (m *GlobalNotifierSlack) GetType() core.ModuleType

func (*GlobalNotifierSlack) InitModule

func (m *GlobalNotifierSlack) InitModule(_cfg interface{}) error

func (*GlobalNotifierSlack) InitPipe

func (m *GlobalNotifierSlack) InitPipe(w io.Writer, r io.Reader) error

func (*GlobalNotifierSlack) Run

type SlackMessage

type SlackMessage struct {
	Text string `json:"text"`
}

Jump to

Keyboard shortcuts

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