Chore: Remove bus (#47511)

* Chore: Remove bus

* remove unused const
This commit is contained in:
Serge Zaitsev
2022-04-08 16:15:06 +02:00
committed by GitHub
parent 1a88612e82
commit 18e93c7077
53 changed files with 19 additions and 701 deletions

View File

@@ -7,25 +7,11 @@ import (
"strings"
"time"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/models"
ac "github.com/grafana/grafana/pkg/services/accesscontrol"
"github.com/grafana/grafana/pkg/services/featuremgmt"
)
func (ss *SQLStore) addTeamQueryAndCommandHandlers() {
bus.AddHandler("sql", ss.UpdateTeam)
bus.AddHandler("sql", ss.DeleteTeam)
bus.AddHandler("sql", ss.SearchTeams)
bus.AddHandler("sql", ss.GetTeamById)
bus.AddHandler("sql", ss.GetTeamsByUser)
bus.AddHandler("sql", ss.UpdateTeamMember)
bus.AddHandler("sql", ss.RemoveTeamMember)
bus.AddHandler("sql", ss.GetTeamMembers)
bus.AddHandler("sql", IsAdminOfTeams)
}
type TeamStore interface {
UpdateTeam(ctx context.Context, cmd *models.UpdateTeamCommand) error
DeleteTeam(ctx context.Context, cmd *models.DeleteTeamCommand) error