https://github.com/dinorain/checkoutaja
Go REST example for product checkout service, supported with authentication module.
https://github.com/dinorain/checkoutaja
clean-architecture docker go golang jwt jwt-token microservice postgresql redis rest-api swagger unit-testing
Last synced: 2 months ago
JSON representation
Go REST example for product checkout service, supported with authentication module.
- Host: GitHub
- URL: https://github.com/dinorain/checkoutaja
- Owner: dinorain
- Created: 2022-07-11T17:10:26.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-07-26T17:12:22.000Z (over 3 years ago)
- Last Synced: 2024-06-21T13:13:40.654Z (almost 2 years ago)
- Topics: clean-architecture, docker, go, golang, jwt, jwt-token, microservice, postgresql, redis, rest-api, swagger, unit-testing
- Language: Go
- Homepage:
- Size: 292 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Checkoutaja: Go REST example for product checkout service
#### What have been used:
* [sqlx](https://github.com/jmoiron/sqlx) - Extensions to database/sql.
* [pgx](https://github.com/jackc/pgx) - PostgreSQL driver and toolkit for Go
* [JWT](https://github.com/golang-jwt/jwt) - A Go implementation of JSON Web Tokens.
* [viper](https://github.com/spf13/viper) - A Go configuration with fangs
* [go-redis](https://github.com/go-redis/redis) - Redis client for Golang
* [zap](https://github.com/uber-go/zap) - Logger
* [validator](https://github.com/go-playground/validator) - Go Struct and Field validation
* [migrate](https://github.com/golang-migrate/migrate) - Database migrations. CLI and Golang library.
* [testify](https://github.com/stretchr/testify) - Testing toolkit
* [gomock](https://github.com/golang/mock) - Mocking framework
* [CompileDaemon](https://github.com/githubnemo/CompileDaemon) - Compile daemon for Go
* [Docker](https://www.docker.com/) - Docker
#### Docker compose files:
docker-compose.local.yml
docker-compose.dev.yml
### Docker development usage:
make develop
### Local development usage:
make local
make run
### Swagger:
http://localhost:5001/swagger/
### Test Accounts:
#### Admin
```sh
curl -X POST \
-d '{
"email": "admin@gmail.com",
"password": "admin"
}' \
http://139.162.55.156:5001/swagger/index.html#/Users/post_user_login
```
#### Seller
```sh
curl -X POST \
-d '{
"email": "seller@gmail.com",
"password": "seller"
}' \
http://139.162.55.156:5001/swagger/index.html#/Sellers/post_user_login
```
#### Buyer
```sh
curl -X POST \
-d '{
"email": "djourdan555@gmail.com",
"password": "hello"
}' \
http://139.162.55.156:5001/swagger/index.html#/Users/post_user_login
```