initial commit
This commit is contained in:
commit
7715fcf373
37 changed files with 2957 additions and 0 deletions
24
pkg/api/v1/server/handler.go
Normal file
24
pkg/api/v1/server/handler.go
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
package server
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
type notFoundHandler struct {
|
||||
s *Server
|
||||
}
|
||||
|
||||
func (nf *notFoundHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
newContext(w, r, nf.s).NotFound()
|
||||
}
|
||||
|
||||
func authHandler(h ctxHandler) ctxHandler {
|
||||
return func(ctx *Context) {
|
||||
// TODO
|
||||
h(ctx)
|
||||
}
|
||||
}
|
||||
|
||||
func healthzHandler(ctx *Context) {
|
||||
ctx.OK()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue