mcjimenez / gosrvlib

Go library to provide base service components

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gosrvlib

Go Service Library

This Open Source project contains a collection of high-quality GO (golang) packages.

The packages documentation is available at: https://pkg.go.dev/github.com/Vonage/gosrvlib

This package collection forms the base structure for production-ready web-services.

A new service can be generated by using the command make project CONFIG=project.cfg. The new generated project name, description, etc..., can be set in the file specified via the CONFIG parameter.

Each package follows the same conventions and they can be individually imported in any project.

Go Reference
check Coverage Status Coverage Lines of Code
Go Report Card Quality Gate Status Reliability Rating Maintainability Rating Security Rating
Bugs Vulnerabilities Technical Debt Code Smells


TOC


Quick Start

This project includes a Makefile that allows you to test and build the project in a Linux-compatible system with simple commands.
All the artifacts and reports produced using this Makefile are stored in the target folder.

All the packages listed in the resources/docker/Dockerfile.dev file are required in order to build and test all the library options in the current environment. Alternatively, everything can be built inside a Docker container using the command "make dbuild".

To see all available options:

make help

To build the project inside a Docker container (requires Docker):

make dbuild

An arbitrary make target can be executed inside a Docker container by specifying the "MAKETARGET" parameter:

MAKETARGET='deps mod qa example' make dbuild

The list of make targets can be obtained by typing make

The base Docker building environment is defined in the following Dockerfile:

resources/docker/Dockerfile.dev

To download all dependencies:

make deps

To update the mod file:

make mod

To execute all the default test builds and generate reports in the current environment:

make qa

To format the code (please use this command before submitting any pull request):

make format

Running all tests

Before committing the code, please format it and check if it passes all tests using

DEVMODE=LOCAL make format clean mod deps generate qa example

Examples

Please check the examples folder for an example of a service based on this library.

The following command generates a new project from the example using the data set in the project.cfg file:

make project CONFIG=project.cfg

About

Go library to provide base service components

License:Other


Languages

Language:Go 98.4%Language:Makefile 1.2%Language:Shell 0.4%