conf

package
v0.0.0-...-819b816 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup

func Setup(confPath string)

SetupDB initialize configuration

Types

type Conf

type Conf struct {
	Server ServerConf
	Db     DBConf
}
var Config *Conf

func GetConf

func GetConf() *Conf

GetConf helps you to get configuration data

type DBConf

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

func (DBConf) GormOpen

func (d DBConf) GormOpen() (dialect, datasource string)

type ServerConf

type ServerConf struct {
	Port   int
	Secret string
	Mode   string
}

Jump to

Keyboard shortcuts

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