Skip to content

Latest commit

 

History

History
116 lines (83 loc) · 1.27 KB

README.MD

File metadata and controls

116 lines (83 loc) · 1.27 KB

GO-CLEAN-TEMPLATE

Install dependencies

$ go mod download 

Develop environment at localhost:7000

$ CompileDaemon -build="go build innovasive/go-clean-template" -command="./go-clean-template" 

API

Fetch All User

https://${url}/users


Method

GET

Success Response


  • Code: 200 OK
  • Content:
  users : [
    {
      "id": UUID,
      "email": "",
      "first_name": "" 
      "last_name": "" 
    },
    ... 
  ]

Error Response

  • Code: 500 Internal Server Error

Find User By Mail

https://${url}/users/:email


Method

GET

Success Response


  • Code: 200 OK
  • Content:
  users : [
    {
      "id": UUID,
      "email": "",
      "first_name": "" 
      "last_name": "" 
    },
    ... 
  ]

Error Response

  • Code: 500 Internal Server Error

Create User

https://${url}/users

Request Body

  {
    "email": "",
    "first_name": "" 
    "last_name": "" 
  }

Method

POST

Success Response


  • Code: 201 CREATED
  • Content:
  {
    "userID": UUID
  }

Error Response

  • Code: 406 Not Acceptable