| OLD | NEW |
| 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 } |
| OLD | NEW |