config

package
v0.0.0-...-fe735be Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup

func Setup(configPath string)

Setup DB initialize configuration

Types

type Configuration

type Configuration struct {
	Server   ServerConfiguration
	Database DatabaseConfiguration
}

Configuration ...

var Config *Configuration

Config ...

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
}

DatabaseConfiguration ...

type ServerConfiguration

type ServerConfiguration struct {
	Port             string
	Secret           string
	Mode             string
	GracefulShutdown time.Duration
}

ServerConfiguration ...

Jump to

Keyboard shortcuts

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