A REST API backend application that can be used to manage personal notes in a multi-user environment.
- Make sure database is up and running and you have update the
configurations/database.yaml
file with relevant values. - Run the
database.sql
query to get database and table created. - Clone the service locally and run the service by typing
go run main.go
- make sure service is up and running.
- Now you can send request to the service.
Note: Use the postman collection notes_app.postman_collection.json
GET /note/get_un_archived
Parameter | Type | Description |
---|---|---|
paginator |
{"page":1, "size": 10} |
required. page must be greater than zero & size must be in between 10 - 100 |
- Response
{
"data": [
{
"id": 3,
"user_id": 1,
"title": "abc",
"description": "cc bnbj v",
"created_at": "2022-03-26T22:10:40Z",
"updated_at": "2022-03-26T22:31:01Z"
}
],
"error": null,
"success": "true"
}
GET /note/get_archived
Parameter | Type | Description |
---|---|---|
paginator |
{"page":1, "size": 10} |
required. page must be greater than zero & size must be in between 10 - 100 |
- Response
{
"data": [
{
"id": 2,
"user_id": 1,
"title": "hello",
"description": "cc bnbj v",
"created_at": "2022-03-26T22:10:40Z",
"updated_at": "2022-03-26T22:31:01Z"
}
],
"error": null,
"success": "true"
}
POST /note/create
- Request body
{
"user_id": 123,
"title": "title",
"description": "description"
}
- Response
{
"data": 3,
"error": null,
"success": "true"
}
GET /note/archive/{id}
- Response
{
"data": 3,
"error": null,
"success": true
}
GET /note/un_archive/{id}
- Response
{
"data": 3,
"error": null,
"success": true
}
PUT /note/update/{id}
- Request body
{
"title": "title",
"description": "description"
}
- Response
{
"data": 2,
"error": null,
"success": true
}
DELETE /note/delete/{id}
- Response
{
"data": 3,
"error": null,
"success": true
}