inceptus

package module
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2021 License: MIT Imports: 0 Imported by: 0

README

inceptus

Docs Go Report Card License

The inceptus is (for now a personal) framework for making (web) servers in go...

The goal of inceptus is to have all the basic boilerplate that go servers need, so you can focus on the application/business/domain logic instead.

Just call bootstrap.sh and have all the boring boilerplate ready, so you can invest time into what actually matters...


Bootstrapping

Clone this repo, follow the simple instructions in bootstrap.sh and you're ready to Go!

$./bootstrap.sh 
Hello there,
this script allows you to quickly bootstrap new golang server based on inceptus/server_template.

Example:
./bootstrap.sh -n shiny_new_project -r github.com/XXXX/shiny_new_project -d /tmp/shiny_new_project

cd /tmp/shiny_new_project; docker-compose -f docker-compose-dev.yaml up;

Usage:
    bootstrap.sh -h Display this help message.

    bootstrap.sh -n PROJECT_NAME -r REPOSITORY -d DIRECTORY
    where:
      - PROJECT_NAME will be used instead of "server_template"
      - REPOSITORY (like github.com/XXX/YYY) will be used instead of:
        "github.com/robitx/inceptus/server_template"
      - DIRECTORY is a folder where you want to boostrap the server


server_template

For more details head over to the server_template readme.

Documentation

Overview

Package inceptus contains lots of useful sub packages.

Directories

Path Synopsis
Package conf provide functions for loading config from yaml file or env variables.
Package conf provide functions for loading config from yaml file or env variables.
Package db provides Pool for communicationg with Postgre database.
Package db provides Pool for communicationg with Postgre database.
Package helpers contains some useful functions, currently: generating uuid, md5 from string, sourceIp..
Package helpers contains some useful functions, currently: generating uuid, md5 from string, sourceIp..
Package life provides application wide context with cancel function and some helper functions to register syscalls for smooth app termination and reloading (conf, logger and such).
Package life provides application wide context with cancel function and some helper functions to register syscalls for smooth app termination and reloading (conf, logger and such).
Package log provides basic logging mechanism.
Package log provides basic logging mechanism.
Package route and its subpackages provides most of what you need for http server.
Package route and its subpackages provides most of what you need for http server.
ctx
Package ctx contains setters and getters for request context.
Package ctx contains setters and getters for request context.
middleware
Package middleware contains middlewares for logging, auth, custom errors and so on.
Package middleware contains middlewares for logging, auth, custom errors and so on.
Package serialize provides unified interface for encoding and decoding data with several implementations (JSON, MsgPack, Gob, ..).
Package serialize provides unified interface for encoding and decoding data with several implementations (JSON, MsgPack, Gob, ..).

Jump to

Keyboard shortcuts

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