Socket
Socket
Sign inDemoInstall

github.com/graniticio/granitic/v2

Package Overview
Dependencies
0
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    github.com/graniticio/granitic/v2

Package granitic provides methods for configuring and starting a Granitic application. To get started with Granitic, visit https://granitic.io/getting-started-installing-granitic This package provides entry point functions for your application to hand control over to Granitic. Typically your application will have a single, minimal file in its main package similar to: You can build a skeleton Granitic application by running the grnc-project tool, which will generate a main file, empty configuration file and empty component definition file. The uses and syntax of these files are described in the config and ioc packages respectively. A Granitic application needs two things to start: 1. A list of components to host in its IoC container. 2. One or more JSON configuration files containing environment-specific settings for your application (passwords, hostnames etc.) Folders and files containing configuration are by default expected to be stored in This folder can contain any number of files or sub-directories. This location can be overridden by using the -c argument when starting your application from the command line. This argument is expected to be a comma separated list of file paths, directories or HTTP URLs to JSON files or any mixture of the above. When starting your application from the command, Granitic takes control of processing command line arguments. By default your application will support the following arguments. If your application needs to perform command line processing and you want to prevent Granitic from attempting to parse command line arguments, you should start Granitic using the alternative: where you are expected to programmatically define the initial settings.


Version published

Readme

Source

Granitic

Granitic is a framework and lightweight application server for building and running web and micro services written in Go.

Features

  • A web service aware HTTP server with support for load-management and Identity Access Management (IAM) integration.
  • A fully-featured Inversion of Control (IoC) container.
  • A flexible and customisable request processing pipeline including:
    • Full support for JSON and plain XML web services.
    • Automatic binding of request bodies, query parameters and path parameters.
    • Declarative, rule driven validation.
    • A comprehensive error management system including full templating of all system and application error messages and HTTP response code mapping.
  • Component based error logging.
  • Query management for data sources.
  • RDMBS integration with an interface designed to promote more readable code.
  • A flexible task scheduler

Additionally, Granitic is designed to be 'DevOps friendly' and offers:

  • Fully externalised configuration, with support for configuration files stored locally or served over HTTP.
  • Low memory footprint and fast startup times (compared to JVM/CLR equivalents).
  • Runtime control of deployed applications (including suspension/resumption).
  • Runtime control of log levels (e.g. temporarily enable debugging without restarts).
  • Runtime monitoring and control of scheduled activities.

Getting started

Read and follow the installation instructions then work through the tutorials

The GoDoc for Granitic can be found here

Visit the granitic.io website to read the complete reference manual

Testing

Once you have followed the installation instructions, you can run Granitic's unit tests by running

cd $GOPATH/src/github.com/graniticio/granitic
go test ./...

Contributing

We are always delighted to receive contributions from the community. Please read the Contributing and Code of Conduct guides and then have a look at the open issues

Get in touch

FAQs

Last updated on 11 Sep 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc