Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/prongbang/goclean
Go Clean Architecture
https://github.com/prongbang/goclean
clean clean-architecture clean-code echo-framework go golang unit-testing
Last synced: about 1 month ago
JSON representation
Go Clean Architecture
- Host: GitHub
- URL: https://github.com/prongbang/goclean
- Owner: prongbang
- License: mit
- Created: 2019-01-10T17:43:01.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-11-08T06:49:24.000Z (over 4 years ago)
- Last Synced: 2025-01-04T00:53:30.155Z (about 1 month ago)
- Topics: clean, clean-architecture, clean-code, echo-framework, go, golang, unit-testing
- Language: Go
- Homepage:
- Size: 3.37 MB
- Stars: 7
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Go Clean Architechture
[![Build Status](https://github.com/prongbang/goclean/workflows/Go/badge.svg)](https://github.com/prongbang/goclean/actions)
[![Codecov](https://img.shields.io/codecov/c/github/prongbang/goclean.svg)](https://codecov.io/gh/prongbang/goclean)
[![Go Report Card](https://goreportcard.com/badge/github.com/prongbang/goclean)](https://goreportcard.com/report/github.com/prongbang/goclean)
ภาพจาก blog.cleancoder.com### Swagger Generate
```
$ make swaggen
```- http://localhost:1323/swagger/index.html
### REST API
```
$ make run
```#### ADD
- Request
```
POST http://localhost:1323/api/v1/promotion
```Body
```
{
"id": 1,
"code": "sd-promo",
"name": "Sunday promotion",
"priority": 4,
"exclusive": false,
"used": 0,
"couponBased": false,
"rules": [],
"actions": [],
"createdAt": "2017-02-28T12:05:12+0100",
"updatedAt": "2017-02-28T12:05:13+0100",
"channels": [],
"_links": {
"self": {
"href": "\/api\/v1\/promotions\/sd-promo"
}
}
}
```#### GET ALL
- Request
```
GET http://localhost:1323/api/v1/promotion```
#### GET BY ID
- Request
```
GET http://localhost:1323/api/v1/promotion/1```