v1.1.2 Latest Latest

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

Go to latest
Published: Jul 9, 2021 License: Apache-2.0 Imports: 10 Imported by: 6




View Source
const (
	Version    = "1.0.0"
	AppTypeWeb = 1


View Source
var (
	App                   *WEBApplication
	DBEngineXORM          xorm.EngineInterface
	DBEngineGORM          *gorm.DB
	LoggerSetting         *setting.LoggerSettingS
	AccessLogger          log.LoggerContextIface
	ErrorLogger           log.LoggerContextIface
	BusinessLogger        log.LoggerContextIface
	ServerSetting         *setting.ServerSettingS
	JwtSetting            *setting.JwtSettingS
	MysqlSettingMicroMall *setting.MysqlSettingS
	RedisSettingMicroMall *setting.RedisSettingS
	G2CacheSetting        *setting.G2CacheSettingS
	EmailConfigSetting    *EmailConfigSettingS
	VerifyCodeSetting     *VerifyCodeSettingS
	RedisPoolMicroMall    *redis.Pool
	GPool                 *goroutine.Pool
	G2CacheEngine         *g2cache.G2Cache


This section is empty.


type Application

type Application struct {
	Name       string
	Type       int32
	LoadConfig func() error
	SetupVars  func() error
	StopFunc   func() error

Application ...

type CronTask

type CronTask struct {
	Cron     string
	TaskFunc func()

type EmailConfigSettingS

type EmailConfigSettingS struct {
	User     string `json:"user"`
	Password string `json:"password"`
	Host     string `json:"host"`
	Port     string `json:"port"`

type ListenerApplication

type ListenerApplication struct {
	EndPort        int
	MonitorEndPort int
	Network        string
	ReadTimeout    int
	WriteTimeout   int
	// 监控
	Mux *http.ServeMux
	// Listener Server Accept 后的自定义事件
	EventHandler func(context.Context, []byte) ([]byte, error)

type VerifyCodeSettingS

type VerifyCodeSettingS struct {
	ExpireMinute int `json:"expire_minute"`
	//number of requests to send verification code in a period of time
	SendPeriodLimitCount int `json:"send_period_limit_count"`
	//limit the timeout period of request to send verification code within a period of time
	SendPeriodLimitExpireSecond int64 `json:"send_period_limit_expire_second"`
	//request to send verification code interval time
	SendIntervalExpireSecond int64 `json:"send_interval_expire_second"`

type WEBApplication

type WEBApplication struct {
	EndPort        int
	MonitorEndPort int
	// 监控
	Mux *http.ServeMux
	// RegisterHttpRoute 定义HTTP router
	RegisterHttpRoute func() *gin.Engine
	// 系统定时任务
	RegisterTasks func() []CronTask

ListenerApplication ...

Jump to

Keyboard shortcuts

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