Documentation ¶
Index ¶
- func AddMenuApi(ctx context.Context, id int, menuIds []int, loginUserId int) (err error)
- func ApiTree(parentNodeRes []*model.SysApiTreeOut, data []*entity.SysApi) (dataTree []*model.SysApiTreeOut)
- func AuthorizeMenuTree(userMenuParentNodeTreeOut []*model.AuthorizeQueryTreeOut, ...) (dataTree []*model.AuthorizeQueryTreeOut)
- func BindUserAndPost(ctx context.Context, userId int, postIds []int) (err error)
- func BindUserAndRole(ctx context.Context, userId int, roleIds []int) (err error)
- func CheckApiAddress(ctx context.Context, address string, tag int) *entity.SysApi
- func CheckApiId(ctx context.Context, Id int, apiColumn *entity.SysApi) *entity.SysApi
- func CheckApiName(ctx context.Context, name string, tag int) *entity.SysApi
- func CheckChildrenAuthorizeMenuTree(children *model.AuthorizeQueryTreeOut, data []*model.AuthorizeQueryTreeOut) (childrenData []g.Map)
- func GetAllAuthorizeQueryChildrenTree(userMenuTreeRes []*model.AuthorizeQueryTreeOut) (childrenMenuTreeRes []*model.AuthorizeQueryTreeOut)
- func GetAllAuthorizeQueryParentTree(childrenMenuTreeRes []*model.AuthorizeQueryTreeOut, ...) (data []*model.AuthorizeQueryTreeOut)
- func GetAllNextDeptInfoByChildrenDept(childrenDept []*entity.SysDept, deptInfo []*entity.SysDept, ...) (data []*entity.SysDept)
- func GetApiTree(apiInfo []*entity.SysApi) (dataTree []*model.SysApiTreeOut, err error)
- func GetAuthorizeItemsTypeTreeOut(ctx context.Context, menuIds []int, itemsType string, ...) (authorizeMenuTreeOut []*model.AuthorizeQueryTreeOut, err error)
- func GetAuthorizeMenuTree(userMenuTreeOut []*model.AuthorizeQueryTreeOut) (dataTree []*model.AuthorizeQueryTreeOut)
- func GetDataWhere(ctx context.Context, loginUserId int, entity interface{}) (where g.Map, err error)
- func GetDeptNameDict(ctx context.Context, ids g.Slice) (dict map[int64]model.DetailDeptRes, err error)
- func GetMenuInfo(ctx context.Context, menuIds []int) (userMenuTreeOut []*model.UserMenuTreeOut, err error)
- func GetNextDeptInfoByNowDeptId(id int64, deptInfo []*entity.SysDept) (data []*entity.SysDept)
- func GetRoleTree(roleInfo []*entity.SysRole) (dataTree []*model.RoleTreeOut, err error)
- func GetUserItemsTypeTreeOut(ctx context.Context, menuIds []int, itemsType string, ...) (userMenuTreeRes []*model.UserMenuTreeOut, err error)
- func GetUserMenuButton(menuId int, menuButtonInfo []*entity.SysMenuButton) (dataTree []*model.UserMenuButtonOut, err error)
- func GetUserMenuColumn(menuId int, menuColumnInfo []*entity.SysMenuColumn) (dataTree []*model.UserMenuColumnOut, err error)
- func GetUserMenuTree(userMenuTreeRes []*model.UserMenuTreeOut) (dataTree []*model.UserMenuTreeOut)
- func GfToken() *gftoken.GfToken
- func GfTokenOption(options *model.TokenOptions, prefix string, model string) *gftoken.GfToken
- func MenuTree(parentNodeOut []*model.SysMenuOut, data []*model.SysMenuOut) (dataTree []*model.SysMenuOut)
- func New() *sCaptcha
- func OrganizationTree(parentNodeOut []*model.OrganizationOut, data []*model.OrganizationOut) (dataTree []*model.OrganizationOut)
- func RoleTree(parentNodeRes []*model.RoleTreeOut, data []*entity.SysRole) (dataTree []*model.RoleTreeOut)
- func SysOperLog() *sSysOperLog
- func SysOrganizationNew() *sSysOrganization
- func UserMenuButtonTree(parentMenuButtonNodeRes []*model.UserMenuButtonOut, ...) (dataTree []*model.UserMenuButtonOut)
- func UserMenuColumnTree(parentMenuColumnNodeRes []*model.UserMenuColumnOut, ...) (dataTree []*model.UserMenuColumnOut)
- func UserMenuTree(userMenuParentNodeTreeRes []*model.UserMenuTreeOut, ...) (dataTree []*model.UserMenuTreeOut)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddMenuApi ¶
func ApiTree ¶
func ApiTree(parentNodeRes []*model.SysApiTreeOut, data []*entity.SysApi) (dataTree []*model.SysApiTreeOut)
ApiTree 生成接口树结构
func AuthorizeMenuTree ¶
func AuthorizeMenuTree(userMenuParentNodeTreeOut []*model.AuthorizeQueryTreeOut, data []*model.AuthorizeQueryTreeOut) (dataTree []*model.AuthorizeQueryTreeOut)
AuthorizeMenuTree 重组菜单子节点
func BindUserAndPost ¶
BindUserAndPost 添加用户与岗位绑定关系
func BindUserAndRole ¶
BindUserAndRole 添加用户与角色绑定关系
func CheckApiAddress ¶
检查相同Api地址的数据是否存在
func CheckApiId ¶
检查指定ID的数据是否存在
func CheckApiName ¶
检查相同Api名称的数据是否存在
func CheckChildrenAuthorizeMenuTree ¶
func CheckChildrenAuthorizeMenuTree(children *model.AuthorizeQueryTreeOut, data []*model.AuthorizeQueryTreeOut) (childrenData []g.Map)
func GetAllAuthorizeQueryChildrenTree ¶
func GetAllAuthorizeQueryChildrenTree(userMenuTreeRes []*model.AuthorizeQueryTreeOut) (childrenMenuTreeRes []*model.AuthorizeQueryTreeOut)
GetAllAuthorizeQueryChildrenTree 获取所有的子节点
func GetAllAuthorizeQueryParentTree ¶
func GetAllAuthorizeQueryParentTree(childrenMenuTreeRes []*model.AuthorizeQueryTreeOut, userMenuTreeRes []*model.AuthorizeQueryTreeOut) (data []*model.AuthorizeQueryTreeOut)
GetAllAuthorizeQueryParentTree 获取所有的父节点
func GetAllNextDeptInfoByChildrenDept ¶
func GetAllNextDeptInfoByChildrenDept(childrenDept []*entity.SysDept, deptInfo []*entity.SysDept, resultChildrenAll []*entity.SysDept) (data []*entity.SysDept)
GetAllNextDeptInfoByChildrenDept 根据所有的子部门获取所有下级部门信息
func GetApiTree ¶
func GetApiTree(apiInfo []*entity.SysApi) (dataTree []*model.SysApiTreeOut, err error)
func GetAuthorizeItemsTypeTreeOut ¶
func GetAuthorizeItemsTypeTreeOut(ctx context.Context, menuIds []int, itemsType string, authorizeMenuTreeInfo []*model.AuthorizeQueryTreeOut) (authorizeMenuTreeOut []*model.AuthorizeQueryTreeOut, err error)
GetAuthorizeItemsTypeTreeOut 根据项目类型 菜单ID封装菜单的按钮,列表字段,API接口
func GetAuthorizeMenuTree ¶
func GetAuthorizeMenuTree(userMenuTreeOut []*model.AuthorizeQueryTreeOut) (dataTree []*model.AuthorizeQueryTreeOut)
GetAuthorizeMenuTree 获取用户菜单树结构
func GetDataWhere ¶
func GetDataWhere(ctx context.Context, loginUserId int, entity interface{}) (where g.Map, err error)
GetDataWhere 获取数据权限条件查询
func GetDeptNameDict ¶
func GetMenuInfo ¶
func GetMenuInfo(ctx context.Context, menuIds []int) (userMenuTreeOut []*model.UserMenuTreeOut, err error)
GetMenuInfo 根据菜单ID获取指定菜单信息或者获取所有菜单信息
func GetNextDeptInfoByNowDeptId ¶
GetNextDeptInfoByNowDeptId 获取当前部门ID下一层级的部门信息
func GetRoleTree ¶
func GetRoleTree(roleInfo []*entity.SysRole) (dataTree []*model.RoleTreeOut, err error)
GetRoleTree 获取角色树
func GetUserItemsTypeTreeOut ¶
func GetUserItemsTypeTreeOut(ctx context.Context, menuIds []int, itemsType string, userMenuTreeInfo []*model.UserMenuTreeOut) (userMenuTreeRes []*model.UserMenuTreeOut, err error)
GetUserItemsTypeTreeOut 根据项目类型 菜单ID封装菜单的按钮,列表字段,API接口
func GetUserMenuButton ¶
func GetUserMenuButton(menuId int, menuButtonInfo []*entity.SysMenuButton) (dataTree []*model.UserMenuButtonOut, err error)
GetUserMenuButton 获取用户可操作按钮
func GetUserMenuColumn ¶
func GetUserMenuColumn(menuId int, menuColumnInfo []*entity.SysMenuColumn) (dataTree []*model.UserMenuColumnOut, err error)
GetUserMenuColumn 获取用户可查看列表
func GetUserMenuTree ¶
func GetUserMenuTree(userMenuTreeRes []*model.UserMenuTreeOut) (dataTree []*model.UserMenuTreeOut)
GetUserMenuTree 获取用户菜单树结构
func GfTokenOption ¶
func MenuTree ¶
func MenuTree(parentNodeOut []*model.SysMenuOut, data []*model.SysMenuOut) (dataTree []*model.SysMenuOut)
MenuTree 生成树结构
func OrganizationTree ¶
func OrganizationTree(parentNodeOut []*model.OrganizationOut, data []*model.OrganizationOut) (dataTree []*model.OrganizationOut)
OrganizationTree 生成树结构
func RoleTree ¶
func RoleTree(parentNodeRes []*model.RoleTreeOut, data []*entity.SysRole) (dataTree []*model.RoleTreeOut)
RoleTree 生成角色树结构
func SysOperLog ¶
func SysOperLog() *sSysOperLog
func SysOrganizationNew ¶
func SysOrganizationNew() *sSysOrganization
func UserMenuButtonTree ¶
func UserMenuButtonTree(parentMenuButtonNodeRes []*model.UserMenuButtonOut, data []*entity.SysMenuButton) (dataTree []*model.UserMenuButtonOut)
UserMenuButtonTree 生成树结构
func UserMenuColumnTree ¶
func UserMenuColumnTree(parentMenuColumnNodeRes []*model.UserMenuColumnOut, data []*entity.SysMenuColumn) (dataTree []*model.UserMenuColumnOut)
UserMenuColumnTree 生成树结构
func UserMenuTree ¶
func UserMenuTree(userMenuParentNodeTreeRes []*model.UserMenuTreeOut, data []*model.UserMenuTreeOut) (dataTree []*model.UserMenuTreeOut)
UserMenuTree 重组菜单子节点
Types ¶
This section is empty.
Source Files ¶
- captcha.go
- login.go
- sys_api.go
- sys_authorize.go
- sys_authorize_utils.go
- sys_dept.go
- sys_job.go
- sys_login_log.go
- sys_menu.go
- sys_menu_api.go
- sys_menu_button.go
- sys_menu_column.go
- sys_notifications.go
- sys_oper_log.go
- sys_organization.go
- sys_plugins.go
- sys_plugins_config.go
- sys_post.go
- sys_role.go
- sys_role_dept.go
- sys_token.go
- sys_user.go
- sys_user_online.go
- sys_user_post.go
- sys_user_role.go