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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « appengine/gaemiddleware/context.go ('k') | appengine/gaetesting/middleware.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The LUCI Authors. All rights reserved. 1 // Copyright 2015 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0 2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file. 3 // that can be found in the LICENSE file.
4 4
5 package gaemiddleware 5 package gaemiddleware
6 6
7 import ( 7 import (
8 » "github.com/julienschmidt/httprouter" 8 » "github.com/luci/luci-go/server/router"
9 » "github.com/luci/luci-go/server/middleware"
10 "github.com/luci/luci-go/server/settings/admin" 9 "github.com/luci/luci-go/server/settings/admin"
11 10
12 gaeauth "github.com/luci/luci-go/appengine/gaeauth/server" 11 gaeauth "github.com/luci/luci-go/appengine/gaeauth/server"
13 "github.com/luci/luci-go/appengine/tsmon" 12 "github.com/luci/luci-go/appengine/tsmon"
14 ) 13 )
15 14
16 // InstallHandlers installs HTTP handlers for various default routes. 15 // InstallHandlers installs HTTP handlers for various default routes.
17 // 16 //
18 // These routes are needed for various services provided in BaseProd context to 17 // These routes are needed for various services provided in BaseProd context to
19 // work (e.g. authentication related routes, time series monitoring, etc). 18 // work (e.g. authentication related routes, time series monitoring, etc).
20 // 19 //
21 // 'base' is expected to be BaseProd or its derivative. 20 // 'base' is expected to be BaseProd or its derivative.
22 func InstallHandlers(r *httprouter.Router, base middleware.Base) { 21 func InstallHandlers(r *router.Router, base router.MiddlewareChain) {
23 » gaeauth.InstallWebHandlers(r, base) 22 » gaeauth.InstallHandlers(r, base)
24 tsmon.InstallHandlers(r, base) 23 tsmon.InstallHandlers(r, base)
25 admin.InstallHandlers(r, base, &gaeauth.UsersAPIAuthMethod{}) 24 admin.InstallHandlers(r, base, &gaeauth.UsersAPIAuthMethod{})
26 } 25 }
OLDNEW
« 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