config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DEV represents development environment
	DEV = "develop"
	// PRD represents production environment
	PRD = "production"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EnvConfig

type EnvConfig struct {
	Database struct {
		Dialect   string `json:"dialect"`
		Host      string `json:"host"`
		Port      int    `json:"port"`
		Dbname    string `json:"dbname"`
		Username  string `json:"username"`
		Password  string `json:"password"`
		Migration bool   `json:"migration"`
	} `json:"database"`
	Env struct {
		Environment string `json:"environment"`
	} `json:"env"`
	Log struct {
		RequestLogFormat string `json:"request_log_format"`
	} `json:"log"`
	ZapConfig zap.Config        `json:"zap_config" yaml:"zap_config"`
	LogRotate lumberjack.Logger `json:"log_rotate" yaml:"log_rotate"`
}

func Load

func Load() *EnvConfig

Load reads the settings written to the yml file

Jump to

Keyboard shortcuts

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