Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3525)

Unified Diff: appengine/gaemiddleware/routes.go

Issue 2043423004: Make HTTP middleware easier to use (Closed) Base URL: https://github.com/luci/luci-go@master
Patch Set: gaemiddleware: add middleware func for WithProd Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « appengine/gaemiddleware/context.go ('k') | appengine/gaetesting/middleware.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/gaemiddleware/routes.go
diff --git a/appengine/gaemiddleware/routes.go b/appengine/gaemiddleware/routes.go
index e52cf252dff223198b99c65d8219e718aa4b9a4f..d9da1d5ed85e85eaf2d5a7bc712d66f0822bd711 100644
--- a/appengine/gaemiddleware/routes.go
+++ b/appengine/gaemiddleware/routes.go
@@ -1,26 +1,25 @@
// Copyright 2015 The LUCI Authors. All rights reserved.
// Use of this source code is governed under the Apache License, Version 2.0
// that can be found in the LICENSE file.
package gaemiddleware
import (
- "github.com/julienschmidt/httprouter"
- "github.com/luci/luci-go/server/middleware"
+ "github.com/luci/luci-go/server/router"
"github.com/luci/luci-go/server/settings/admin"
gaeauth "github.com/luci/luci-go/appengine/gaeauth/server"
"github.com/luci/luci-go/appengine/tsmon"
)
// InstallHandlers installs HTTP handlers for various default routes.
//
// These routes are needed for various services provided in BaseProd context to
// work (e.g. authentication related routes, time series monitoring, etc).
//
// 'base' is expected to be BaseProd or its derivative.
-func InstallHandlers(r *httprouter.Router, base middleware.Base) {
- gaeauth.InstallWebHandlers(r, base)
+func InstallHandlers(r *router.Router, base router.MiddlewareChain) {
+ gaeauth.InstallHandlers(r, base)
tsmon.InstallHandlers(r, base)
admin.InstallHandlers(r, base, &gaeauth.UsersAPIAuthMethod{})
}
« no previous file with comments | « appengine/gaemiddleware/context.go ('k') | appengine/gaetesting/middleware.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698