Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bygui86/go-complete-project
Golang complete project: CRUD RESTful API service
https://github.com/bygui86/go-complete-project
Last synced: 2 days ago
JSON representation
Golang complete project: CRUD RESTful API service
- Host: GitHub
- URL: https://github.com/bygui86/go-complete-project
- Owner: bygui86
- License: apache-2.0
- Created: 2019-10-29T07:54:47.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-03-15T15:20:48.000Z (almost 5 years ago)
- Last Synced: 2024-11-08T06:07:52.488Z (about 2 months ago)
- Language: Go
- Size: 36.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-complete-project
This is a blog application where a user can:
- Signup (Register)
- Edit his account
- Shutdown (Delete his account)
- Create a blog post
- Edit blog post
- View all blog posts
- View a particular blog post
- View other blog posts published by other users
- Delete blog post---
## Technologies
- Go
- GoDotenv
- GORM (Golang ORM)
- Postgres
- Mysql
- Gorilla Mux (HTTP routing and URL matcher)
- JWTYou might be wondering seeing Postgres and Mysql. The API is built in a way that you can decide to use Mysql or Postgres driver, simply by changing the configuration in the `.env`.
---
## Spin it up!
### Prepare
```
export GO111MODULE=on
```### Build
```
```### Run
```
```### Test
```
# all
go test -v ./...# models only
cd tests/modeltests && go test -v && cd ../..# controllers only
cd tests/controllertests && go test -v && cd ../..# specific one only
go test -v --run TestFindAllUsers
go test -v --run TestUpdatePost
go test -v --run TestLogin
go test -v --run TestCreateUser
```---
## Improvements
- [ ] implementation, clarification of doubts
- [ ] implement db unit-testing using interface and mocks
- [ ] try use testcontainers-go for integration-testing
- [ ] improve logging
- [ ] improve error handling
- [ ] improve structure
- [ ] docker
- [ ] kubernetes
- [ ] kubernetes probes
- [ ] interrupt signals
- [ ] prometheus metrics
- [ ] tracing---
## Links
- https://levelup.gitconnected.com/@victorsteven
### Part 1 > Version 1.x
- https://levelup.gitconnected.com/crud-restful-api-with-go-gorm-jwt-postgres-mysql-and-testing-460a85ab7121
- https://github.com/victorsteven/Go-JWT-Postgres-Mysql-Restful-API### Part 2 > Version 2.x
- https://levelup.gitconnected.com/dockerized-crud-restful-api-with-go-gorm-jwt-postgresql-mysql-and-testing-61d731430bd8
- https://github.com/victorsteven/Dockerized-Golang-Postgres-Mysql-API### Part 3 > Version 3.x
- https://levelup.gitconnected.com/deploying-dockerized-golang-api-on-kubernetes-with-postgresql-mysql-d190e27ac09f
- https://github.com/victorsteven/Deploy-GO-GORM-PostgreSQL-MySQL-API-To-Kubernetes