rbac

package
v0.80.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OperationIn

func OperationIn(operationId string, operationIds []string) bool

Types

type Authorizer

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

func NewAuthorizer

func NewAuthorizer() (*Authorizer, error)

func (*Authorizer) IsAuthorized

func (a *Authorizer) IsAuthorized(role sqlcv1.TenantMemberRole, operation string) bool

type PermissionMap

type PermissionMap struct {
	Roles map[string]*Role
}

func LoadYaml

func LoadYaml() (*PermissionMap, error)

func (*PermissionMap) HasPermission

func (p *PermissionMap) HasPermission(roleName string, operation string) bool

func (*PermissionMap) ValidInheritance

func (p *PermissionMap) ValidInheritance(roleName string) error

func (*PermissionMap) Validate

func (p *PermissionMap) Validate() error

func (*PermissionMap) ValidateSpec

func (p *PermissionMap) ValidateSpec(spec openapi3.T) error

type RBACError

type RBACError struct {
	Message string
}

func (*RBACError) Error

func (e *RBACError) Error() string

type Role

type Role struct {
	Inherits    *[]string
	Permissions *[]string
}

Jump to

Keyboard shortcuts

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