Skip to content

Latest commit

 

History

History
87 lines (52 loc) · 2.64 KB

README.md

File metadata and controls

87 lines (52 loc) · 2.64 KB

Golang Answer events store microservice 👋. Codacy Badge

This application handlers the different states that can have a set of answers for user.

Here, we can use different options to manage the event state can have a group of answers. *

  • Note: We have used package-oriented-design to create this API, you can know more about this link

The requirements of this project have the following:

  1. If a user saves the same key multiple times (using update), it should save every answer. When retrieving an answer, it should return the latest answer.

  2. If a user tries to create an answer that already exists - the request should fail and an adequate message or code should be returned.

  3. If an answer doesn't exist or has been deleted, an adequate message or code should be returned.

When returning history, only mutating events (create, update, delete) should be returned. The "get" events should not be recorded.

It is possible to create a key after it has been deleted. However, it is not possible to update a deleted key. For example the following event sequences are allowed:

create → delete → create → update

create → update → delete → create → update

However, the following should not be allowed:

create → delete → update
create → create

System Design

design of solution

diagram

Setup:

  • Run follow command:
make setup

Bind api:

make api-forward

Remove all:

  • Run follow command:
make remove-all

Testing

make test

##Documentation API Swagger

To watch, please click in the next link:

http://localhost:8080/swagger/index.html#/

These are detail endpoints

diagram

👨‍💻 Full list what has been used: