1
0
Fork 0
No description
This repository has been archived on 2025-08-23. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
Find a file
2024-10-11 10:20:23 +02:00
api refactor(api): remove slug from training component and remove TrainingSlug 2024-10-10 20:08:43 +02:00
build/package feat: add database migrations and dockerfile for migrations 2024-10-10 21:29:55 +02:00
cmd/api refactor(main.go): use postgres instead of inmemory datastore 2024-10-11 10:19:44 +02:00
db/migrations feat: add database migrations and dockerfile for migrations 2024-10-10 21:29:55 +02:00
deploy/k8s fix(helm): if for ingress had wrong value key for ingress.enabled 2024-10-10 21:37:13 +02:00
internal fix(training): postgres repo using name instead of title in queries and insert value count was mismatched 2024-10-11 10:19:03 +02:00
.editorconfig feat: initial commit 2024-09-21 12:09:08 +02:00
.gitignore chore: add .gitignore 2024-10-10 21:27:00 +02:00
.gitlab-ci.yml ci: add .gitlab-ci.yml 2024-10-10 21:30:53 +02:00
go.mod feat: add basic app 2024-10-10 21:29:08 +02:00
go.sum feat: add basic app 2024-10-10 21:29:08 +02:00
Makefile chore: add Makefile 2024-10-11 10:20:23 +02:00
oapi-codegen.yaml chore: add oapi-codegen.yaml 2024-10-10 21:27:30 +02:00
README.md docs(README.md): bump API info 2024-09-22 10:41:53 +02:00

Backoffice API

Backoffice API for my training activities etc. maybe workshops in the future.

API

The API is going to be REST with OpenAPI specification and Swagger (or similar) UI for development. In the future this may change and for example gRPC (Connect RPC 👀).

The API schema resides in the api/ directory.

API and code

The code is generated from API schema, not the other way around (schema from code).

For this, I am using oapi-codegen. The other project considered was ogen. This choice may be review in the future.

My main concern with oapi-codegen is with optional fields, since pointers are used while ogen is utilizing Go's generics. Which I feel may be a better fit.

API versioning

I want to split major versions (⚠️ breaking changes) with folders in code and also in URL path.

This is done mainly to gain experience with such approach.

The first of API scheme iteration is marked as v0, since I expect not to get everything right the first time and I want to try this approach while designing the API. Altho it's just a number and there is no reason between v0, v1, v2,...