Documentation ¶
Index ¶
- Variables
- func BuildGroupData(flag string, remoteData map[string]interface{}) (*model.Group, error)
- func BuildUserData(flag string, remoteData map[string]interface{}) (*model.User, error)
- func CommonAddGroup(group *model.Group) error
- func CommonAddUser(user *model.User, groups []*model.Group) error
- func CommonUpdateGroup(oldGroup, newGroup *model.Group) error
- func CommonUpdateUser(oldUser, newUser *model.User, groupId []uint) error
- func ConvertDeptData(flag string, remoteData []map[string]interface{}) (groups []*model.Group, err error)
- func ConvertUserData(flag string, remoteData []map[string]interface{}) (users []*model.User, err error)
- func GroupListToTree(rootId string, groupList []*model.Group) *model.Group
- func InitCron()
- func SearchGroupDiff() (err error)
- func SearchUserDiff() (err error)
- type ApiLogic
- func (l ApiLogic) Add(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (l ApiLogic) Delete(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (l ApiLogic) GetTree(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (l ApiLogic) List(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (l ApiLogic) Update(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- type BaseLogic
- func (l BaseLogic) ChangePwd(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (l BaseLogic) Dashboard(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (l BaseLogic) DecryptPasswd(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (l BaseLogic) EncryptPasswd(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (l BaseLogic) SendCode(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- type DingTalkLogic
- func (d DingTalkLogic) AddDepts(group *model.Group) error
- func (d DingTalkLogic) AddUsers(user *model.User) error
- func (d *DingTalkLogic) SyncDingTalkDepts(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (d DingTalkLogic) SyncDingTalkUsers(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- type FeiShuLogic
- func (d FeiShuLogic) AddDepts(group *model.Group) error
- func (d FeiShuLogic) AddUsers(user *model.User) error
- func (d *FeiShuLogic) SyncFeiShuDepts(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (d FeiShuLogic) SyncFeiShuUsers(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- type FieldRelationLogic
- func (l FieldRelationLogic) Add(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (l FieldRelationLogic) Delete(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (l FieldRelationLogic) List(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (l FieldRelationLogic) Update(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- type GroupLogic
- func (l GroupLogic) Add(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (l GroupLogic) AddUser(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (l GroupLogic) Delete(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (l GroupLogic) GetTree(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (l GroupLogic) List(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (l GroupLogic) RemoveUser(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (l GroupLogic) Update(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (l GroupLogic) UserInGroup(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (l GroupLogic) UserNoInGroup(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- type MenuLogic
- func (l MenuLogic) Add(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (l MenuLogic) Delete(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (l MenuLogic) GetAccessTree(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (l MenuLogic) GetTree(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (l MenuLogic) Update(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- type OpenLdapLogic
- func (d OpenLdapLogic) AddDepts(group *model.Group) error
- func (d OpenLdapLogic) AddUsers(user *model.User) error
- func (d *OpenLdapLogic) SyncOpenLdapDepts(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (d OpenLdapLogic) SyncOpenLdapUsers(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- type OperationLogLogic
- func (l OperationLogLogic) Clean(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (l OperationLogLogic) Delete(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (l OperationLogLogic) List(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- type RoleLogic
- func (l RoleLogic) Add(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (l RoleLogic) Delete(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (l RoleLogic) GetApiList(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (l RoleLogic) GetMenuList(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (l RoleLogic) List(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (l RoleLogic) Update(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (l RoleLogic) UpdateApis(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (l RoleLogic) UpdateMenus(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- type SqlLogic
- type UserLogic
- func (l UserLogic) Add(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (l UserLogic) ChangePwd(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (l UserLogic) ChangeUserStatus(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (l UserLogic) Delete(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (l UserLogic) GetUserInfo(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (l UserLogic) List(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (l UserLogic) Update(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- type WeComLogic
- func (d WeComLogic) AddDepts(group *model.Group) error
- func (d WeComLogic) AddUsers(user *model.User) error
- func (d *WeComLogic) SyncWeComDepts(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
- func (d WeComLogic) SyncWeComUsers(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
Constants ¶
This section is empty.
Variables ¶
var ( ReqAssertErr = tools.NewRspError(tools.SystemErr, fmt.Errorf("请求异常")) Api = &ApiLogic{} User = &UserLogic{} Group = &GroupLogic{} Role = &RoleLogic{} Menu = &MenuLogic{} OperationLog = &OperationLogLogic{} DingTalk = &DingTalkLogic{} WeCom = &WeComLogic{} FeiShu = &FeiShuLogic{} OpenLdap = &OpenLdapLogic{} Sql = &SqlLogic{} Base = &BaseLogic{} FieldRelation = &FieldRelationLogic{} )
Functions ¶
func BuildGroupData ¶ added in v0.5.0
BuildGroupData 根据数据与动态字段组装成分组数据
func BuildUserData ¶ added in v0.5.0
BuildUserData 根据数据与动态字段组装成用户数据
func CommonAddGroup ¶ added in v0.1.1
CommonAddGroup 标准创建分组
func CommonAddUser ¶ added in v0.1.1
CommonAddUser 标准创建用户
func CommonUpdateGroup ¶ added in v0.1.1
CommonUpdateGroup 标准更新分组
func CommonUpdateUser ¶ added in v0.1.1
CommonUpdateUser 标准更新用户
func ConvertDeptData ¶ added in v0.5.0
func ConvertDeptData(flag string, remoteData []map[string]interface{}) (groups []*model.Group, err error)
ConvertDeptData 将部门信息转成本地结构体
func ConvertUserData ¶ added in v0.5.0
func ConvertUserData(flag string, remoteData []map[string]interface{}) (users []*model.User, err error)
ConvertUserData 将用户信息转成本地结构体
func GroupListToTree ¶ added in v0.5.1
func SearchGroupDiff ¶ added in v0.5.5
func SearchGroupDiff() (err error)
SearchGroupDiff 检索未同步到ldap中的分组
func SearchUserDiff ¶ added in v0.5.5
func SearchUserDiff() (err error)
SearchUserDiff 检索未同步到ldap中的用户
Types ¶
type ApiLogic ¶
type ApiLogic struct{}
type BaseLogic ¶
type BaseLogic struct{}
func (BaseLogic) ChangePwd ¶
func (l BaseLogic) ChangePwd(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
ChangePwd 重置密码
func (BaseLogic) Dashboard ¶
func (l BaseLogic) Dashboard(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
Dashboard 仪表盘
func (BaseLogic) DecryptPasswd ¶ added in v0.5.5
func (l BaseLogic) DecryptPasswd(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
DecryptPasswd
func (BaseLogic) EncryptPasswd ¶ added in v0.5.5
func (l BaseLogic) EncryptPasswd(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
EncryptPasswd
type DingTalkLogic ¶
type DingTalkLogic struct { }
func (DingTalkLogic) AddDepts ¶ added in v0.1.1
func (d DingTalkLogic) AddDepts(group *model.Group) error
AddGroup 添加部门数据
func (DingTalkLogic) AddUsers ¶ added in v0.1.1
func (d DingTalkLogic) AddUsers(user *model.User) error
AddUser 添加用户数据
func (*DingTalkLogic) SyncDingTalkDepts ¶ added in v0.1.1
func (d *DingTalkLogic) SyncDingTalkDepts(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
通过钉钉获取部门信息
func (DingTalkLogic) SyncDingTalkUsers ¶
func (d DingTalkLogic) SyncDingTalkUsers(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
根据现有数据库同步到的部门信息,开启用户同步
type FeiShuLogic ¶ added in v0.3.0
type FeiShuLogic struct { }
func (FeiShuLogic) AddDepts ¶ added in v0.3.0
func (d FeiShuLogic) AddDepts(group *model.Group) error
AddGroup 添加部门数据
func (FeiShuLogic) AddUsers ¶ added in v0.3.0
func (d FeiShuLogic) AddUsers(user *model.User) error
AddUser 添加用户数据
func (*FeiShuLogic) SyncFeiShuDepts ¶ added in v0.3.0
func (d *FeiShuLogic) SyncFeiShuDepts(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
通过飞书获取部门信息
func (FeiShuLogic) SyncFeiShuUsers ¶ added in v0.3.0
func (d FeiShuLogic) SyncFeiShuUsers(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
根据现有数据库同步到的部门信息,开启用户同步
type FieldRelationLogic ¶ added in v0.5.0
type FieldRelationLogic struct{}
func (FieldRelationLogic) Add ¶ added in v0.5.0
func (l FieldRelationLogic) Add(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
Add 添加数据
func (FieldRelationLogic) Delete ¶ added in v0.5.0
func (l FieldRelationLogic) Delete(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
Delete 删除数据
func (FieldRelationLogic) List ¶ added in v0.5.0
func (l FieldRelationLogic) List(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
List 数据列表
func (FieldRelationLogic) Update ¶ added in v0.5.0
func (l FieldRelationLogic) Update(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
Update 更新数据
type GroupLogic ¶
type GroupLogic struct{}
func (GroupLogic) Add ¶
func (l GroupLogic) Add(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
Add 添加数据
func (GroupLogic) AddUser ¶
func (l GroupLogic) AddUser(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
AddUser 添加用户到分组
func (GroupLogic) Delete ¶
func (l GroupLogic) Delete(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
Delete 删除数据
func (GroupLogic) GetTree ¶
func (l GroupLogic) GetTree(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
GetTree 数据树
func (GroupLogic) List ¶
func (l GroupLogic) List(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
List 数据列表
func (GroupLogic) RemoveUser ¶
func (l GroupLogic) RemoveUser(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
RemoveUser 移除用户
func (GroupLogic) Update ¶
func (l GroupLogic) Update(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
Update 更新数据
func (GroupLogic) UserInGroup ¶
func (l GroupLogic) UserInGroup(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
UserInGroup 在分组内的用户
func (GroupLogic) UserNoInGroup ¶
func (l GroupLogic) UserNoInGroup(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
UserNoInGroup 不在分组内的用户
type MenuLogic ¶
type MenuLogic struct{}
func (MenuLogic) GetAccessTree ¶ added in v0.5.8
func (l MenuLogic) GetAccessTree(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
GetAccessTree 获取用户菜单树
type OpenLdapLogic ¶ added in v0.5.0
type OpenLdapLogic struct { }
func (OpenLdapLogic) AddDepts ¶ added in v0.5.0
func (d OpenLdapLogic) AddDepts(group *model.Group) error
AddGroup 添加部门数据
func (OpenLdapLogic) AddUsers ¶ added in v0.5.0
func (d OpenLdapLogic) AddUsers(user *model.User) error
AddUser 添加用户数据
func (*OpenLdapLogic) SyncOpenLdapDepts ¶ added in v0.5.0
func (d *OpenLdapLogic) SyncOpenLdapDepts(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
通过ldap获取部门信息
func (OpenLdapLogic) SyncOpenLdapUsers ¶ added in v0.5.0
func (d OpenLdapLogic) SyncOpenLdapUsers(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
根据现有数据库同步到的部门信息,开启用户同步
type OperationLogLogic ¶
type OperationLogLogic struct{}
func (OperationLogLogic) Clean ¶ added in v0.5.18
func (l OperationLogLogic) Clean(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
func (OperationLogLogic) Delete ¶
func (l OperationLogLogic) Delete(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
Delete 删除数据
func (OperationLogLogic) List ¶
func (l OperationLogLogic) List(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
List 数据列表
type RoleLogic ¶
type RoleLogic struct{}
func (RoleLogic) GetApiList ¶
func (l RoleLogic) GetApiList(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
GetApiList 获取角色接口列表
func (RoleLogic) GetMenuList ¶
func (l RoleLogic) GetMenuList(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
GetMenuList 获取角色菜单列表
func (RoleLogic) UpdateApis ¶
func (l RoleLogic) UpdateApis(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
UpdateApis 更新角色接口
func (RoleLogic) UpdateMenus ¶
func (l RoleLogic) UpdateMenus(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
UpdateMenus 更新角色菜单
type SqlLogic ¶ added in v0.5.5
type SqlLogic struct{}
func (*SqlLogic) SyncSqlGroups ¶ added in v0.5.5
func (d *SqlLogic) SyncSqlGroups(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
SyncSqlGroups 同步sql中的分组信息到ldap
func (*SqlLogic) SyncSqlUsers ¶ added in v0.5.5
func (d *SqlLogic) SyncSqlUsers(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
SyncSqlUsers 同步sql的用户信息到ldap
type UserLogic ¶
type UserLogic struct{}
func (UserLogic) ChangePwd ¶
func (l UserLogic) ChangePwd(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
ChangePwd 修改密码
func (UserLogic) ChangeUserStatus ¶
func (l UserLogic) ChangeUserStatus(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
ChangeUserStatus 修改用户状态
func (UserLogic) GetUserInfo ¶
func (l UserLogic) GetUserInfo(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
GetUserInfo 获取用户信息
type WeComLogic ¶ added in v0.2.0
type WeComLogic struct { }
func (WeComLogic) AddDepts ¶ added in v0.2.0
func (d WeComLogic) AddDepts(group *model.Group) error
AddGroup 添加部门数据
func (WeComLogic) AddUsers ¶ added in v0.2.0
func (d WeComLogic) AddUsers(user *model.User) error
AddUser 添加用户数据
func (*WeComLogic) SyncWeComDepts ¶ added in v0.2.0
func (d *WeComLogic) SyncWeComDepts(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
通过企业微信获取部门信息
func (WeComLogic) SyncWeComUsers ¶ added in v0.2.0
func (d WeComLogic) SyncWeComUsers(c *gin.Context, req interface{}) (data interface{}, rspError interface{})
根据现有数据库同步到的部门信息,开启用户同步