本文整理汇总了Golang中github.com/ursiform/forest.App.InstallWare方法的典型用法代码示例。如果您正苦于以下问题:Golang App.InstallWare方法的具体用法?Golang App.InstallWare怎么用?Golang App.InstallWare使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/ursiform/forest.App
的用法示例。
在下文中一共展示了App.InstallWare方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: InstallSessionWares
func InstallSessionWares(app *forest.App, manager SessionManager) {
app.InstallWare("SessionDel",
SessionDel(app, manager), forest.WareInstalled)
app.InstallWare("SessionGet",
SessionGet(app, manager), forest.WareInstalled)
app.InstallWare("SessionSet",
SessionSet(app, manager), forest.WareInstalled)
}
示例2: InstallErrorWares
func InstallErrorWares(app *forest.App) {
app.InstallWare("BadRequest",
ErrorsBadRequest(app), forest.WareInstalled)
app.InstallWare("Conflict",
ErrorsConflict(app), forest.WareInstalled)
app.InstallWare("MethodNotAllowed",
ErrorsMethodNotAllowed(app), forest.WareInstalled)
app.InstallWare("NotFound",
ErrorsNotFound(app), forest.WareInstalled)
app.InstallWare("ServerError",
ErrorsServerError(app), forest.WareInstalled)
app.InstallWare("Unauthorized",
ErrorsUnauthorized(app), forest.WareInstalled)
}
示例3: InstallSecurityWares
func InstallSecurityWares(app *forest.App) {
app.InstallWare("Authenticate",
Authenticate(app), forest.WareInstalled)
app.InstallWare("CSRF",
CSRF(app), forest.WareInstalled)
}
示例4: InstallBodyParser
func InstallBodyParser(app *forest.App) {
app.InstallWare("BodyParser", BodyParser(app), forest.WareInstalled)
}