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

Commit

Permalink
Merge remote-tracking branch 'origin/gateway' into gateway
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreLbg committed Oct 18, 2023
2 parents bab515f + cb8658d commit 03a8d37
Show file tree
Hide file tree
Showing 85 changed files with 1,508 additions and 0 deletions.
74 changes: 74 additions & 0 deletions .github/workflows/gateway.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Gateway CI/CD

on:
push:
branches: [gateway]
pull_request:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: pnpm/action-setup@v2
with:
version: latest
- uses: actions/setup-node@v3
with:
node-version: "18.x"
cache: "pnpm"
cache-dependency-path: services/gateway/pnpm-lock.yaml
- name: Install dependencies
run: |
cd ./services/gateway
pnpm install --frozen-lockfile
- name: Build protos
run: |
cd ./services/gateway
pnpm build:proto
- name: Build
run: |
cd ./services/gateway
pnpm build
# test:
# runs-on: ubuntu-latest
# needs: build
# steps:
# - uses: actions/checkout@master
# - uses: pnpm/action-setup@v2
# with:
# version: latest
# - uses: actions/setup-node@v3
# with:
# node-version: "18.x"
# cache: "pnpm"
# cache-dependency-path: services/gateway/pnpm-lock.yaml
# - name: Install dependencies
# run: |
# cd ./services/gateway
# pnpm install --frozen-lockfile
# - name: Execute tests
# run: |
# cd ./services/gateway
# pnpm test

publish:
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: ./services/
file: ./services/gateway/Dockerfile
push: true
tags: floriaaan/goodfood-gateway:latest
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,7 @@ terraform.rc

# expo cache files
/apps/mobile/.expo

# next.js
/apps/web/.next
/apps/web/next-env.d.ts
11 changes: 11 additions & 0 deletions requests/allergen/delete allergen :id.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
meta {
name: delete allergen by id
type: http
seq: 2
}

delete {
url: {{baseUrl}}/api/allergen/:id
body: none
auth: none
}
21 changes: 21 additions & 0 deletions requests/allergen/post allergen.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
meta {
name: create allergen
type: http
seq: 1
}

post {
url: {{baseUrl}}/api/allergen
body: json
auth: none
}

headers {
Content-Type: application/json
}

body:json {
{
"label": "<string>"
}
}
11 changes: 11 additions & 0 deletions requests/basket/get basket.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
meta {
name: get basket
type: http
seq: 1
}

get {
url: {{baseUrl}}/api/basket/
body: none
auth: none
}
22 changes: 22 additions & 0 deletions requests/basket/post basket.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
meta {
name: create basket
type: http
seq: 2
}

post {
url: {{baseUrl}}/api/basket
body: json
auth: none
}

headers {
Content-Type: application/json
}

body:json {
{
"productId": "<string>",
"restaurantId": "<string>"
}
}
11 changes: 11 additions & 0 deletions requests/basket/post reset.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
meta {
name: reset basket
type: http
seq: 1
}

post {
url: {{baseUrl}}/api/basket/reset
body: none
auth: none
}
21 changes: 21 additions & 0 deletions requests/basket/put change restaurant.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
meta {
name: change selected restaurant
type: http
seq: 1
}

put {
url: {{baseUrl}}/api/basket/restaurant
body: json
auth: none
}

headers {
Content-Type: application/json
}

body:json {
{
"restaurantId": "<string>"
}
}
22 changes: 22 additions & 0 deletions requests/basket/put remove product.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
meta {
name: remove product from basket
type: http
seq: 1
}

put {
url: {{baseUrl}}/api/basket/remove-product
body: json
auth: none
}

headers {
Content-Type: application/json
}

body:json {
{
"productId": "<string>",
"restaurantId": "<string>"
}
}
5 changes: 5 additions & 0 deletions requests/bruno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"version": "1",
"name": "Goodfood",
"type": "collection"
}
11 changes: 11 additions & 0 deletions requests/category/delete category :id.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
meta {
name: delete category by id
type: http
seq: 3
}

delete {
url: {{baseUrl}}/api/category/:id
body: none
auth: none
}
23 changes: 23 additions & 0 deletions requests/category/post category.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
meta {
name: create category
type: http
seq: 2
}

post {
url: {{baseUrl}}/api/category
body: json
auth: none
}

headers {
Content-Type: application/json
}

body:json {
{
"label": "<string>",
"icon": "<string>",
"hexaColor": "<string>"
}
}
11 changes: 11 additions & 0 deletions requests/delivery-person/delete delivery-person :id.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
meta {
name: delete delivery person by id
type: http
seq: 3
}

delete {
url: {{baseUrl}}/api/delivery-person/:id
body: none
auth: none
}
11 changes: 11 additions & 0 deletions requests/delivery-person/get by-user.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
meta {
name: get delivery person by user token
type: http
seq: 1
}

get {
url: {{baseUrl}}/api/delivery-person/by-user
body: none
auth: none
}
16 changes: 16 additions & 0 deletions requests/delivery-person/get near.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
meta {
name: list near delivery persons
type: http
seq: 1
}

get {
url: {{baseUrl}}/api/delivery-person/near?lat=<integer>&lng=<integer>
body: none
auth: none
}

query {
lat: <integer>
lng: <integer>
}
27 changes: 27 additions & 0 deletions requests/delivery-person/post delivery-person.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
meta {
name: create delivery person
type: http
seq: 2
}

post {
url: {{baseUrl}}/api/delivery-person
body: json
auth: none
}

headers {
Content-Type: application/json
}

body:json {
{
"firstName": "<string>",
"lastName": "<string>",
"phone": "<string>",
"locationList": [
"<number>",
"<number>"
]
}
}
11 changes: 11 additions & 0 deletions requests/delivery/delete delivery :id.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
meta {
name: delete delivery by id
type: http
seq: 3
}

delete {
url: {{baseUrl}}/api/delivery/:id
body: none
auth: none
}
11 changes: 11 additions & 0 deletions requests/delivery/get by-restaurant :id.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
meta {
name: list deliveries by restaurant id
type: http
seq: 1
}

get {
url: {{baseUrl}}/api/delivery/by-restaurant/:id
body: none
auth: none
}
11 changes: 11 additions & 0 deletions requests/delivery/get by-user :id.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
meta {
name: list deliveries by user
type: http
seq: 1
}

get {
url: {{baseUrl}}/api/delivery/by-user
body: none
auth: none
}
24 changes: 24 additions & 0 deletions requests/delivery/post delivery.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
meta {
name: create delivery
type: http
seq: 1
}

post {
url: {{baseUrl}}/api/delivery
body: json
auth: none
}

headers {
Content-Type: application/json
}

body:json {
{
"eta": "<string>",
"address": "<string>",
"deliveryPersonId": "<string>",
"restaurantId": "<string>"
}
}
3 changes: 3 additions & 0 deletions requests/environments/local.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
vars {
baseUrl: http://localhost:50000
}
11 changes: 11 additions & 0 deletions requests/log/delete log :id.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
meta {
name: delete log by id
type: http
seq: 1
}

get {
url: {{baseUrl}}/api/log/:id
body: none
auth: none
}
Loading

0 comments on commit 03a8d37

Please sign in to comment.