elct9620 / interview-gogolook-todo

The interview for Gogolook

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

(Interview) Gogolook Todo

Go

RESTful API

GET /tasks

List all todo items

Response Body

{"result": [{"id": 1, "name": "Todo Item", "status": 0}]}

POST /tasks

Create a new task

Request Body

{"name": "New Item"}

Response Body

{"result": {"id": 1, "name": "New Item", "status": 0}}

PUT /tasks/:id

Update an exists task

Request Body

{"name": "Rename", "status": 1}

Response Body

{"result": {"id": 1, "name": "Rename", "status": 1}}

To ensure the behavior is simple, it will create a new one if not exists.

DELETE /tasks/:id

Delete a task

Limitations

  • Not thread-safe
  • No persist store

About

The interview for Gogolook


Languages

Language:Go 100.0%