Skip to content
This repository has been archived by the owner on Jul 18, 2023. It is now read-only.

Notify Follower on Slack #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 61 additions & 2 deletions Godeps/Godeps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions app/buychat.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"os"

zbar "github.com/PeterCxy/gozbar"
"github.com/nlopes/slack"
"github.com/stvp/rollbar"

"github.com/gorilla/mux"
Expand All @@ -25,6 +26,7 @@ type App struct {
Log *log.Logger
RedisConn redis.Conn
YOLP *yolp.Client
Slack *slack.Client
}

// New returns new app
Expand Down Expand Up @@ -57,6 +59,9 @@ func New() (*App, error) {
if err := app.SetupRedis(); err != nil {
return nil, err
}
if err := app.setupSlack(); err != nil {
return nil, err
}
return app, nil
}

Expand Down
13 changes: 13 additions & 0 deletions app/slack.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package app

import (
"os"

"github.com/nlopes/slack"
)

func (app *App) setupSlack() error {
api := slack.New(os.Getenv("SLACK_TOKEN"))
app.Slack = api
return nil
}
50 changes: 49 additions & 1 deletion vendor/github.com/garyburd/redigo/redis/conn.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 33 additions & 0 deletions vendor/github.com/garyburd/redigo/redis/go17.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

83 changes: 51 additions & 32 deletions vendor/github.com/garyburd/redigo/redis/pool.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions vendor/github.com/garyburd/redigo/redis/pre_go17.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions vendor/github.com/nlopes/slack/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading