roleservice

package
v0.0.0-...-e40f330 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockRoleCacheService

type MockRoleCacheService struct {
	mock.Mock
}

func (*MockRoleCacheService) Get

func (*MockRoleCacheService) SetBulk

func (r *MockRoleCacheService) SetBulk(ctx context.Context, items map[string]domain.RoleKeyType) error

type RoleCacheService

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

func NewRoleCacheService

func NewRoleCacheService(cache port.RoleCache) RoleCacheService

func (RoleCacheService) Get

func (RoleCacheService) SetBulk

func (r RoleCacheService) SetBulk(ctx context.Context, items map[string]domain.RoleKeyType) error

type Service

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

func New

func New(roleCache port.RoleCacheService) *Service

func (*Service) Create

func (r *Service) Create(uow port.AuthUnitOfWork, role domain.Role) error

func (*Service) Delete

func (r *Service) Delete(uow port.AuthUnitOfWork, uuidStr string, deletedBy uint64) error

func (*Service) Get

func (r *Service) Get(uow port.AuthUnitOfWork, uuidStr string) (*domain.Role, error)

func (*Service) GetPermissions

func (r *Service) GetPermissions(uow port.AuthUnitOfWork, uuidStr string) (*domain.Role, error)

func (*Service) List

func (r *Service) List(ctx context.Context, uow port.AuthUnitOfWork) ([]*domain.Role, error)

func (*Service) SetRoleCache

func (r *Service) SetRoleCache(service port.RoleCacheService)

func (*Service) SyncPermissions

func (r *Service) SyncPermissions(uow port.AuthUnitOfWork, uuidStr string, permissionUUIDsStr []string) error

func (*Service) Update

func (r *Service) Update(ctx context.Context, uow port.AuthUnitOfWork, role domain.Role, uuidStr string) error

Jump to

Keyboard shortcuts

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