Skip to content

The service provides a simple CRUD API to store/manage frequently asked questions and answers.

Notifications You must be signed in to change notification settings

ssoql/faq-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

faq-service

The service is responsible for store frequently asked questions and answers. Provides simple CRUD API.

This project implements clean architecture in order to assure both high elasticity and reusability of the code.

Layers

  • internal/api - can import any other layers.
  • internal/infrastructure - can import everything except api.
  • internal/useCases - should not import anything else than internal/app or standard library (or utils)
  • internal/app - should not import anything else than the standard library or utils

Middleware

In order to reuse common code such as authorization and graceful shutdown this project utilizes also middleware pattern. Handlers are wrapped in pipelines where each step wraps and calls the next one.

API usage:

Create FAQ object:

POST /faq
    {
        "question":"What is your name?",
        "answer": "My name is Bot. Chat Bot :)"
    }

Update FAQ object by ID:

PATCH /faq/:id
    {
        "question":"How are you, mr Bot?",
        "answer": "I'm fine."
    }

Get FAQ object by ID:

GET /faq/:id

Delete FAQ object by ID:

DELETE /faq/:id

About

The service provides a simple CRUD API to store/manage frequently asked questions and answers.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages