Tools for building REST APIs in Go.
- api/middlewares: provides Middlewares for panic recovering and JWT authentication & role-based authorization.
- api/utils: provides JSON success & error responses with http status codes management and a function for unmarshalling JSON files into structs.
- infrastructure: provides MongoDB and PostgreSQL connection functions, a migration runner for PostgresDB and a generic implemention of the Repository interface for MongoDB.
- mocks: provides mock creation functions for MongoDB and PostgreSQL.
- repository: provides an interface of the repository pattern with CRUD operations.
- wrappers: provides convenient wraps for having custom types.
- testutils: provides convenient testing helper functions.
- Create an empty repository and clone it.
- Execute:
go mod init github.com/{username}/{repository_name}
go get github.com/sergicanet9/scv-go-tools/v3
make test-unit
make cover
Sergi Canet Vela
This project is licensed under the terms of the MIT license.