Documentation ¶
Index ¶
- Constants
- func GetAuthor(user *slack.User) (realName string)
- func NewPool() *redis.Pool
- func PostEntryToWhiteboard(restClient RestClient, entryType EntryType) (itemId string, ok bool)
- type RealRestClient
- type RealStore
- type RestClient
- type Slack
- func (slackClient *Slack) GetChannelDetails(channel string) *slack.Channel
- func (slackClient *Slack) GetUserDetails(user string) (slackUser SlackUser)
- func (slackClient *Slack) PostEntry(entry *model.Entry, channel string, status string)
- func (slackClient *Slack) PostMessage(message string, channel string, status string)
- func (slackClient *Slack) PostMessageWithMarkdown(message string, channel string, status string)
- type SlackClient
- type SlackUser
- type Store
- type WhiteboardApp
Constants ¶
View Source
const ( THUMBS_UP = ":+1:\n" THUMBS_DOWN = ":-1:\n" USAGE = "*Usage*:\n" + " `wb [command] [text...]`\n" + " where commands include:\n" + "*Registration Command*\n" + " `register`, `r` - followed by <standup_id>, registers current channel to Whiteboard's standup id\n" + "\n" + "*Presentation Command*\n" + " `present`, `p` - presents today's standup. Follow with number of days to limit the entries shown by date (i.e. `wb p 2` will only return entries for the next 2 days)\n" + "\n" + "*Create Commands*\n" + " `faces`, `f` - followed by a title, creates a new faces entry\n" + " `interestings`, `i` - followed by a title, creates a new interestings entry\n" + " `helps`, `h` - followed by a title, creates a new helps entry\n" + " `events`, `e` - followed by a title, creates a new events entry\n" + "\n" + "*Detail Commands* (updates details of a started entry)\n" + " `title`, `t`, `name`, `n` - updates a name/title detail to a started entry\n" + " `body`, `b` - updates a body detail to a started entry\n" + " `date`, `d` - updates a date detail to a started entry (YYYY-MM-DD)\n" + "\n" + "Example:\n" + " `wb f New Face!` - will create a new face with the name 'New Face!'\n" + " `wb d 2015-01-02` - will update the new face date to 02 Jan 2015" )
Variables ¶
This section is empty.
Functions ¶
func PostEntryToWhiteboard ¶
func PostEntryToWhiteboard(restClient RestClient, entryType EntryType) (itemId string, ok bool)
Types ¶
type RealRestClient ¶
type RealRestClient struct{}
func (RealRestClient) GetStandup ¶
func (RealRestClient) GetStandup(standupId string) (standup Standup, ok bool)
func (RealRestClient) GetStandupItems ¶
func (RealRestClient) GetStandupItems(standupId int) (items StandupItems, ok bool)
func (RealRestClient) Post ¶
func (RealRestClient) Post(request WhiteboardRequest) (itemId string, ok bool)
type RestClient ¶
type Slack ¶
func (*Slack) GetChannelDetails ¶
func (*Slack) GetUserDetails ¶
func (*Slack) PostMessage ¶
type SlackClient ¶
type SlackClient interface { PostMessage(message string, channel string, status string) PostMessageWithMarkdown(message string, channel string, status string) PostEntry(entry *model.Entry, channel string, status string) GetUserDetails(user string) (slackUser SlackUser) GetChannelDetails(channel string) (slackChannel *slack.Channel) }
type WhiteboardApp ¶
type WhiteboardApp struct { SlackClient SlackClient RestClient RestClient Clock Clock Store Store EntryMap map[string]EntryType CommandMap map[string]func(input string, ev *slack.MessageEvent) }
func NewWhiteboard ¶
func NewWhiteboard(slackClient SlackClient, restClient RestClient, clock Clock, store Store) (whiteboard WhiteboardApp)
func (WhiteboardApp) FilterOutOld ¶
func (whiteboard WhiteboardApp) FilterOutOld(entries []Entry, numDays int, userTimeZone string) []Entry
func (WhiteboardApp) ParseMessageEvent ¶
func (whiteboard WhiteboardApp) ParseMessageEvent(ev *slack.MessageEvent)
Click to show internal directories.
Click to hide internal directories.