model

package
v0.0.0-...-0b33e26 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2016 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigPath = "config/config.toml"

ConfigPath is a file path of config.toml

Variables

This section is empty.

Functions

This section is empty.

Types

type Payload

type Payload struct {
	Channel   string `json:"channel"`
	UserName  string `json:"username" toml:"username"`
	Text      string `json:"text"`
	IconEmoji string `json:"icon_emoji"`
	LinkNames int    `json:"link_names"`
}

Payload includes `payload` slack parameters

type Slack

type Slack struct {
	Payload
	URL string
}

Slack has webhook parameters

func NewSlack

func NewSlack() (*Slack, error)

NewSlack returns a initialized Slack struct by config.toml

func (*Slack) Post

func (s *Slack) Post() error

Post submits post request to slack

Jump to

Keyboard shortcuts

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