notable

package module
v0.0.0-...-85b1f09 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2016 License: MIT Imports: 14 Imported by: 0

README

Harvest Notable

A simple Slack interface to disseminate small but important bits of information to the team.

Example usage

> /notable Chad found Cade's coat!
# Got it!

> /notable The soup, the soup. The soup! #big
# Got it!

Development

You'll need to have a working Go environment (including $GOPATH and the proper directory structure). It also uses Redis to persist data across processes, so you'll need that too. To build the binaries, execute

go install ./...

in the project root and that should put notable_server in your $GOPATH/bin to run. Normal execution goes something like:

env PORT=8080 SLACK_API_TOKEN=... $GOPATH/bin/notable_server

There's also the send_digest binary that's used by the Heroku scheduler to send out and clear any notes nightly.

Configuration

Configuration is done via environment variables, either directly or through Heroku.

  • FROM_NAME and FROM_EMAIL determine who the email is from
  • TO_NAME and TO_EMAIL determine who the email is sent to
  • SMTP_HOST, SMTP_PORT, SMTP_USERNAME, SMTP_PASSWORD provide SMTP settings for sending email
  • REDIS_URL is normally provided by Heroku and gives connection details for the Redis instance
  • SLACK_API_TOKEN is an API token generated by Slack that allows notable to get details about Slack users
  • SLACK_TOKEN is the token generated by Slack that notable will verify on requests
  • SLACK_CHANNEL determines what room notes are broadcast to, defaults to "general"

Contributors

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddNote

func AddNote(note Note)

func Email

func Email() string

func Record

func Record(authorID string, category string, text string, slackToken string) error

func Reset

func Reset()

func SendEmail

func SendEmail(host string, port int, username, password, from_email, from_name, to_email, to_name string)

Types

type CategoryNotes

type CategoryNotes struct {
	Name  string
	Notes []Note
}

func (*CategoryNotes) Title

func (categoryNotes *CategoryNotes) Title() string

type Note

type Note struct {
	Author    string `json:"author"`
	AvatarURL string `json:"avatar_url"`
	Category  string `json:"category"`
	Text      string `json:"text"`
}

func Notes

func Notes() []Note

type Variables

type Variables struct {
	Today           string
	NotesByCategory []CategoryNotes
}

Directories

Path Synopsis
Godeps
_workspace/src/github.com/garyburd/redigo/internal/redistest
Package redistest contains utilities for writing Redigo tests.
Package redistest contains utilities for writing Redigo tests.
_workspace/src/github.com/garyburd/redigo/redis
Package redis is a client for the Redis database.
Package redis is a client for the Redis database.
_workspace/src/golang.org/x/net/websocket
Package websocket implements a client and server for the WebSocket protocol as specified in RFC 6455.
Package websocket implements a client and server for the WebSocket protocol as specified in RFC 6455.
_workspace/src/gopkg.in/gomail.v2
Package gomail provides a simple interface to compose emails and to mail them efficiently.
Package gomail provides a simple interface to compose emails and to mail them efficiently.
cmd

Jump to

Keyboard shortcuts

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