services

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Module exports services present

Functions

This section is empty.

Types

type RoleService

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

RoleService service layer

func NewRoleService

func NewRoleService(
	logger lib.Logger,
	casbinService CasbinService,
	userRepository repository.UserRepository,
	roleRepository repository.RoleRepository,
	roleMenuRepository repository.RoleMenuRepository,
	menuRepository repository.MenuRepository,
	menuActionRepository repository.MenuActionRepository,
) RoleService

NewRoleService creates a new roleservice

func (RoleService) Check

func (a RoleService) Check(item *models.Role) error

func (RoleService) CheckRoleMenu

func (a RoleService) CheckRoleMenu(rMenu *models.RoleMenu) error

func (RoleService) CompareRoleMenus

func (a RoleService) CompareRoleMenus(oRoleMenus, nRoleMenus models.RoleMenus) (aList, dList models.RoleMenus)

func (RoleService) Create

func (a RoleService) Create(role *models.Role) (id string, err error)

func (RoleService) Delete

func (a RoleService) Delete(id string) error

func (RoleService) Get

func (a RoleService) Get(id string) (*models.Role, error)

func (RoleService) Query

func (a RoleService) Query(param *models.RoleQueryParam) (roleQR *models.RoleQueryResult, err error)

func (RoleService) QueryRoleMenus

func (a RoleService) QueryRoleMenus(roleID string) (models.RoleMenus, error)

func (RoleService) Update

func (a RoleService) Update(id string, role *models.Role) error

func (RoleService) UpdateStatus

func (a RoleService) UpdateStatus(id string, status int) error

func (RoleService) WithTrx

func (a RoleService) WithTrx(trxHandle *gorm.DB) RoleService

WithTrx delegates transaction to repository database

Jump to

Keyboard shortcuts

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