Skip to content

touchtechnologies-product/go-blueprint-clean-architecture

Folders and files

NameName
Last commit message
Last commit date
Sep 23, 2021
Oct 4, 2021
Sep 23, 2021
Jun 25, 2020
Oct 5, 2020
Oct 15, 2020
Sep 23, 2021
Oct 15, 2020
Oct 1, 2021
Sep 23, 2021
Oct 15, 2020
Oct 15, 2020
Oct 9, 2020
Sep 23, 2021
Sep 23, 2021
Oct 7, 2020
Oct 1, 2021

Repository files navigation

Touch Go Blueprint 😸

A starter kit for Golang API project development

Feature

  • Company creation
  • Staff creation
  • Staff update
  • Get staff by company ID

System requirements Development

  • Docker
  • Jaeger
  • MongoDB

Prototype

Touch Go Blueprint

Api Specification

URL: example.swagger-api-touch.com

Pre-Require

Mockery

GO111MODULE=off go get github.com/vektra/mockery/.../

Swagger

go get -u github.com/swaggo/swag/cmd/swag
go get -u github.com/swaggo/gin-swagger
go get -u github.com/swaggo/files

Installation

git clone https://github.com/touchtechnologies-product/go-blueprint-clean-architecture
cd go-blueprint-clean-architecture
go mod download

Testing

unit testing command

  go test ./... -cover

integrating testing command

  go test ./... -tags integration

Generate Mocks

generate mocks from interfaces for unit testing

  go generate ./...

Local development

development in local start mongodb jaeger

cd development
source ./local.env
docker-compose up -d

Tracing with Jaeger

please see in the example code implement jaeger wrap service service/company/withtracer

Others

  • Uber golang style guide link
  • Practical Go: Real world advice for writing maintainable Go programs link