OLD | NEW |
1 // Copyright 2017 The LUCI Authors. All rights reserved. | 1 // Copyright 2017 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 main | 5 package logs |
6 | 6 |
7 import ( | 7 import ( |
8 "fmt" | 8 "fmt" |
9 "log" | 9 "log" |
10 "net/http" | 10 "net/http" |
11 "strings" | 11 "strings" |
12 | 12 |
13 » "github.com/luci/luci-go/milo/appengine/common" | 13 » "github.com/luci/luci-go/milo/common" |
14 "github.com/luci/luci-go/server/auth" | 14 "github.com/luci/luci-go/server/auth" |
15 "github.com/luci/luci-go/server/router" | 15 "github.com/luci/luci-go/server/router" |
16 ) | 16 ) |
17 | 17 |
18 // Where it all begins!!! | 18 // Where it all begins!!! |
19 func main() { | 19 func main() { |
20 r := router.New() | 20 r := router.New() |
21 | 21 |
22 base := common.FlexBase() | 22 base := common.FlexBase() |
23 r.GET("/log/raw/*path", base, rawLog) | 23 r.GET("/log/raw/*path", base, rawLog) |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 http.Redirect(c.Writer, c.Request, loginURL, http.StatusTemporar
yRedirect) | 65 http.Redirect(c.Writer, c.Request, loginURL, http.StatusTemporar
yRedirect) |
66 return | 66 return |
67 default: | 67 default: |
68 fmt.Fprintf(c.Writer, "Encountered error: %s", err.Error()) | 68 fmt.Fprintf(c.Writer, "Encountered error: %s", err.Error()) |
69 } | 69 } |
70 } | 70 } |
71 | 71 |
72 func healthCheckHandler(w http.ResponseWriter, r *http.Request) { | 72 func healthCheckHandler(w http.ResponseWriter, r *http.Request) { |
73 fmt.Fprint(w, "ok") | 73 fmt.Fprint(w, "ok") |
74 } | 74 } |
OLD | NEW |