Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(server): allow a visitor to register, retrieve, patch and login to a player account. #57

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
a4b9586
feat: add endpoint to register user
Goncalo-Marques Nov 16, 2024
4994ca3
feat: increase address to varchar(100)
Goncalo-Marques Nov 17, 2024
c4a8c0d
feat: add store tx
Goncalo-Marques Nov 17, 2024
1ce34c0
chore: update go mod
Goncalo-Marques Nov 17, 2024
8870eff
chore: update csepll
Goncalo-Marques Nov 17, 2024
04ec33e
feat: add logging keys
Goncalo-Marques Nov 17, 2024
7b69f40
chore: update csepll
Goncalo-Marques Nov 17, 2024
078a1c3
feat: add authn
Goncalo-Marques Nov 17, 2024
5bd6548
feat: add authz
Goncalo-Marques Nov 17, 2024
5863bba
feat: add config
Goncalo-Marques Nov 17, 2024
8f9246d
feat: add domain
Goncalo-Marques Nov 17, 2024
08935d2
feat: add service
Goncalo-Marques Nov 17, 2024
0e6bd11
feat: add store
Goncalo-Marques Nov 17, 2024
e93a44e
feat: add http
Goncalo-Marques Nov 17, 2024
db385ba
feat: add main file
Goncalo-Marques Nov 17, 2024
4105216
feat: add config
Goncalo-Marques Nov 17, 2024
521e5af
fix: parse language tag from store
Goncalo-Marques Nov 17, 2024
6d592d6
chore: update swagger with get user and signin
Goncalo-Marques Nov 17, 2024
f318249
feat: add error credentials incorrect
Goncalo-Marques Nov 17, 2024
7d98547
feat: add user id logging key
Goncalo-Marques Nov 17, 2024
8dd0ee8
feat: update store with get user by email and signin
Goncalo-Marques Nov 17, 2024
9acced5
feat: update service with get user by id and signin
Goncalo-Marques Nov 17, 2024
41cfaa6
feat: update http with get user by id and signin
Goncalo-Marques Nov 17, 2024
df3dbc5
chore: update go mod
Goncalo-Marques Nov 17, 2024
7e30404
chore: update cspell
Goncalo-Marques Nov 17, 2024
ed91789
chore: add deployment config
Goncalo-Marques Nov 17, 2024
4b97e45
feat: update spec with multimedia
Goncalo-Marques Nov 18, 2024
fdc0c60
feat: add endpoint to patch user
Goncalo-Marques Nov 23, 2024
6b83402
fix: add missing error handling
Goncalo-Marques Nov 23, 2024
86db6e9
feat: add balance to user patch
Goncalo-Marques Nov 23, 2024
2936d1e
feat: add multimedia
Goncalo-Marques Nov 23, 2024
61fa928
chore: add dependencies
Goncalo-Marques Nov 23, 2024
66d28f2
feat: update country validations
Goncalo-Marques Nov 23, 2024
85a847c
chore: fix lint issues
Goncalo-Marques Nov 23, 2024
5a49d03
fix: use initial content type
Goncalo-Marques Nov 23, 2024
3bef975
fix: use int 64 checksum
Goncalo-Marques Nov 23, 2024
2a1b4e6
feat: return multimedia struct
Goncalo-Marques Nov 23, 2024
6d63f85
chore: remove unnecessary code
Goncalo-Marques Nov 23, 2024
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
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@ logs
npm-debug.log*

# Editor directories
.vscode
.vscode

# Secrets
gcp-key.json
3 changes: 3 additions & 0 deletions server.Dockerfile → Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ RUN CGO_ENABLED=0 go build -ldflags \
# Build server application.
FROM alpine:latest

ENV GOOGLE_APPLICATION_CREDENTIALS=/app/gcp-key.json

WORKDIR /app

COPY --from=builder /app/gcp-key.json /app/gcp-key.json
COPY --from=builder /app/api/swagger /app/api/swagger
COPY --from=builder /app/database/migrations /app/database/migrations
COPY --from=builder /app/deployments /app/deployments
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ To run the application in containers, the [Docker Engine](https://docs.docker.co

To ensure a smooth development process, we use [GNU Make](https://www.gnu.org/software/make/) to run all necessary commands for building, testing, and deploying this project. Make files help automate these tasks, making it easier to manage complex dependencies and workflows. By using GNU Make, we can maintain consistency across different environments and streamline our development efforts.

### GCP Service Account

To enable the file upload functionality in this project, a Google Cloud Platform (GCP) service account key is required. The service account must have the `Storage Object Admin` role assigned, which grants the necessary permissions to upload files to a GCP Cloud Storage bucket. Ensure that the JSON key file for the service account is properly configured in the [application settings](https://cloud.google.com/docs/authentication/provide-credentials-adc#how-to) to authenticate.

To run the server with the file upload functionality using the [Dockerfile](Dockerfile), it is necessary to have the JSON key file in the `server` directory, named `gcp-key.json`.

## Applications

### Quick Start
Expand Down
6 changes: 6 additions & 0 deletions cspell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,20 @@ ignoreWords:
- GOPATH
- GOOFR
- healthcheck
- ihttp
- isready
- ldflags
- oapitypes
- openapi
- pegi
- pgconn
- PGUSER
- pgxpool
- pkey
- plpgsql
- Radeon
- Ryzen
- signin
- sslmode
- stretchr
- testcontainers
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ services:
server:
build:
context: .
dockerfile: server.Dockerfile
dockerfile: Dockerfile
depends_on:
database:
condition: service_healthy
Expand Down
Loading