config

package
v0.0.0-...-7a34eef Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DbConfig

type DbConfig struct {
	AutoMigrate bool
	DbType      string
	DbHost      string
	DbPort      int
	DbName      string
	DbUser      string
	DbPassword  string

	DbMaxIdleConns int
	DbMaxOpenConns int
	// unit: minute
	DbConnMaxLifetime int
}

DbConfig 数据库相关配置

type Env

type Env struct {
	AppName       string
	Debug         bool
	LogPath       string
	LogMaxSize    int
	LogMaxAge     int
	LogMaxBackups int
	LogIsCompress bool

	ServerConfig
	DbConfig
}

Env 环境配置参数结构体

func GetEnv

func GetEnv() *Env

GetEnv 获取环境配置

type ServerConfig

type ServerConfig struct {
	ServerPort     string
	ReadTimeout    int64
	WriteTimeout   int64
	MaxHeaderBytes int
}

ServerConfig 服务器配置

Jump to

Keyboard shortcuts

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