Documentation ¶
Index ¶
- type AuthorityService
- func (u *AuthorityService) GetButtonListByMenuId(userId string, menuId int64) []AuthModel.Button
- func (u *AuthorityService) GetRoleAuthorities(roleId string) (int64, []AuthModel.AuthNode)
- func (u *AuthorityService) GetSystemAuthorities() (int64, []AuthModel.AuthNode)
- func (a *AuthorityService) GetUserAuthorities(userId string) []AuthModel.AuthNode
- func (u *AuthorityService) GetUserMenuTree(userId string) []AuthModel.Menu
- func (u *AuthorityService) GetUserMenus(userId string) []AuthModel.Menu
- 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.MenuWithButton)
- 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"` MenuRepositoy *AuthRepository.MenuRepository `inject:"menuRepository"` MenuButtonRepository *AuthRepository.MenuButtonRepository `inject:"menuButtonRepository"` RoleUserService *service.RoleUserService `inject:"roleUserService"` }
func (*AuthorityService) GetButtonListByMenuId ¶
func (u *AuthorityService) GetButtonListByMenuId(userId string, menuId int64) []AuthModel.Button
查询用户打开指定的页面所拥有的按钮列表
func (*AuthorityService) GetRoleAuthorities ¶
func (u *AuthorityService) GetRoleAuthorities(roleId string) (int64, []AuthModel.AuthNode)
func (*AuthorityService) GetSystemAuthorities ¶
func (u *AuthorityService) GetSystemAuthorities() (int64, []AuthModel.AuthNode)
func (*AuthorityService) GetUserAuthorities ¶
func (a *AuthorityService) GetUserAuthorities(userId string) []AuthModel.AuthNode
根据用户ID获取所有权限的来源
func (*AuthorityService) GetUserMenuTree ¶
func (u *AuthorityService) GetUserMenuTree(userId string) []AuthModel.Menu
func (*AuthorityService) GetUserMenus ¶
func (u *AuthorityService) GetUserMenus(userId string) []AuthModel.Menu
type ButtonService ¶
type ButtonService struct {
ButtonRepository *auth.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 *auth.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 *auth.MenuRepository `inject:"menuRepository"` MenuButtonRepository *auth.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 (s *MenuService) ListWithButtons(fid int64, title string, pageable query.Pageable) (int64, []AuthModel.MenuWithButton)
func (*MenuService) UpdateMenu ¶
func (s *MenuService) UpdateMenu(data *AuthModel.Menu) (bool, error)
type RoleMenuService ¶
type RoleMenuService struct { service.BaseService RoleMenuRepository *auth.RoleMenuRepository `inject:"roleMenuRepository"` }
func (*RoleMenuService) GetByRoleIds ¶
func (s *RoleMenuService) GetByRoleIds(ids []string) []AuthModel.RoleMenu
Click to show internal directories.
Click to hide internal directories.