grafana/pkg/infra
sh0rez 3d5d8c785b
pkg/web: restrict handler types (#48495)
Makes `pkg/web` only accept handles from the following set:

```go
	handlerStd       = func(http.ResponseWriter, *http.Request)
	handlerStdCtx    = func(http.ResponseWriter, *http.Request, *web.Context)
	handlerStdReqCtx = func(http.ResponseWriter, *http.Request, *models.ReqContext)
	handlerReqCtx    = func(*models.ReqContext)
	handlerReqCtxRes = func(*models.ReqContext) Response
	handlerCtx       = func(*web.Context)
```

This is a first step to reducing above set to only `http.Handler`.

---

Due to a cyclic import situation between `pkg/models` and `pkg/web`, parts of this PR were put into `pkg/api/response`, even though they definitely do not belong there. This however is _temporary_ until we untangle `models.ReqContext`.
2022-05-20 12:45:18 -04:00
..
filestorage Storage: enable SQL backend (#48095) 2022-05-16 10:26:40 -07:00
fs test: use T.TempDir to create temporary test directory (#44947) 2022-03-22 15:43:29 +01:00
httpclient Security: fixes CVE-2022-29170 (#49240) 2022-05-19 17:01:09 +02:00
kvstore Remove bus from usage stats (#45275) 2022-02-11 14:04:15 +01:00
localcache Migrate to Wire for dependency injection (#32289) 2021-08-25 15:11:22 +02:00
log Chore: Make logger mutable for regression test (#49146) 2022-05-18 17:04:52 +02:00
metrics Encryption: Add Prometheus metrics (#48603) 2022-05-06 10:21:55 +02:00
network Backend: fix IPv6 address parsing erroneous (#28585) 2020-11-25 07:55:22 +01:00
process PluginsCatalog: adding error information about disabled plugins. (#39171) 2021-09-20 09:08:00 +02:00
remotecache Logger migration from log15 to gokit/log (#41636) 2022-01-06 22:28:05 +08:00
serverlock Chore: Fix flaky serverlock integration test (#42633) 2021-12-02 12:53:21 +01:00
tracing Fix: add default nop trace exporter to opentelemetry (#48869) 2022-05-10 11:29:36 +02:00
usagestats pkg/web: restrict handler types (#48495) 2022-05-20 12:45:18 -04:00