Documentation ¶
Index ¶
- Constants
- Variables
- func AddActionNameMigrator(mg *migrator.Migrator)
- func AddAdminOnlyMigration(mg *migrator.Migrator)
- func AddAlertingPermissionsMigrator(mg *migrator.Migrator)
- func AddAlertingScopeRemovalMigration(mg *migrator.Migrator)
- func AddDashboardPermissionsMigrator(mg *migrator.Migrator)
- func AddDisabledMigrator(mg *migrator.Migrator)
- func AddManagedDashboardAnnotationActionsMigration(mg *migrator.Migrator)
- func AddManagedFolderAlertActionsMigration(mg *migrator.Migrator)
- func AddManagedFolderAlertActionsRepeatFixedMigration(mg *migrator.Migrator)
- func AddManagedFolderAlertActionsRepeatMigration(mg *migrator.Migrator)
- func AddManagedFolderAlertingSilencesActionsMigrator(mg *migrator.Migrator)
- func AddManagedFolderLibraryPanelActionsMigration(mg *migrator.Migrator)
- func AddManagedPermissionsMigration(mg *migrator.Migrator, migrationID string)
- func AddMigration(mg *migrator.Migrator)
- func AddSeedAssignmentMigrations(mg *migrator.Migrator)
- func AddTeamMembershipMigrations(mg *migrator.Migrator)
- func GenerateManagedRoleUID(orgID int64, name string) (string, error)
- func ParseRoleFromName(roleName string) string
- type DisabledMigrator
- type ErrUnknownRole
- type SeedAssignmentOnCallAccessMigrator
Constants ¶
View Source
const ActionMigrationID = "RBAC action name migrator"
View Source
const (
AlertingScopeRemovalMigrationID = "removing scope from alert.instances:read action migration"
)
View Source
const CodeMigrationSQL = "code migration"
View Source
const ManagedDashboardAnnotationActionsMigratorID = "managed dashboard permissions annotation actions migration"
View Source
const ManagedFolderAlertingSilencesActionsMigratorID = "managed folder permissions alerting silences actions migration"
View Source
const ManagedPermissionsMigrationID = "managed permissions migration"
View Source
const PreventSeedingOnCallAccessID = "prevent seeding OnCall access"
View Source
const (
TeamsMigrationID = "teams permissions migration"
)
Variables ¶
View Source
var ErrAddTeamMembershipMigrations = fmt.Errorf("Error migrating team memberships")
Functions ¶
func AddActionNameMigrator ¶
func AddAdminOnlyMigration ¶
func AddDisabledMigrator ¶
func AddManagedFolderAlertActionsRepeatFixedMigration ¶
AddManagedFolderAlertActionsRepeatFixedMigration is a fixed version of AddManagedFolderAlertActionsRepeatMigration.
func AddManagedFolderAlertActionsRepeatMigration ¶
AddManagedFolderAlertActionsMigration has to be run after AddDashboardPermissionsMigrator, as it is only effective if dashboard permissions have already been migrated. AddManagedFolderAlertActionsRepeatMigrator ensures that alerting permissions that have already been added won't get added twice.
func AddMigration ¶
func GenerateManagedRoleUID ¶
GenerateManagedRoleUID generated a deterministic uid of the form `managed_{org_id}_{type}_{id}`.
func ParseRoleFromName ¶
Converts from managed:builtins:<role>:permissions to <Role> Example: managed:builtins:editor:permissions -> Editor
Types ¶
type DisabledMigrator ¶
type DisabledMigrator struct {
migrator.MigrationBase
}
type ErrUnknownRole ¶
type ErrUnknownRole struct {
// contains filtered or unexported fields
}
func (*ErrUnknownRole) Error ¶
func (e *ErrUnknownRole) Error() string
func (*ErrUnknownRole) Unwrap ¶
func (e *ErrUnknownRole) Unwrap() error
type SeedAssignmentOnCallAccessMigrator ¶
type SeedAssignmentOnCallAccessMigrator struct {
migrator.MigrationBase
}
Click to show internal directories.
Click to hide internal directories.