Skip to content

Template for starting a new microservice.

License

Notifications You must be signed in to change notification settings

Ubivius/microservice-template

Repository files navigation

Microservice-Template

Template for microservices.

This template can be used to create another microservice without having to write any of the boilerplate code.

Product endpoints

GET /products Returns json data about every product.

GET /products/{id} Returns json data about a specific product. id=[string]

GET /health/live Returns a Status OK when live.

GET /health/ready Returns a Status OK when ready or an error when dependencies are not available.

POST /products Add new product with specific data.
Data Params

{
  "name":        "string, required",
  "sku":         "string, required",
  "description": "string",
  "price":       "float",
}

PUT /products Update product data
Data Params

{
  "id":          "string, required",
  "name":        "string",
  "sku":         "string",
  "description": "string",
  "price":       "float",
}

DELETE /products/{id} Delete product. id=[string]

Fuzzing To start fuzzing, simply build and run:

$ cd pkg/fuzzing
$ go-fuzz-build
$ go-fuzz

This will generate and test inputs in an infinite loop. You need at least an initial input named "0" inside the corpus folder. For more information, refer to go-fuzz documentation.

About

Template for starting a new microservice.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published