Documentation
¶
Index ¶
- type AuthorityService
- func (u *AuthorityService) GetButtonListByMenuId(userId string, menuId int64) []*AuthModel.Button
- func (u *AuthorityService) GetOrganizationAuthorities(organizationId string) (int64, []*AuthModel.Operation)
- func (a *AuthorityService) GetOrganizationAvailableAuthorities(organizationId string) []*AuthModel.Operation
- func (u *AuthorityService) GetRoleAuthorities(roleId string) (int64, []*AuthModel.Operation)
- func (a *AuthorityService) GetRoleAvailableAuthorities(roleId string) []*AuthModel.Operation
- func (u *AuthorityService) GetSystemAuthorities() (int64, []*AuthModel.Operation)
- func (a *AuthorityService) GetUserAuthorities(userId string) []*AuthModel.Operation
- func (a *AuthorityService) GetUserAvailableAuthorities(userId string) []*AuthModel.Operation
- func (u *AuthorityService) GetUserMenuTree(userId string) []*AuthModel.Menu
- func (u *AuthorityService) GetUserMenus(userId string) []*AuthModel.Menu
- func (u *AuthorityService) SetOrganizationAuthorities(organizationId string, authorities []*AuthModel.Operation)
- func (u *AuthorityService) SetRoleAuthorities(roleId string, authorities []*AuthModel.Operation)
- func (u *AuthorityService) SetUserAuthorities(userId string, authorities []*AuthModel.Operation)
- type ButtonService
- func (s *ButtonService) CreateButton(data *AuthModel.Button) (bool, error)
- func (s *ButtonService) DeleteButton(id int64) error
- func (s *ButtonService) GetById(id int64) (*AuthModel.Button, error)
- func (s *ButtonService) List(name string, pageable query.Pageable) (int64, []AuthModel.Button)
- func (s *ButtonService) UpdateButton(data *AuthModel.Button) (bool, error)
- type MenuButtonService
- type MenuService
- 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
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"`
MenuRepository *AuthRepository.MenuRepository `inject:"menuRepository"`
MenuButtonRepository *AuthRepository.MenuButtonRepository `inject:"menuButtonRepository"`
MenuService *MenuService `inject:"menuService"`
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) UpdateButton ¶
func (s *ButtonService) UpdateButton(data *AuthModel.Button) (bool, error)
type MenuButtonService ¶
type MenuButtonService struct {
service.BaseService
MenuButtonRepository *AuthRepository.MenuButtonRepository `inject:"menuButtonRepository"`
}
func (*MenuButtonService) GetByButtonId ¶
func (s *MenuButtonService) GetByButtonId(buttonId int64) bool
func (*MenuButtonService) List ¶
func (s *MenuButtonService) List(fid int64) (int64, []AuthModel.MenuButton)
type MenuService ¶
type MenuService struct {
service.BaseService
MenuRepository *AuthRepository.MenuRepository `inject:"menuRepository"`
MenuButtonRepository *AuthRepository.MenuButtonRepository `inject:"menuButtonRepository"`
}
func (*MenuService) CreateMenu ¶
func (s *MenuService) CreateMenu(data *AuthModel.Menu) (bool, error)
func (*MenuService) DeleteMenu ¶
func (s *MenuService) DeleteMenu(id int64) (bool, error)
func (*MenuService) ListWithButtons ¶
func (*MenuService) MakeTree ¶ added in v0.0.15
func (s *MenuService) MakeTree(result []*AuthModel.Menu) []*AuthModel.Menu
func (*MenuService) UpdateMenu ¶
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
Click to show internal directories.
Click to hide internal directories.