Chore: Move identity and errutil to apimachinery module (#89116)

This commit is contained in:
Ryan McKinley
2024-06-13 07:11:35 +03:00
committed by GitHub
parent 12a45fdeca
commit 99d8025829
298 changed files with 575 additions and 393 deletions

View File

@@ -5,10 +5,9 @@ import (
"strings"
"time"
"github.com/grafana/grafana/pkg/models/roletype"
"github.com/grafana/grafana/pkg/services/auth/identity"
"github.com/grafana/grafana/pkg/apimachinery/errutil"
"github.com/grafana/grafana/pkg/apimachinery/identity"
"github.com/grafana/grafana/pkg/services/search/model"
"github.com/grafana/grafana/pkg/util/errutil"
)
// Typed errors
@@ -45,13 +44,13 @@ type OrgUser struct {
Updated time.Time
}
type RoleType = roletype.RoleType
type RoleType = identity.RoleType
const (
RoleNone RoleType = roletype.RoleNone
RoleViewer RoleType = roletype.RoleViewer
RoleEditor RoleType = roletype.RoleEditor
RoleAdmin RoleType = roletype.RoleAdmin
RoleNone RoleType = identity.RoleNone
RoleViewer RoleType = identity.RoleViewer
RoleEditor RoleType = identity.RoleEditor
RoleAdmin RoleType = identity.RoleAdmin
)
type CreateOrgCommand struct {

View File

@@ -10,10 +10,10 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/grafana/grafana/pkg/apimachinery/identity"
"github.com/grafana/grafana/pkg/infra/db"
"github.com/grafana/grafana/pkg/infra/tracing"
"github.com/grafana/grafana/pkg/services/accesscontrol"
"github.com/grafana/grafana/pkg/services/auth/identity"
"github.com/grafana/grafana/pkg/services/org"
"github.com/grafana/grafana/pkg/services/quota/quotaimpl"
"github.com/grafana/grafana/pkg/services/searchusers/sortopts"