config

package
v0.0.0-...-2122cde Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitConfig

func InitConfig(config string) (err error)

InitConfig returns error type

Types

type API

type API struct {
	Host string
	Port string
}

API gin服务接口配置

type Environment

type Environment struct {
	Mode string
}

Environment is used for listen settings

type Log

type Log struct {
	Level      string
	Filename   string
	MaxSize    int
	MaxAge     int
	MaxBackups int
}

Log 日志配置

type Mysql

type Mysql struct {
	Host         string
	Port         string
	Database     string
	User         string
	Password     string
	Timezone     string
	MaxOpenConns int
	MaxIdleConns int
	Debug        bool
}

Mysql 数据库配置

type Settings

type Settings struct {
	EnvSetting    Environment
	APISetting    API
	LogSetting    Log
	MysqlSettings Mysql
}

APISettings is config mapping

var Config *Settings

Config is config entry

Jump to

Keyboard shortcuts

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