This project has the objective of being a skeleton for new micro services projects
Gomicro sets a basic structure of a project using the clean architecture.
With this skeleton you can create new APIs, where it will have echo installed already.
appcontext/context.go
: is ourcontainer
of services and object within the project.config/
: defines all necessary configuration that your application needs to run.controller/
: defines all controllers of the project.domain/
: defines all entities of the project.gateway/
: defines all connections with the external world, e.g. MongoDB, MySQL.usecase/
: defines the use cases and business rules of the application.version/
: defines embed version of the project.
go build
Run build.sh
script to set embed version and it used build info using commit hash.
bash build.sh 1.0.0
Example:
curl http://localhost:8080/gomicro/v1/health | jq .
{
"status": "UP",
"version": "0.0.1",
"build_info": "4e27105efd550ffbf8e225673a5a8fb9bfceb859"
}