slack

package
v0.0.0-...-720374e Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

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

func (*Event) Data

func (e *Event) Data() interface{}

func (*Event) Name

func (e *Event) Name() EventName

type EventName

type EventName string

type Message

type Message interface {
	Text() string
	Channel() string
	User() User
}

func EventToMessage

func EventToMessage(event Event) (Message, error)

func NewMessage

func NewMessage(text, channel string, user User) Message

type Slack

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

func New

func New(token string) *Slack

func (*Slack) Listen

func (s *Slack) Listen() chan Event

func (*Slack) Send

func (s *Slack) Send(msg Message)

func (*Slack) UserInfo

func (s *Slack) UserInfo() (*UserInfo, error)

type User

type User interface {
	ID() string
	Name() string
}

func NewUser

func NewUser(id, name string) User

type UserInfo

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

func (UserInfo) ID

func (u UserInfo) ID() string

func (UserInfo) Name

func (u UserInfo) Name() string

Jump to

Keyboard shortcuts

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