slack

package
v0.0.0-...-ebaec96 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitSlackLog

func InitSlackLog()

InitSlackLog inits slack log

Types

type SlackBot

type SlackBot struct {
	Client *slack.Client
}

SlackBot defines a slack client

func NewSlackBot

func NewSlackBot(token string) SlackBot

NewSlackBot returns new slackbot with token

func (SlackBot) EnableDebug

func (bot SlackBot) EnableDebug()

EnableDebug enables debug log

func (SlackBot) GetUserId

func (bot SlackBot) GetUserId(userName string) (string, error)

GetUserId returns userid by username

func (SlackBot) GetUserName

func (bot SlackBot) GetUserName(userId string) string

GetUserName returns username by userid

func (SlackBot) RunSlackRTMServer

func (bot SlackBot) RunSlackRTMServer(kubeconfig string)

RunSlackRTMServer runs rtm server

func (SlackBot) SendMessage

func (bot SlackBot) SendMessage(userNames []string, message string)

SendMessage sends message to users

func (SlackBot) SendMessages

func (bot SlackBot) SendMessages(userName string, message []string)

SendMessages sends messages to a user

Jump to

Keyboard shortcuts

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