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

Side by Side Diff: go/src/infra/appengine/sheriff-o-matic/main.go

Issue 2191563003: [som] fix ts_mon housekeeping/routing (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 4 years, 4 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 | « go/src/infra/appengine/sheriff-o-matic/app.yaml ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Package som implements HTTP server that handles requests to default module. 5 // Package som implements HTTP server that handles requests to default module.
6 package som 6 package som
7 7
8 import ( 8 import (
9 "crypto/sha1" 9 "crypto/sha1"
10 "encoding/json" 10 "encoding/json"
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 server.CookieAuth, 567 server.CookieAuth,
568 &server.InboundAppIDAuthMethod{}, 568 &server.InboundAppIDAuthMethod{},
569 } 569 }
570 return gaemiddleware.BaseProd().Extend( 570 return gaemiddleware.BaseProd().Extend(
571 auth.Use(methods), 571 auth.Use(methods),
572 ) 572 )
573 } 573 }
574 574
575 //// Routes. 575 //// Routes.
576 func init() { 576 func init() {
577
577 settings.RegisterUIPage(settingsKey, settingsUIPage{}) 578 settings.RegisterUIPage(settingsKey, settingsUIPage{})
578 579
579 r := router.New() 580 r := router.New()
580 basemw := base() 581 basemw := base()
581 authmw := basemw.Extend(auth.Authenticate) 582 authmw := basemw.Extend(auth.Authenticate)
582 583
583 gaemiddleware.InstallHandlers(r, basemw) 584 gaemiddleware.InstallHandlers(r, basemw)
584 r.GET("/api/v1/trees/", authmw, getTreesHandler) 585 r.GET("/api/v1/trees/", authmw, getTreesHandler)
585 r.GET("/api/v1/alerts/:tree", authmw, getAlertsHandler) 586 r.GET("/api/v1/alerts/:tree", authmw, getAlertsHandler)
586 r.POST("/api/v1/alerts/:tree", authmw, postAlertsHandler) 587 r.POST("/api/v1/alerts/:tree", authmw, postAlertsHandler)
587 r.GET("/api/v1/annotations/", authmw, getAnnotationsHandler) 588 r.GET("/api/v1/annotations/", authmw, getAnnotationsHandler)
588 r.POST("/api/v1/annotations/:annKey/:action", authmw, postAnnotationsHan dler) 589 r.POST("/api/v1/annotations/:annKey/:action", authmw, postAnnotationsHan dler)
589 r.GET("/api/v1/bugqueue/:tree", authmw, getBugQueueHandler) 590 r.GET("/api/v1/bugqueue/:tree", authmw, getBugQueueHandler)
590 r.GET("/api/v1/revrange/:start/:end", basemw, getRevRangeHandler) 591 r.GET("/api/v1/revrange/:start/:end", basemw, getRevRangeHandler)
591 592
592 rootRouter := router.New() 593 rootRouter := router.New()
593 rootRouter.GET("/*path", authmw, indexPage) 594 rootRouter.GET("/*path", authmw, indexPage)
594 595
595 http.DefaultServeMux.Handle("/api/", r) 596 http.DefaultServeMux.Handle("/api/", r)
596 http.DefaultServeMux.Handle("/admin/", r) 597 http.DefaultServeMux.Handle("/admin/", r)
597 http.DefaultServeMux.Handle("/auth/", r) 598 http.DefaultServeMux.Handle("/auth/", r)
598 http.DefaultServeMux.Handle("/_ah/", r) 599 http.DefaultServeMux.Handle("/_ah/", r)
600 http.DefaultServeMux.Handle("/internal/", r)
601
599 http.DefaultServeMux.Handle("/", rootRouter) 602 http.DefaultServeMux.Handle("/", rootRouter)
600 } 603 }
OLDNEW
« no previous file with comments | « go/src/infra/appengine/sheriff-o-matic/app.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698