utils

package
v0.0.0-...-f308c85 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2016 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StructPrettyPrint

func StructPrettyPrint(s interface{}) string

StructPrettyPrint - JSON like

Types

type GlobalChannels

type GlobalChannels struct {
	Channels []slack.Channel
	Groups   []slack.Group
	IMs      []slack.IM
	// contains filtered or unexported fields
}

GlobalChannels - indexed channel space

func (*GlobalChannels) GetChannels

func (g *GlobalChannels) GetChannels(api *slack.Client)

GetChannels - get all channels to local variable from Slack

func (*GlobalChannels) IDToName

func (g *GlobalChannels) IDToName(id string) string

IDToName - translate Slack ID to Slack name (without @)

func (*GlobalChannels) NameToID

func (g *GlobalChannels) NameToID(name string) string

NameToID - translate Slack name (without @) to Slack ID

type GlobalUsers

type GlobalUsers struct {
	Users []slack.User
	// contains filtered or unexported fields
}

GlobalUsers - indexed user space

func (*GlobalUsers) GetPresenceByID

func (g *GlobalUsers) GetPresenceByID(id string) string

GetPresenceByID - get user presence from local variable (not from Slack)

func (*GlobalUsers) GetPresenceByName

func (g *GlobalUsers) GetPresenceByName(name string) string

GetPresenceByName - get user presence from local variable (not from Slack)

func (*GlobalUsers) GetUsers

func (g *GlobalUsers) GetUsers(api *slack.Client)

GetUsers - get all users to local variable from Slack

func (*GlobalUsers) IDToName

func (g *GlobalUsers) IDToName(id string) string

IDToName - translate Slack ID to Slack name (without @)

func (*GlobalUsers) NameToID

func (g *GlobalUsers) NameToID(name string) string

NameToID - translate Slack name (without @) to Slack ID

func (*GlobalUsers) SetPresenceByID

func (g *GlobalUsers) SetPresenceByID(id string, presence string)

SetPresenceByID - set user presence in local variable (not in Slack)

Jump to

Keyboard shortcuts

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