本文整理匯總了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)
}