configs

package
v0.0.0-...-a0f9f5f Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Server = &ServerConfig{}
	Upload = &UploadConfig{}
	Mysql  = &MysqlConfig{}
	Jwt    = &JwtConfig{}
)

逐个加载,方便使用

View Source
var Once sync.Once

Functions

func Load

func Load()

Types

type JwtConfig

type JwtConfig struct {
	Secret          string `ini:"secret"`
	RemeberDuration uint64 `ini:"remeber_duration"`
}

type MysqlConfig

type MysqlConfig struct {
	Host        string `ini:"host"`
	Username    string `ini:"username"`
	Password    string `ini:"password"`
	Port        uint   `ini:"port"`
	Database    string `ini:"database"`
	Charset     string `ini:"charset"`
	TablePrefix string `ini:"table_prefix"`
}

type ServerConfig

type ServerConfig struct {
	Host string `ini:"host"`
	Port uint   `ini:"port"`
}

type UploadConfig

type UploadConfig struct {
	UploadRootPath string `ini:"upload_root_path"`
}

Jump to

Keyboard shortcuts

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