setting

package
v0.0.0-...-95714bc Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppConfig = new(App)

Functions

func SetUp

func SetUp() (err error)

Types

type App

type App struct {
	Name    string `mapstructure:"Name"`
	Mode    string `mapstructure:"Mode"`
	Host    string `mapstructure:"Host"`
	Port    int    `mapstructure:"Port"`
	Version string `mapstructure:"Version"`

	ImagePrefixUrl string `mapstructure:"ImagePrefixUrl"`
	ImageSavePath  string `mapstructure:"ImageSavePath"`
	ImageMaxSize   string `mapstructure:"ImageMaxSize"`
	ImageAllowExt  string `mapstructure:"ImageAllowExt"`

	*LogConfig   `mapstructure:"log"`
	*MySqlConfig `mapstructure:"mysql"`
	*RedisConfig `mapstructure:"redis"`
}

type LogConfig

type LogConfig struct {
	Level      string `mapstructure:"Level"`
	Filename   string `mapstructure:"Filename"`
	MaxSize    int    `mapstructure:"MaxSize"`
	MaxAge     int    `mapstructure:"MaxAge"`
	MaxBackups int    `mapstructure:"MaxBackups"`
}

type MySqlConfig

type MySqlConfig struct {
	Type         string `mapstructure:"Type"`
	User         string `mapstructure:"User"`
	Password     string `mapstructure:"Password"`
	Host         string `mapstructure:"Host"`
	Port         int    `mapstructure:"Port"`
	DB           string `mapstructure:"DB"`
	TablePrefix  string `mapstructure:"TablePrefix"`
	MaxOpenConns int    `mapstructure:"MaxOpenConns"`
	MaxIdleConns int    `mapstructure:"MaxIdleConns"`
}

type RedisConfig

type RedisConfig struct {
	Host         string `mapstructure:"Host"`
	Port         int    `mapstructure:"Port"`
	Password     string `mapstructure:"Password"`
	DB           int    `mapstructure:"DB"`
	PoolSize     int    `mapstructure:"PoolSize"`
	MaxOpenConns int    `mapstructure:"MaxOpenConns"`
	MaxIdleConns int    `mapstructure:"MaxIdleConns"`
	Timeout      int    `mapstructure:"Timeout"`
}

Jump to

Keyboard shortcuts

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