config

package
v0.0.0-...-15cfdef Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup

func Setup(configPath string)

SetupDB initialize configuration

Types

type Configuration

type Configuration struct {
	Server   ServerConfiguration
	Database DatabaseConfiguration
}
var Config *Configuration

func GetConfig

func GetConfig() *Configuration

GetConfig helps you to get configuration data

type DatabaseConfiguration

type DatabaseConfiguration struct {
	Driver       string
	Dbname       string
	Username     string
	Password     string
	Host         string
	Port         string
	MaxLifetime  int
	MaxOpenConns int
	MaxIdleConns int
}

type ServerConfiguration

type ServerConfiguration struct {
	Port   string
	Secret string
	Mode   string
}

Jump to

Keyboard shortcuts

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