slack

package
v0.0.0-...-2ff72c0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	ErrorCode string `json:"error"`
}

func (*APIError) Error

func (e *APIError) Error() string

type Attachment

type Attachment struct {
	Title      string            `json:"title"`
	TitleLink  string            `json:"title_link"`
	Text       string            `json:"text"`
	Fallback   string            `json:"fallback"`
	Color      string            `json:"color"`
	Pretext    string            `json:"pretext"`
	AuthorName string            `json:"author_name"`
	AuthorLink string            `json:"author_link"`
	Fields     []AttachmentField `json:"fields"`
}

type AttachmentField

type AttachmentField struct {
	Title string `json:"title"`
	Value string `json:"value"`
	Short bool   `json:"short"`
}

type HTTPError

type HTTPError struct {
	StatusCode int
	Status     string
	Body       string
}

func NewHTTPError

func NewHTTPError(resp *http.Response) *HTTPError

func (*HTTPError) Error

func (e *HTTPError) Error() string

type Response

type Response struct {
	OK bool `json:"ok"`
}

type Slack

type Slack struct {
	Token string
}

func (*Slack) CallAPI

func (s *Slack) CallAPI(method string, arguments map[string]string) (*http.Response, error)

func (*Slack) PostMessage

func (s *Slack) PostMessage(channel, username, text string, attachments []Attachment) error

type User

type User struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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