domain

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Domain

type Domain interface {
	AddRoleBinding(ctx context.Context, rb entities.RoleBinding) (*entities.RoleBinding, error)
	RemoveRoleBinding(ctx context.Context, userId repos.ID, resourceRef string) error
	RemoveRoleBindingsForResource(ctx context.Context, resourceRef string) error
	UpdateRoleBinding(ctx context.Context, rb entities.RoleBinding) (*entities.RoleBinding, error)

	GetRoleBinding(ctx context.Context, userId repos.ID, resourceRef string) (*entities.RoleBinding, error)

	ListRoleBindingsForResource(ctx context.Context, resourceType t.ResourceType, resourceRef string) ([]*entities.RoleBinding, error)
	ListRoleBindingsForUser(ctx context.Context, userId repos.ID, resourceType *t.ResourceType) ([]*entities.RoleBinding, error)

	Can(ctx context.Context, userId repos.ID, resourceRefs []string, action t.Action) (bool, error)
}

func NewDomain

func NewDomain(rbRepo repos.DbRepo[*entities.RoleBinding], roleBindingMap map[t.Action][]t.Role) Domain

type UnAuthorizedError

type UnAuthorizedError struct {
	// contains filtered or unexported fields
}

func (UnAuthorizedError) Error

func (e UnAuthorizedError) Error() string

Jump to

Keyboard shortcuts

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