Skip to content

This project is a template generator based on Golang focused on a Rest-API.

Notifications You must be signed in to change notification settings

wizeline/CA-Microservices-Go

Repository files navigation

Code Accelerator Golang Microservices (CAM-Go)

This project is a template generator based on Golang mainly focused on microservices.
The purpose is to accelerate the development by providing a base solution avoiding starting from scratch.

Requirements

  • GO 1.22 or higher
  • Docker
  • Docker-Compose

Architecture

High-Level Architecture Diagram. (to be defined)

Features

  • Hexagonal Architecture based
  • Highly scalable
  • Local-Dev: handy management tools through make statements
  • GitHub Actions (CI/CD) base layout
  • Mockery (mocks)
  • Viper support (env configuration)
  • Chi (router)
  • ZeroLog (logger)
  • PostgreSQL database support
  • PgAdmin PostgreSQL database Web-GUI

Generate Mocks with Mockery

CAM-Go applications use Mockery to generate mocks. This tool is able to handy generate and mantain your mock objects. It uses the stretchr/testify/mock package. Moreover, reduce the boilerplate code over mocking.

To add new mock objects please edit the Makefile file look for the mocks target, and according to the Mockery's documentation add the specific rule.

Before start, please make sure to install mockery command line tool.

To automatically generate mocks, run make mocks at the top level of the project/repository.

Local Dev

CAM-Go uses Docker and Docker-compose to generate a containerized environment with tools(make statements) to speed up development time. Ensure you have configured the services environment variables in the deployments/.env file.

Run make help to learn how to use all commands to handle your application environment.

About

This project is a template generator based on Golang focused on a Rest-API.

Resources

Stars

Watchers

Forks

Packages

No packages published