config

package
v0.0.0-...-e026bce Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	Database Database
	Server   Server
	Log      Log
	Router   Router
}

Configuration struct have all fields from configuration JSON file

func Load

func Load(path string) (*Configuration, error)

Load loads configuration from path

type Database

type Database struct {
	Host     string
	Port     string
	User     string
	Password string
	Name     string
}

Database defines DB configuration

type Log

type Log struct {
	Filename string
}

Log defines logging configuration (log filename)

type Router

type Router struct {
	Release bool
}

Router defines router (Gin) configuration

type Server

type Server struct {
	Address string
}

Server defines http server configuration (address and port)

Jump to

Keyboard shortcuts

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