Created for Bareksa Backend Engineer Intern Selection Test.
- Golang (Echo Framework)
- PostgreSQL
- Pgadmin
- Docker
Simply run .\run.bat
on terminal.
docker build -t bareksa-news .
docker-compose -f docker-compose.yaml up
8080
: API5050
: Pgadmin
- POST
{{url}}/news/create
- Request Body:
{
"title":"",
"content":""
}
- POST
{{url}}/news/search_one
- Request Body:
{
"guid":"",
"title":"",
"is_published_valid":0/1,
"is_published":0/1,
"is_deleted_valid":0/1,
"is_deleted":0/1
}
- Notes : tidak ada field yang wajib diisi pada body request.
- POST
{{url}}/news/search_many
- Request Body:
{
"guid":"",
"title":"",
"is_published_valid":0/1,
"is_published":0/1,
"is_deleted_valid":0/1,
"is_deleted":0/1
}
- Notes : tidak ada field yang wajib diisi pada body request.
- POST
{{url}}/news/filter_topic
- Request Body:
{
"topic":""
}
- Notes : String pada field topic adalah nama topic bukan guid topic.
- POST
{{url}}/news/update
- Request Body:
{
"guid":"",
"title":"",
"content":"",
"added_tags":[],
"deleted_tags":[],
"is_published_valid":0/1,
"is_published":0/1
}
- Notes : field yang wajib diisi hanya
guid
, string padaadded_tags
dandeleted_tags
adalah nama tag bukan guid tag.
- POST
{{url}}/news/delete
- Request Body:
{
"guid":""
}
- POST
{{url}}/tags/create
- Request Body:
{
"name":""
}
- POST
{{url}}/tags/search_one
- Request Body:
{
"guid":"",
"name":""
}
- Notes: Tidak ada field yang wajib diisi pada body request.
- POST
{{url}}/tags/update
- Request Body:
{
"guid":"",
"name":""
}
- POST
{{url}}/tags/update
- Request Body:
{
"guid":""
}