config

package
v0.0.0-...-a3dbe3d Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Configuration represent the variable of configuration model
	Configuration = &ConfigurationModel{}
)

Functions

func InitDB

func InitDB() (*sqlx.DB, *sqlx.DB, error)

InitDB will create a variable that represent the sqlx.DB

func InitLang

func InitLang() (*language.Config, error)

InitLang will create a variable that represent the language.Config

func InitLog

func InitLog() *logrus.Entry

InitLog will create a variable that represent the logrus.Entry

Types

type ConfigurationModel

type ConfigurationModel struct {
	RunMode        string `json:"run_mode"`
	Port           string `json:"port"`
	DialectMaster  string `json:"dialect_master"`
	DsnMaster      string `json:"dsn_master"`
	IdleConnMaster int    `json:"idle_conn_master"`
	MaxConnMaster  int    `json:"max_conn_master"`
	DialectSlave   string `json:"dialect_slave"`
	DsnSlave       string `json:"dsn_slave"`
	IdleConnSlave  int    `json:"idle_conn_slave"`
	MaxConnSlave   int    `json:"max_conn_slave"`
}

ConfigurationModel represent the configuration model

Jump to

Keyboard shortcuts

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