From 13ff6184b579a5e9962ed91cdbdff65473be3251 Mon Sep 17 00:00:00 2001
From: Colin Harris
Date: Wed, 17 Oct 2018 22:44:32 +0800
Subject: [PATCH] Setup hangout bot for deployment
---
Gopkg.lock | 12 ------------
Makefile | 3 ++-
cmd/{hangout_bot => hangout}/lambda/main.go | 0
serverless.yml | 8 +++++++-
4 files changed, 9 insertions(+), 14 deletions(-)
rename cmd/{hangout_bot => hangout}/lambda/main.go (100%)
diff --git a/Gopkg.lock b/Gopkg.lock
index 7df0eaf..5c89efb 100644
--- a/Gopkg.lock
+++ b/Gopkg.lock
@@ -53,17 +53,6 @@
revision = "9e9afa0895e9daff556cc18f90dc53eb91f41ffd"
version = "v1.14.26"
-[[projects]]
- branch = "master"
- digest = "1:ac7ff0abd3d0f08a01e66a9d4da4cec443ef1045bfc687b300e12453348bac55"
- name = "github.com/fnproject/fdk-go"
- packages = [
- ".",
- "utils",
- ]
- pruneopts = ""
- revision = "1c783fe496250a3e27445273fb43cace6fd4ee2b"
-
[[projects]]
digest = "1:858b7fe7b0f4bc7ef9953926828f2816ea52d01a88d72d1c45bc8c108f23c356"
name = "github.com/go-ini/ini"
@@ -136,7 +125,6 @@
"github.com/aws/aws-sdk-go/aws",
"github.com/aws/aws-sdk-go/aws/session",
"github.com/aws/aws-sdk-go/service/dynamodb",
- "github.com/fnproject/fdk-go",
"github.com/stretchr/testify/assert",
"google.golang.org/api/chat/v1",
"gopkg.in/telegram-bot-api.v4",
diff --git a/Makefile b/Makefile
index 5e327a3..01e4e0e 100644
--- a/Makefile
+++ b/Makefile
@@ -5,9 +5,10 @@ build:
dep ensure
GOOS=linux go build -o bin/telegram_lambda cmd/telegram/lambda/main.go
GOOS=linux go build -o bin/telegram_http cmd/telegram/http/main.go
+ GOOS=linux go build -o bin/hangout_lambda cmd/hangout/lambda/main.go
test:
ENVIRONMENT=test go test $(UNIT_TEST_PACKAGES) -race
deploy: build
- serverless deploy
\ No newline at end of file
+ serverless deploy
diff --git a/cmd/hangout_bot/lambda/main.go b/cmd/hangout/lambda/main.go
similarity index 100%
rename from cmd/hangout_bot/lambda/main.go
rename to cmd/hangout/lambda/main.go
diff --git a/serverless.yml b/serverless.yml
index 9cc5ab3..c1e1fa4 100644
--- a/serverless.yml
+++ b/serverless.yml
@@ -60,6 +60,12 @@ functions:
parameters:
paths:
token: true
+ hangout:
+ handler: bin/hangout_lambda
+ events:
+ - http:
+ path: hangout
+ method: post
# Define function environment variables here
# environment:
@@ -104,4 +110,4 @@ resources:
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1
- TableName: ${self:provider.environment.ROLLCALL_RESPONSE_TABLE}
\ No newline at end of file
+ TableName: ${self:provider.environment.ROLLCALL_RESPONSE_TABLE}