Documentation
¶
Overview ¶
Package app 核心功能的实现
Index ¶
- type App
- func (app *App) Close() error
- func (app *App) Debug() bool
- func (app *App) File(path ...string) string
- func (app *App) Handler() (http.Handler, error)
- func (app *App) Install(version string) error
- func (app *App) LoadConfig(path string, v interface{}) error
- func (app *App) Modules() []*module.Module
- func (app *App) NewModule(name, desc string, deps ...string) *module.Module
- func (app *App) Serve() error
- func (app *App) SetMiddleware(m middleware.Middleware) *App
- func (app *App) Shutdown() (err error)
- func (app *App) URL(path string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App 程序运行实例
func (*App) LoadConfig ¶
LoadConfig 从配置文件目录加载配置文件到 v 中
func (*App) SetMiddleware ¶
func (app *App) SetMiddleware(m middleware.Middleware) *App
SetMiddleware 设置一个全局的中间件,多次设置,只有最后一次会启作用。
Directories
¶
| Path | Synopsis |
|---|---|
|
Package middlewares 提供一系列中间
|
Package middlewares 提供一系列中间 |
|
Package modules 处理模块信息
|
Package modules 处理模块信息 |
|
Package webconfig web.yaml 配置文件对应的内容。
|
Package webconfig web.yaml 配置文件对应的内容。 |
Click to show internal directories.
Click to hide internal directories.