# README
Learning golang
The purpose of this application is to become familiar with the Go language.
The app is called "myapp" and it will surely be an e-commerce application with an API server, a frontend and a mongodb backend
A second objective will be to also provide the k8s deployments in a separated repository (best practice)
Documentation generation and test execution is mandatory
Requirements
- Golang
- $GOPATH in the $PATH
- Docker-cli
Build
Some docker images myapp
are built by the following command:
make build
Run
The docker image built can be run:
make run
Help
In order to find the possible targets of the Makefile
make help
# Functions
Version godoc @Summary Version @Description Version of API-server @Accept json @Produce json @Success 200 {string} Version "version" @Router /api/v1/version [get].
ListProducts godoc @Summary List products @Description Get a list of all products known @Tags products @Accept json @Produce json @Success 200 {array} models.Product @Router /api/v1/products [get].
Ping godoc @Summary Ping @Description Ping method for API Server @Accept json @Produce json @Success 200 {object} models.Ping "ping !" @Router /api/v1/ping [get].
ShowProduct godoc @Summary Show product by ID @Description Get a product by its ID @Tags products @Param id path string true "The ID of the product" @Accept json @Produce json @Success 200 {object} models.Product @Failure 404 {string} Error "error" @Router /api/v1/products/{id} [get].