auth

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 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 AuthorityService

type AuthorityService struct {
	service.BaseService
	AuthorityRepository  *AuthRepository.AuthorityRepository  `inject:"authorityRepository"`
	MenuRepositoy        *AuthRepository.MenuRepository       `inject:"menuRepository"`
	MenuButtonRepository *AuthRepository.MenuButtonRepository `inject:"menuButtonRepository"`
	RoleUserService      *DefaultService.RoleUserService      `inject:"roleUserService"`
}

func (*AuthorityService) GetButtonListByMenuId

func (u *AuthorityService) GetButtonListByMenuId(userId string, menuId int64) []*AuthModel.Button

查询用户打开指定的页面所拥有的按钮列表

func (*AuthorityService) GetOrganizationAuthorities added in v0.0.15

func (u *AuthorityService) GetOrganizationAuthorities(organizationId string) (int64, []*AuthModel.Operation)

func (*AuthorityService) GetOrganizationAvailableAuthorities added in v0.0.15

func (a *AuthorityService) GetOrganizationAvailableAuthorities(organizationId string) []*AuthModel.Operation

根据用户ID获取所有权限的来源

func (*AuthorityService) GetRoleAuthorities

func (u *AuthorityService) GetRoleAuthorities(roleId string) (int64, []*AuthModel.Operation)

func (*AuthorityService) GetRoleAvailableAuthorities added in v0.0.15

func (a *AuthorityService) GetRoleAvailableAuthorities(roleId string) []*AuthModel.Operation

根据用户ID获取所有权限的来源

func (*AuthorityService) GetSystemAuthorities

func (u *AuthorityService) GetSystemAuthorities() (int64, []*AuthModel.Operation)

func (*AuthorityService) GetUserAuthorities

func (a *AuthorityService) GetUserAuthorities(userId string) []*AuthModel.Operation

根据用户ID获取所有权限的来源

func (*AuthorityService) GetUserAvailableAuthorities added in v0.0.15

func (a *AuthorityService) GetUserAvailableAuthorities(userId string) []*AuthModel.Operation

根据用户ID获取所有权限的来源

func (*AuthorityService) GetUserMenuTree

func (u *AuthorityService) GetUserMenuTree(userId string) []*AuthModel.Menu

func (*AuthorityService) GetUserMenus

func (u *AuthorityService) GetUserMenus(userId string) []*AuthModel.Menu

func (*AuthorityService) SetOrganizationAuthorities added in v0.0.15

func (u *AuthorityService) SetOrganizationAuthorities(organizationId string, authorities []*AuthModel.Operation)

func (*AuthorityService) SetRoleAuthorities added in v0.0.15

func (u *AuthorityService) SetRoleAuthorities(roleId string, authorities []*AuthModel.Operation)

func (*AuthorityService) SetUserAuthorities added in v0.0.15

func (u *AuthorityService) SetUserAuthorities(userId string, authorities []*AuthModel.Operation)

type ButtonService

type ButtonService struct {
	ButtonRepository *AuthRepository.ButtonRepository `inject:"buttonRepository"`
}

func (*ButtonService) CreateButton

func (s *ButtonService) CreateButton(data *AuthModel.Button) (bool, error)

func (*ButtonService) DeleteButton

func (s *ButtonService) DeleteButton(id int64) error

func (*ButtonService) GetById

func (s *ButtonService) GetById(id int64) (*AuthModel.Button, error)

func (*ButtonService) List

func (s *ButtonService) List(name string, pageable query.Pageable) (int64, []AuthModel.Button)

func (*ButtonService) UpdateButton

func (s *ButtonService) UpdateButton(data *AuthModel.Button) (bool, error)
type MenuButtonService struct {
	service.BaseService
	MenuButtonRepository *AuthRepository.MenuButtonRepository `inject:"menuButtonRepository"`
}
func (s *MenuButtonService) GetByButtonId(buttonId int64) bool
func (s *MenuButtonService) List(fid int64) (int64, []AuthModel.MenuButton)
type MenuService struct {
	service.BaseService
	MenuRepository       *AuthRepository.MenuRepository       `inject:"menuRepository"`
	MenuButtonRepository *AuthRepository.MenuButtonRepository `inject:"menuButtonRepository"`
}
func (s *MenuService) CreateMenu(data *AuthModel.Menu) (bool, error)
func (s *MenuService) DeleteMenu(id int64) (bool, error)
func (s *MenuService) GetByFid(fid int64) ([]*AuthModel.Menu, error)
func (s *MenuService) GetById(id int64) (*AuthModel.Menu, error)
func (s *MenuService) List(fid int64, title string, pageable query.Pageable) (int64, []*AuthModel.Menu)
func (s *MenuService) ListWithButtons(fid int64, title string, pageable query.Pageable) (int64, []*AuthModel.Menu)
func (s *MenuService) MakeTree(result []*AuthModel.Menu) []*AuthModel.Menu
func (s *MenuService) UpdateMenu(data *AuthModel.Menu) (bool, error)

type RoleMenuService

type RoleMenuService struct {
	service.BaseService
	RoleMenuRepository *AuthRepository.RoleMenuRepository `inject:"roleMenuRepository"`
}

func (*RoleMenuService) GetByRoleIds

func (s *RoleMenuService) GetByRoleIds(ids []string) []AuthModel.RoleMenu

Jump to

Keyboard shortcuts

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