rbac

package
v0.1.37 Latest Latest
Warning

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

Go to latest
Published: May 2, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package rbac provides application services for RBAC authorization.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service is a struct that implements the RBACManageUsecase interface.

func New

func New(
	roleUsecase userport.RoleUsecase,
	roleBindingPersistencePort userport.RoleBindingPersistencePort,
	userUsecase userport.UserUsecase,
	logger *slog.Logger,
) *Service

New creates a new instance of the Service struct.

func (*Service) GetMyRoleBindings added in v0.1.37

func (s *Service) GetMyRoleBindings(ctx context.Context, email string) (*v1.ListResponse[v1.RoleBinding], error)

GetMyRoleBindings implements applicationport.RBACManageUsecase. Looks up the user by email — avoids an extra DB round-trip when the caller already holds the email.

func (*Service) GetMyRoles added in v0.1.37

func (s *Service) GetMyRoles(ctx context.Context, email string) (*v1.ListResponse[v1.Role], error)

GetMyRoles implements applicationport.RBACManageUsecase. Looks up the user by email — avoids an extra DB round-trip when the caller already holds the email.

Jump to

Keyboard shortcuts

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