Skip to content

Commit

Permalink
Merge pull request #48 from quangdangfit/ddd
Browse files Browse the repository at this point in the history
update README.md
  • Loading branch information
quangdangfit authored Aug 20, 2023
2 parents a662125 + 057a690 commit 8fa1cf0
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ redis_db: 0
### Run
```shell script
$ go run main.go
$ go run cmd/api/main.go
```

### Test
Expand All @@ -47,32 +47,34 @@ go test -timeout 9000s -a -v -coverpkg=./... ./test
Project information and existing API

```
[GIN-debug] POST /api/v1/auth/register --> goshop/internal/user/port/http.(*UserHandler).Register-fm (3 handlers)
[GIN-debug] POST /api/v1/auth/login --> goshop/internal/user/port/http.(*UserHandler).Login-fm (3 handlers)
[GIN-debug] POST /api/v1/auth/refresh --> goshop/internal/user/port/http.(*UserHandler).RefreshToken-fm (4 handlers)
[GIN-debug] GET /api/v1/auth/me --> goshop/internal/user/port/http.(*UserHandler).GetMe-fm (4 handlers)
[GIN-debug] PUT /api/v1/auth/change-password --> goshop/internal/user/port/http.(*UserHandler).ChangePassword-fm (4 handlers)
[GIN-debug] GET /api/v1/products --> goshop/internal/product/port/http.(*ProductHandler).ListProducts-fm (3 handlers)
[GIN-debug] POST /api/v1/products --> goshop/internal/product/port/http.(*ProductHandler).CreateProduct-fm (4 handlers)
[GIN-debug] PUT /api/v1/products/:id --> goshop/internal/product/port/http.(*ProductHandler).UpdateProduct-fm (4 handlers)
[GIN-debug] GET /api/v1/products/:id --> goshop/internal/product/port/http.(*ProductHandler).GetProductByID-fm (3 handlers)
[GIN-debug] POST /api/v1/orders --> goshop/internal/order/port/http.(*OrderHandler).PlaceOrder-fm (4 handlers)
[GIN-debug] GET /api/v1/orders/:id --> goshop/internal/order/port/http.(*OrderHandler).GetOrderByID-fm (4 handlers)
[GIN-debug] GET /api/v1/orders --> goshop/internal/order/port/http.(*OrderHandler).GetOrders-fm (4 handlers)
[GIN-debug] PUT /api/v1/orders/:id/cancel --> goshop/internal/order/port/http.(*OrderHandler).CancelOrder-fm (4 handlers)
[GIN-debug] GET /swagger/*any --> github.com/swaggo/gin-swagger.CustomWrapHandler.func1 (3 handlers)
[GIN-debug] POST /auth/register --> goshop/app/api.(*UserAPI).Register-fm (3 handlers)
[GIN-debug] POST /auth/login --> goshop/app/api.(*UserAPI).Login-fm (3 handlers)
[GIN-debug] POST /auth/refresh --> goshop/app/api.(*UserAPI).RefreshToken-fm (4 handlers)
[GIN-debug] GET /auth/me --> goshop/app/api.(*UserAPI).GetMe-fm (4 handlers)
[GIN-debug] PUT /auth/change-password --> goshop/app/api.(*UserAPI).ChangePassword-fm (4 handlers)
[GIN-debug] GET /api/v1/products --> goshop/app/api.(*ProductAPI).ListProducts-fm (3 handlers)
[GIN-debug] POST /api/v1/products --> goshop/app/api.(*ProductAPI).CreateProduct-fm (4 handlers)
[GIN-debug] PUT /api/v1/products/:id --> goshop/app/api.(*ProductAPI).UpdateProduct-fm (4 handlers)
[GIN-debug] GET /api/v1/products/:id --> goshop/app/api.(*ProductAPI).GetProductByID-fm (3 handlers)
[GIN-debug] POST /api/v1/orders --> goshop/app/api.(*OrderAPI).PlaceOrder-fm (4 handlers)
[GIN-debug] GET /api/v1/orders/:id --> goshop/app/api.(*OrderAPI).GetOrderByID-fm (4 handlers)
[GIN-debug] GET /api/v1/orders --> goshop/app/api.(*OrderAPI).GetOrders-fm (4 handlers)
[GIN-debug] PUT /api/v1/orders/:id/cancel --> goshop/app/api.(*OrderAPI).CancelOrder-fm (4 handlers)
2023-06-11T13:31:47.587+0700 INFO goshop/main.go:34 Listen at: 8888
[GIN-debug] GET /health --> goshop/internal/server/http.Server.Run.func1 (3 handlers)
2023-08-20T13:50:57.175+0700 INFO http/server.go:53 Server is listening on PORT: 8888
[GIN-debug] Listening and serving HTTP on :8888
```

### Document
* API document at: `http://localhost:8888/swagger/index.html`

### Tech stack
- Restful API
- DDD
- Gorm
- Swagger
- Logging
- Jwt-Go
- Gin-gonic
- Redis
- Dig (Dependency Injection)

0 comments on commit 8fa1cf0

Please sign in to comment.