storage

package
v0.0.0-...-7101101 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("not found")

Functions

This section is empty.

Types

type Storage

type Storage interface {
	GetAssignments(c context.Context, params *apiv1.GetAssignmentsParams) ([]*apiv1.Assignment, error)

	GetPermissions(c context.Context, params *apiv1.GetPermissionsParams) ([]*apiv1.Permission, error)

	GetRoles(c context.Context) ([]*apiv1.RoleInfo, error)

	CreateRole(c context.Context, role apiv1.NewRole) (*apiv1.Role, error)

	DeleteRole(c context.Context, id apiv1.EntityID) error

	GetRole(c context.Context, id apiv1.EntityID) (*apiv1.Role, error)

	UpdateRole(c context.Context, role *apiv1.Role) (*apiv1.Role, error)

	RemoveRoleAssignment(c context.Context, a apiv1.Assignment) error

	GetRoleAssignments(c context.Context, roleID apiv1.EntityID) ([]*apiv1.Assignment, error)

	AssignRole(c context.Context, roleID apiv1.EntityID, assignment apiv1.NewRoleAssignment) error

	RemoveRolePermission(c context.Context, id apiv1.EntityID, targetID apiv1.PermissionIdentifier) error

	GetRolePermissions(c context.Context, id apiv1.EntityID) ([]*apiv1.Permission, error)

	AddRolePermission(c context.Context, id apiv1.EntityID, targetID apiv1.PermissionIdentifier) error
}

Directories

Path Synopsis
sql

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL