usecase

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package usecase provides business logic for RBAC role management

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RoleUsecase

type RoleUsecase struct {
	generated.Usecase[rbac.Role, uint64]
}

RoleUsecase provides business logic for role access control

func New

func New(repo rbac.Repository) *RoleUsecase

New creates a new RoleUsecase with the provided repository

func NewDefault

func NewDefault() *RoleUsecase

NewDefault creates a new RoleUsecase with default repository

func (*RoleUsecase) Count

func (a *RoleUsecase) Count(ctx context.Context, qops ...rbac.QOption) (int64, error)

Count returns the count of roles matching the filter with access control

func (*RoleUsecase) FetchList

func (a *RoleUsecase) FetchList(ctx context.Context, qops ...rbac.QOption) ([]*rbac.Role, error)

FetchList retrieves a filtered list of roles with access control validation

func (*RoleUsecase) GetByName

func (a *RoleUsecase) GetByName(ctx context.Context, name string) (*rbac.Role, error)

GetByName retrieves a role by name with access control validation

Jump to

Keyboard shortcuts

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