项目作者: prongbang

项目描述 :
Go Clean Architecture
高级语言: Go
项目地址: git://github.com/prongbang/goclean.git
创建时间: 2019-01-10T17:43:01Z
项目社区:https://github.com/prongbang/goclean

开源协议:MIT License

下载


Go Clean Architechture

Build Status
Codecov
Go Report Card

ภาพจาก blog.cleancoder.com

Swagger Generate

  1. $ make swaggen

REST API

  1. $ make run

ADD

  • Request
  1. POST http://localhost:1323/api/v1/promotion

Body

  1. {
  2. "id": 1,
  3. "code": "sd-promo",
  4. "name": "Sunday promotion",
  5. "priority": 4,
  6. "exclusive": false,
  7. "used": 0,
  8. "couponBased": false,
  9. "rules": [],
  10. "actions": [],
  11. "createdAt": "2017-02-28T12:05:12+0100",
  12. "updatedAt": "2017-02-28T12:05:13+0100",
  13. "channels": [],
  14. "_links": {
  15. "self": {
  16. "href": "\/api\/v1\/promotions\/sd-promo"
  17. }
  18. }
  19. }

GET ALL

  • Request
  1. GET http://localhost:1323/api/v1/promotion

GET BY ID

  • Request
  1. GET http://localhost:1323/api/v1/promotion/1