Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Bootstrapper ¶
type Bootstrapper struct { //内置继承iris类 *iris.Application //两个基本的标识信息 AppName string AppOwner string //创建时间 AppSpawnDate time.Time }
Bootstrapper 使用Go内建的嵌入机制(匿名嵌入),允许类型之前共享代码和数据 (Bootstrapper继承和共享 iris.Application ) 参考文章: https://hackthology.com/golangzhong-de-mian-xiang-dui-xiang-ji-cheng.html
func New ¶
func New(appName, appOwner string, cfgs ...Configurator) *Bootstrapper
New 实例化 cfgs ...Configurator更多参数
func (*Bootstrapper) Bootstrap ¶
func (b *Bootstrapper) Bootstrap() *Bootstrapper
Bootstrap prepares our application. Returns itself. 初始化
func (*Bootstrapper) Configure ¶
func (b *Bootstrapper) Configure(cs ...Configurator)
Configure accepts configurations and runs them inside the Bootstraper's context. 给web的配置方法
func (*Bootstrapper) Listen ¶
func (b *Bootstrapper) Listen(addr string, cfgs ...iris.Configurator)
Listen 监听 指定“addr”的http服务器
func (*Bootstrapper) SetupErrorHandlers ¶
func (b *Bootstrapper) SetupErrorHandlers()
SetupErrorHandlers 异常处理
func (*Bootstrapper) SetupViews ¶
func (b *Bootstrapper) SetupViews(viewsDir string)
SetupViews 初始化模板 传入一个目录
Click to show internal directories.
Click to hide internal directories.