config

package
v0.0.0-...-894796f Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppConf = &App{}

AppConf app配置

View Source
var DatabaseConf = &Database{}

DatabaseConf 数据库配置

View Source
var ServerConf = &Server{}

ServerConf 服务器配置

Functions

func Setup

func Setup(path string)

设置配置 path: 配置文件的路径

Types

type App

type App struct {
	RunMode       string
	JwtSecret     string
	ImageSavePath string
}

App App配置结构体

type Database

type Database struct {
	Type        string
	User        string
	Password    string
	Host        string
	Name        string
	TablePrefix string
}

Database 数据库配置映射

type Server

type Server struct {
	HTTPPort     int
	ReadTimeout  time.Duration
	WriteTimeout time.Duration
}

Server 服务器配置映射

Jump to

Keyboard shortcuts

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