Skip to content

Commit

Permalink
Jp/feature/refactoring (#9)
Browse files Browse the repository at this point in the history
* refactoring to user event-bridge scheduler

* refactoring to user event-bridge scheduler

* removing limit on dynamo input

* fixing pagination

* fixing pagination

* feat(messaging): added messaging using twilio

* feat(messaging): added messaging using twilio

---------

Co-authored-by: Javier Perez <perez.javier@siemens.com>
  • Loading branch information
japb1998 and Javier Perez committed Dec 21, 2023
1 parent 9562ddc commit ba3fb6f
Show file tree
Hide file tree
Showing 65 changed files with 7,544 additions and 2,899 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/serverless-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Serverless deploy
run-name: ${{ github.actor }} is deploying on GitHub Actions 🚀
env:
APP_ID: salonBoost
APP_ID: ${{secrets.APP_ID}}
USER_POOL_ID: ${{secrets.USER_POOL_ID}}
EMAIL_API_KEY: ${{secrets.EMAIL_API_KEY}}
TWILIO_ACCOUNT_SID: ${{secrets.TWILIO_ACCOUNT_SID}}
TWILIO_AUTH_TOKEN: ${{secrets.TWILIO_AUTH_TOKEN}}
MESSAGING_SERVICE_SID: ${{secrets.MESSAGING_SERVICE_SID}}
TWILIO_SERVICE_ID: ${{secrets.TWILIO_SERVICE_ID}}
on:
push:
branches:
Expand All @@ -22,7 +22,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version: '1.21'
- run: echo Build Starts Now
- name: Build
run: make build
Expand All @@ -33,7 +33,7 @@ jobs:
- name: serverless deploy
uses: serverless/github-action@v3.2
with:
args: -c "serverless plugin install --name serverless-lift && serverless deploy"
args: -c "serverless plugin install --name serverless-deployment-bucket && serverless deploy"
entrypoint: /bin/sh
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ vendor

# Output of the go coverage tool, specifically when used with LiteIDE
*.out
*.DS_Store
19 changes: 12 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
.PHONY: build clean deploy gomodgen serve

profile=personal
build:
export GO111MODULE=on
env GOARCH=amd64 GOOS=linux CGO_ENABLED=0 go build -ldflags="-s -w" -o ./bin/scheduleEmail ./scheduleEmail/cmd
env GOARCH=amd64 GOOS=linux CGO_ENABLED=0 go build -ldflags="-s -w" -o ./bin/scheduleCheck ./scheduleCheck/cmd
env GOARCH=amd64 GOOS=linux CGO_ENABLED=0 go build -ldflags="-s -w" -o ./bin/queueHandler ./clientQueue/cmd/main.go
go build -o ./bin/cliApp ./cliApp/cmd
env GOARCH=arm64 GOOS=linux go build -tags lambda.norpc -o ./bin/control-tower/bootstrap ./control-tower/cmd/app
zip -j ./bin/control-tower/control-tower.zip ./bin/control-tower/bootstrap
env GOARCH=arm64 GOOS=linux go build -tags lambda.norpc -o ./bin/schedule-handler/bootstrap ./control-tower/cmd/schedule-handler
zip -j ./bin/schedule-handler/schedule-handler.zip ./bin/schedule-handler/bootstrap
clean:
rm -rf ./bin ./vendor go.sum

deploy: clean build
sls deploy --verbose

APP_ID=control-tower sls deploy --verbose --aws-profile $(profile)

gomodgen:
chmod u+x gomod.sh
Expand All @@ -22,4 +23,8 @@ serve:
go run ./scheduleEmail/cmd
upload:
source "C:\Users\Javier Perez\OneDrive\Desktop\eliEmail\environment.sh"
go run ./cliApp/cmd --creator pratoelis@gmail.com --path "C:\Users\Javier Perez\OneDrive\Desktop\booksy_automation\customers.json"
go run ./cliApp/cmd --creator pratoelis@gmail.com --path "C:\Users\Javier Perez\OneDrive\Desktop\booksy_automation\customers.json"

docs:
~/go/bin/swag init -d ./control-tower/internal/controller -g notification.go
~/go/bin/swag init -d ./control-tower/internal/controller -g client.go
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Repository For The LashRoom Serverless Backend

## Description
This will be a scheduler app build to send reminders to the clients of this business in a weekly basis or as the lash artist considers properly
This will be a scheduler app build to send reminders to the clients of this business in a weekly basis or as the lash artist considers properly

## SWAGGER
Generated using go "swag" [https://github.com/swaggo/swag/tree/master]
4 changes: 2 additions & 2 deletions cliApp/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (

"github.com/japb1998/lashroom/cliApp/internals/booksy"
"github.com/japb1998/lashroom/cliApp/internals/utils"
"github.com/japb1998/lashroom/scheduleEmail/pkg/client"
"github.com/japb1998/lashroom/shared/pkg/database"
"github.com/japb1998/lashroom/scheduleEmail/internal/client"
"github.com/japb1998/lashroom/shared/internal/database"
)

var wg sync.WaitGroup
Expand Down
2 changes: 1 addition & 1 deletion cliApp/go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/japb1998/lashroom/cliApp

go 1.20
go 1.21
10 changes: 0 additions & 10 deletions clientQueue/cmd/main.go

This file was deleted.

8 changes: 0 additions & 8 deletions clientQueue/go.mod

This file was deleted.

38 changes: 0 additions & 38 deletions clientQueue/go.sum

This file was deleted.

144 changes: 0 additions & 144 deletions clientQueue/pkg/handler/handler.go

This file was deleted.

64 changes: 0 additions & 64 deletions clientQueue/pkg/operations/operations.go

This file was deleted.

6 changes: 0 additions & 6 deletions clientQueue/pkg/record/event.go

This file was deleted.

Loading

0 comments on commit ba3fb6f

Please sign in to comment.