setting

package
v0.0.0-...-d7ff5e6 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppSetting = &App{}
View Source
var Cfg *ini.File
View Source
var CorsSetting = &Cors{}
View Source
var DatabaseSetting = &Database{}
View Source
var EmailSetting = &Email{}
View Source
var ExplorerSetting = &Explorer{}
View Source
var RedisSetting = &Redis{}
View Source
var ServerSetting = &Server{}
View Source
var TokenSetting = &Token{}

Functions

func Setup

func Setup()

Setup initialize the configuration instance

Types

type App

type App struct {
	JwtSecret string
	PageSize  int
	PrefixUrl string

	RuntimeRootPath string

	ImageSavePath  string
	ImageMaxSize   int
	ImageAllowExts []string

	ExportSavePath string
	QrCodeSavePath string
	FontSavePath   string

	LogSavePath string
	LogSaveName string
	LogFileExt  string
	TimeFormat  string
}

type Cors

type Cors struct {
	CorsDomain  string
	AllowOrigin []string
}

type Database

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

type Email

type Email struct {
	MailHost     string
	MailPort     string
	MailUserName string
	MailName     string
	MailPassword string
}

type Explorer

type Explorer struct {
	ExplorerUrl string
}

type Redis

type Redis struct {
	Host        string
	Password    string
	MaxIdle     int
	MaxActive   int
	IdleTimeout time.Duration
}

type Server

type Server struct {
	RunMode      string
	Domain       string
	HttpPort     int
	WSHttpPort   int
	ReadTimeout  time.Duration
	WriteTimeout time.Duration
}

type Token

type Token struct {
	AccessTokenExpire  time.Duration
	RefreshTokenExpire time.Duration
}

Jump to

Keyboard shortcuts

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