Documentation ¶
Index ¶
- Constants
- Variables
- type App
- func (a *App) InitModule(moduleName ModuleName, initFn func() error) *App
- func (a *App) InitModuleIfEnabled(configKey string, moduleName ModuleName, initFn func() error) *App
- func (a *App) PubApi(generatedFn func(eng *gin.Engine, hostPath string) error) *App
- func (a *App) Start()
- func (a *App) StartOnPort(port int)
- type ModuleName
Constants ¶
View Source
const HostPath = "/"
View Source
const HostPort = 80
Variables ¶
View Source
var RasseBuildTime = "2021-06-07 11:08:42 +0800"
View Source
var RasseCommitId = "2c7b03934b96d8b498e3caac1e99796008a0f63f"
View Source
var RasseCommitTime = "2021-06-04 09:11:36 +0000"
View Source
var RasseGoVersion = "go version go1.15.2 linux/amd64"
View Source
var RasseTag = "v1.2.17"
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
Domain, Project, Module string
Modules []ModuleName
Engine *gin.Engine
StartTime time.Time
}
var Instance *App
func (*App) InitModule ¶
func (a *App) InitModule(moduleName ModuleName, initFn func() error) *App
InitModule 加载指定模块
func (*App) InitModuleIfEnabled ¶
func (a *App) InitModuleIfEnabled(configKey string, moduleName ModuleName, initFn func() error) *App
InitModuleIfEnabled 根据配置条件加载模块 首先读取配置 configKey,若为 true 则加载指定模块
func (*App) StartOnPort ¶
type ModuleName ¶
type ModuleName string
const ( ModuleConfig ModuleName = "config" ModuleLog ModuleName = "log" ModuleMonitor ModuleName = "monitor" ModuleGin ModuleName = "gin" ModuleSysAPI ModuleName = "sys-api" ModuleRedis ModuleName = "redis" ModuleOrm ModuleName = "orm" ModuleATQ ModuleName = "atq" ModuleMyOA ModuleName = "myoa" ModuleWorkflow ModuleName = "workflow" ModuleTDMQ ModuleName = "tdmq" ModuleI18N ModuleName = "i18n" ModuleRightV4 ModuleName = "rightv4" MWTracer ModuleName = "mw.tracer" MWXHTTP ModuleName = "mw.xhttp" MWIp ModuleName = "mw.ip" MWSignature ModuleName = "mw.signature" MWAuth ModuleName = "mw.auth" MWQpsLimit ModuleName = "mw.qps-limit" )
Click to show internal directories.
Click to hide internal directories.