Giter Site home page Giter Site logo

kit's Introduction

Overview

This is a compilation of different tools that we use on multiple services written in Go.

It uses an extremely flexible approach, allowing any kind of database, cloud provider, log, and so on to be created.

Installation

go get github.com/sanservices/kit

Download

clone the repository:

git clone [email protected]:sanservices/kit.git

Contribute

Use issues for everything

  • For a small change, just send a PR.
  • For bigger changes open an issue for discussion before sending a PR.
  • PR should have:
    • Test case
    • Documentation
    • Example (If it makes sense)
  • You can also contribute by:
    • Reporting issues
    • Suggesting new features or enhancements
    • Improve/fix documentation

Test

Use the following command to run the tests:

make test

You can also run the linter (make staticcheck), find code smells (make vet) and print the test coverage (make coverage).

All four commands can be run with make scan-cli.

Their result can also be saved in a report folder in the current working directory, using make scan.

Also, you can see the make command with more details by doing make help on the shell.

Organization

bundle:

It is a directory in the project that groups related resources together in one place. It's a package where all the services are initialized and used in other repositories.

config:

It reads the given file to export configuration

import (
	"github.com/sanservices/kit/bundle"
	"github.com/sanservices/kit/config"
)
func main(){
	//read configuration and initialize services
	cfg := config.Read(config.Env(configEnv))
	//make a new instance of bundle
	b := new(bundle.All)
	//initialize all the services considering the config (*.json) file
	b.Initialize(cfg)
    //example of calling mongodb function
    b.Services.MongoDB.FindAllByFilter(...)
  }

kit's People

Contributors

adenierosorto avatar disturb01 avatar disturb16 avatar jlvelez avatar theonlyrobbie avatar andrefk avatar a-berahman avatar

Stargazers

Amir Monfared avatar

Watchers

josue rodriguez avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.