scv-go-framework

module
v2.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 8, 2021 License: MIT

README

scv-go-framework v2

Base framework for creating REST APIs in Go.

Included packages

  • INFRASTRUCTURE/MONGO: provides MongoDB connection function and Repository Pattern with CRUD operations using the official mongo-driver package.

  • INFRASTRUCTURE/POSTGRES: provides PostgreSQL connection function and an interface to implement the Repository Pattern using Go´s included database/sql package.

  • API/UTILS: provides JSON success/error responses with logs and Middlewares for error handling and JWT token-based authorization.

Usage steps

  1. Create an empty repository and clone it.
  2. Execute:
go mod init github.com/{username}/{repository_name}
go get github.com/sergicanet9/scv-go-framework 

Usage examples

go-postgres-restapi
go-mongo-restapi

Author

Sergi Canet Vela

License

This project is licensed under the terms of the MIT license.

Directories

Path Synopsis
api
infrastructure

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL