This repository has been archived by the owner on Jul 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/gateway' into gateway
- Loading branch information
Showing
85 changed files
with
1,508 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -86,3 +86,7 @@ terraform.rc | |
|
||
# expo cache files | ||
/apps/mobile/.expo | ||
|
||
# next.js | ||
/apps/web/.next | ||
/apps/web/next-env.d.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"version": "1", | ||
"name": "Goodfood", | ||
"type": "collection" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
vars { | ||
baseUrl: http://localhost:50000 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
Oops, something went wrong.