Documentation ¶
Index ¶
- type AuthorityRepository
- func (a *AuthorityRepository) AddAuthoritiesByOrganizationId(organizationId string, data []*OperationModel.Operation)
- func (a *AuthorityRepository) AddAuthoritiesByRoleId(roleId string, data []*OperationModel.Operation)
- func (a *AuthorityRepository) AddAuthoritiesByUserId(userId string, data []*OperationModel.Operation)
- func (a *AuthorityRepository) AssginCasbinAuthGroupToOrg(orgId int) (resBool bool)
- func (a *AuthorityRepository) AssginCasbinAuthPolicyToOrg(authPostMountHasMenuButtonId string, nodeType string) (resBool bool)
- func (a *AuthorityRepository) DeleteAuthoritiesByOrganizationId(organizationId string, data []*OperationModel.Operation)
- func (a *AuthorityRepository) DeleteAuthoritiesByRoleId(roleId string, data []*OperationModel.Operation)
- func (a *AuthorityRepository) DeleteAuthoritiesByUserId(userId string, data []*OperationModel.Operation)
- func (a *AuthorityRepository) DeleteCasbibRules(authPostMountHasMenuButtonId string, nodeType string) (resBool bool)
- func (a *AuthorityRepository) DeleteOrganizationAuthorities(organizationId string)
- func (a *AuthorityRepository) DeleteOrganizationAuthoritiesByAuthType(organizationId string, authType string)
- func (a *AuthorityRepository) DeleteOrganizationAuthority(organizationId string, authType string, authId int64)
- func (a *AuthorityRepository) DeleteRoleAuthorities(roleId string)
- func (a *AuthorityRepository) DeleteRoleAuthoritiesByAuthType(roleId string, authType string)
- func (a *AuthorityRepository) DeleteRoleAuthority(roleId string, authType string, authId int64)
- func (a *AuthorityRepository) DeleteUserAuthorities(userId string)
- func (a *AuthorityRepository) DeleteUserAuthoritiesByAuthType(userId string, authType string)
- func (a *AuthorityRepository) DeleteUserAuthority(userId string, authType string, authId int64)
- func (a *AuthorityRepository) GetAuthoritiesByOrganizationId(organizationId string) (count int64, data []*OperationModel.Operation)
- func (a *AuthorityRepository) GetAuthoritiesByOrganizationIds(organizationIds []string) (result []*OperationModel.Operation)
- func (a *AuthorityRepository) GetAuthoritiesByRoleId(roleId string) (counts int64, data []*OperationModel.Operation)
- func (a *AuthorityRepository) GetAuthoritiesByRoleIds(roleIds []string) (result []*OperationModel.Operation)
- func (a *AuthorityRepository) GetAuthoritiesByUserId(userId string) (count int64, data []*OperationModel.Operation)
- func (u *AuthorityRepository) GetButtonListByMenuId(roleIds []string, menuId int64) (r []*OperationModel.Button, err error)
- func (u *AuthorityRepository) GetMenuByRoleIds(roleIds []string) (result []*OperationModel.Menu, err error)
- func (a *AuthorityRepository) GetOrganizationAuthorities(organizationId string) (result []*OperationModel.Operation)
- func (a *AuthorityRepository) GetOrganizationsAuthorities(organizationIds []string) (result []*OperationModel.Operation)
- func (a *AuthorityRepository) GetRoleAuthorities(roleId string) (result []*OperationModel.Operation)
- func (a *AuthorityRepository) GetRolesAuthorities(roleIds []string) (result []*OperationModel.Operation)
- func (a *AuthorityRepository) GetSystemAuthorities() (counts int64, data []*OperationModel.Operation)
- func (a *AuthorityRepository) GetUserAuthorities(userId string) (result []*OperationModel.Operation)
- func (a *AuthorityRepository) SetAuthoritiesByOrganizationId(organizationId string, data []*OperationModel.Operation)
- func (a *AuthorityRepository) SetAuthoritiesByRoleId(roleId string, data []*OperationModel.Operation)
- func (a *AuthorityRepository) SetAuthoritiesByUserId(userId string, data []*OperationModel.Operation)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthorityRepository ¶
func (*AuthorityRepository) AddAuthoritiesByOrganizationId ¶
func (a *AuthorityRepository) AddAuthoritiesByOrganizationId(organizationId string, data []*OperationModel.Operation)
func (*AuthorityRepository) AddAuthoritiesByRoleId ¶
func (a *AuthorityRepository) AddAuthoritiesByRoleId(roleId string, data []*OperationModel.Operation)
func (*AuthorityRepository) AddAuthoritiesByUserId ¶
func (a *AuthorityRepository) AddAuthoritiesByUserId(userId string, data []*OperationModel.Operation)
func (*AuthorityRepository) AssginCasbinAuthGroupToOrg ¶
func (a *AuthorityRepository) AssginCasbinAuthGroupToOrg(orgId int) (resBool bool)
给组织机构节点分配casbin的group(角色继承关系权限)
func (*AuthorityRepository) AssginCasbinAuthPolicyToOrg ¶
func (a *AuthorityRepository) AssginCasbinAuthPolicyToOrg(authPostMountHasMenuButtonId string, nodeType string) (resBool bool)
给组织机构节点分配casbin的policy策略权限
func (*AuthorityRepository) DeleteAuthoritiesByOrganizationId ¶
func (a *AuthorityRepository) DeleteAuthoritiesByOrganizationId(organizationId string, data []*OperationModel.Operation)
func (*AuthorityRepository) DeleteAuthoritiesByRoleId ¶
func (a *AuthorityRepository) DeleteAuthoritiesByRoleId(roleId string, data []*OperationModel.Operation)
func (*AuthorityRepository) DeleteAuthoritiesByUserId ¶
func (a *AuthorityRepository) DeleteAuthoritiesByUserId(userId string, data []*OperationModel.Operation)
func (*AuthorityRepository) DeleteCasbibRules ¶
func (a *AuthorityRepository) DeleteCasbibRules(authPostMountHasMenuButtonId string, nodeType string) (resBool bool)
删除 casbin 表接口已分配的权限
func (*AuthorityRepository) DeleteOrganizationAuthorities ¶
func (a *AuthorityRepository) DeleteOrganizationAuthorities(organizationId string)
func (*AuthorityRepository) DeleteOrganizationAuthoritiesByAuthType ¶
func (a *AuthorityRepository) DeleteOrganizationAuthoritiesByAuthType(organizationId string, authType string)
func (*AuthorityRepository) DeleteOrganizationAuthority ¶
func (a *AuthorityRepository) DeleteOrganizationAuthority(organizationId string, authType string, authId int64)
func (*AuthorityRepository) DeleteRoleAuthorities ¶
func (a *AuthorityRepository) DeleteRoleAuthorities(roleId string)
func (*AuthorityRepository) DeleteRoleAuthoritiesByAuthType ¶
func (a *AuthorityRepository) DeleteRoleAuthoritiesByAuthType(roleId string, authType string)
func (*AuthorityRepository) DeleteRoleAuthority ¶
func (a *AuthorityRepository) DeleteRoleAuthority(roleId string, authType string, authId int64)
func (*AuthorityRepository) DeleteUserAuthorities ¶
func (a *AuthorityRepository) DeleteUserAuthorities(userId string)
func (*AuthorityRepository) DeleteUserAuthoritiesByAuthType ¶
func (a *AuthorityRepository) DeleteUserAuthoritiesByAuthType(userId string, authType string)
func (*AuthorityRepository) DeleteUserAuthority ¶
func (a *AuthorityRepository) DeleteUserAuthority(userId string, authType string, authId int64)
func (*AuthorityRepository) GetAuthoritiesByOrganizationId ¶
func (a *AuthorityRepository) GetAuthoritiesByOrganizationId(organizationId string) (count int64, data []*OperationModel.Operation)
根据用户id查询已经分配的菜单
func (*AuthorityRepository) GetAuthoritiesByOrganizationIds ¶
func (a *AuthorityRepository) GetAuthoritiesByOrganizationIds(organizationIds []string) (result []*OperationModel.Operation)
func (*AuthorityRepository) GetAuthoritiesByRoleId ¶
func (a *AuthorityRepository) GetAuthoritiesByRoleId(roleId string) (counts int64, data []*OperationModel.Operation)
已分配给部门、岗位的系统菜单、按钮
func (*AuthorityRepository) GetAuthoritiesByRoleIds ¶
func (a *AuthorityRepository) GetAuthoritiesByRoleIds(roleIds []string) (result []*OperationModel.Operation)
func (*AuthorityRepository) GetAuthoritiesByUserId ¶
func (a *AuthorityRepository) GetAuthoritiesByUserId(userId string) (count int64, data []*OperationModel.Operation)
根据用户id查询已经分配的菜单
func (*AuthorityRepository) GetButtonListByMenuId ¶
func (u *AuthorityRepository) GetButtonListByMenuId(roleIds []string, menuId int64) (r []*OperationModel.Button, err error)
查询用户在指定页面拥有的按钮列表
func (*AuthorityRepository) GetMenuByRoleIds ¶
func (u *AuthorityRepository) GetMenuByRoleIds(roleIds []string) (result []*OperationModel.Menu, err error)
func (*AuthorityRepository) GetOrganizationAuthorities ¶
func (a *AuthorityRepository) GetOrganizationAuthorities(organizationId string) (result []*OperationModel.Operation)
根据用户id查询已经分配的菜单
func (*AuthorityRepository) GetOrganizationsAuthorities ¶
func (a *AuthorityRepository) GetOrganizationsAuthorities(organizationIds []string) (result []*OperationModel.Operation)
func (*AuthorityRepository) GetRoleAuthorities ¶
func (a *AuthorityRepository) GetRoleAuthorities(roleId string) (result []*OperationModel.Operation)
根据用户id查询已经分配的菜单
func (*AuthorityRepository) GetRolesAuthorities ¶
func (a *AuthorityRepository) GetRolesAuthorities(roleIds []string) (result []*OperationModel.Operation)
func (*AuthorityRepository) GetSystemAuthorities ¶
func (a *AuthorityRepository) GetSystemAuthorities() (counts int64, data []*OperationModel.Operation)
GetSystemAuthorities 待分配的系统菜单、按钮 数据列表 注意:按钮的id有可能和主菜单id重复,所以按钮id基准值增加 100000 (10万),后续分配权限时减去 10万即可
func (*AuthorityRepository) GetUserAuthorities ¶
func (a *AuthorityRepository) GetUserAuthorities(userId string) (result []*OperationModel.Operation)
根据用户id查询已经分配的菜单
func (*AuthorityRepository) SetAuthoritiesByOrganizationId ¶
func (a *AuthorityRepository) SetAuthoritiesByOrganizationId(organizationId string, data []*OperationModel.Operation)
给角色分配系统菜单、按钮
func (*AuthorityRepository) SetAuthoritiesByRoleId ¶
func (a *AuthorityRepository) SetAuthoritiesByRoleId(roleId string, data []*OperationModel.Operation)
给角色分配系统菜单、按钮
func (*AuthorityRepository) SetAuthoritiesByUserId ¶
func (a *AuthorityRepository) SetAuthoritiesByUserId(userId string, data []*OperationModel.Operation)
给角色分配系统菜单、按钮
Click to show internal directories.
Click to hide internal directories.