configs

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JWTConfig

type JWTConfig struct {
	SigningKey string `mapstructure:"key" json:"key"`
}

JWTConfig jwt 配置

type MysqlConfig

type MysqlConfig struct {
	Host     string `mapstructure:"host"`
	Port     int    `mapstructure:"port"`
	Name     string `mapstructure:"name"`
	Password string `mapstructure:"password"`
	Database string `mapstructure:"database"`
}

MysqlConfig mysql 配置结构体

type RedisConfig

type RedisConfig struct {
	Host     string `mapstructure:"host"`
	Port     int    `mapstructure:"port"`
	Password string `mapstructure:"password"`
}

RedisConfig redis 配置结构体

type ServerConfig

type ServerConfig struct {
	Name        string      `mapstructure:"name"`
	Port        int         `mapstructure:"port"`
	MySql       MysqlConfig `mapstructure:"mysql"`
	Redis       RedisConfig `mapstructure:"redis"`
	LogsAddress string      `mapstructure:"logs_address"`
	Timezone    string      `mapstructure:"timezone"`
	Lang        string      `mapstructure:"lang"`
	JWTKey      JWTConfig   `mapstructure:"jwt"`
}

ServerConfig web 服务相关配置结构体

Jump to

Keyboard shortcuts

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