config

package
v0.0.0-...-e7768f7 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// DB configs
	DbType     string `default:"mysql"` // CB_DBTYPE
	DbHost     string `required:"true"` // CB_DBHOST
	DbPort     int    `default:"3306"`  // CB_DBPORT
	DbUser     string `default:"root"`  // CB_DBUSER
	DbPassword string // CB_DBPASSWORD
	DbName     string `default:"contactsbook"` // CB_DBNAME

	// Server util
	Port int `default:"80"`
}

func GetInstance

func GetInstance() *Config

GetInstance will create or get the util singleton instance.

func (*Config) Reload

func (c *Config) Reload() error

Reload will reload all the ENV configs

Jump to

Keyboard shortcuts

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