We will create an API and connect to Database with (Gin and GORM)
- REST API with Gin
- Read JSON Request to Model/Struct and do JSON Response
- Connect to Postgres Database with GORM
- Do Query CRUD when calling REST API
- auths
- auth_id: bigint, autoincrement
- account_id: bigint
- username: varchar
- password: varchar
- accounts
- account_id: bigint
- name: varchar
- /auth/login
- /auth/upsert
- /account/create
- /account/read
- /account/update
- /account/delete
- /account/list
- /account/my
- Including Code Tour
- Each topic has spesific commit
- Script to automatically reclone with spesific commit, see on vscode-open-commit.sh
- Clone repository
- Open with VSCode
- Don't forget to install Golang
- Have Postgres and Import DDL to your Database
- Enable Golang VSCode extension
- Enable Codetour VSCode extension (https://marketplace.visualstudio.com/items?itemName=vsls-contrib.codetour)
- Follow Codetour topic and step, each topic has script to automatically reclone with spesific commit.
If you have any questions or encounter any issues, feel free to open an issue and we will assist you in resolving them.
Feel free to contribute, don't forget to mention if needed