Chore: Move ReqContext to contexthandler service (#62102)

* Chore: Move ReqContext to contexthandler service

* Rename package to contextmodel

* Generate ngalert files

* Remove unused imports
This commit is contained in:
idafurjes
2023-01-27 08:50:36 +01:00
committed by GitHub
parent 8379a29b53
commit 6c5a573772
180 changed files with 1208 additions and 1182 deletions
+3 -3
View File
@@ -7,7 +7,7 @@ import (
"net/http"
"github.com/grafana/grafana/pkg/infra/log"
"github.com/grafana/grafana/pkg/models"
contextmodel "github.com/grafana/grafana/pkg/services/contexthandler/model"
"github.com/grafana/grafana/pkg/services/live"
"github.com/grafana/grafana/pkg/services/live/convert"
"github.com/grafana/grafana/pkg/services/live/pushurl"
@@ -45,7 +45,7 @@ func (g *Gateway) Run(ctx context.Context) error {
return ctx.Err()
}
func (g *Gateway) Handle(ctx *models.ReqContext) {
func (g *Gateway) Handle(ctx *contextmodel.ReqContext) {
streamID := web.Params(ctx.Req)[":streamId"]
stream, err := g.GrafanaLive.ManagedStreamRunner.GetOrCreateStream(ctx.SignedInUser.OrgID, liveDto.ScopeStream, streamID)
@@ -98,7 +98,7 @@ func (g *Gateway) Handle(ctx *models.ReqContext) {
ctx.Resp.WriteHeader(http.StatusOK)
}
func (g *Gateway) HandlePipelinePush(ctx *models.ReqContext) {
func (g *Gateway) HandlePipelinePush(ctx *contextmodel.ReqContext) {
channelID := web.Params(ctx.Req)["*"]
body, err := io.ReadAll(ctx.Req.Body)