2023-11-13 09:52:20 +00:00
|
|
|
syntax = "v1"
|
|
|
|
|
|
|
|
info (
|
|
|
|
title: // TODO: add title
|
|
|
|
desc: // TODO: add description
|
|
|
|
author: ""
|
|
|
|
email: ""
|
|
|
|
)
|
|
|
|
|
|
|
|
import "basic.api"
|
|
|
|
|
|
|
|
service ldap-admin {
|
2023-11-14 07:03:01 +00:00
|
|
|
//获取API列表
|
|
|
|
@handler GetApisHandler
|
|
|
|
get /api/ldap-admin/get_apis(GetApisReq) returns (response);
|
2023-11-16 06:07:53 +00:00
|
|
|
|
2023-11-14 07:03:01 +00:00
|
|
|
//保存API
|
|
|
|
@handler SaveApiHandler
|
|
|
|
post /api/ldap-admin/save_api(SaveApiReq) returns (response);
|
2023-11-16 06:07:53 +00:00
|
|
|
|
2023-11-15 07:16:14 +00:00
|
|
|
//保存菜单
|
|
|
|
@handler SaveMenuHandler
|
|
|
|
post /api/ldap-admin/save_menu(SaveMenuReq) returns (response);
|
2023-11-15 07:50:18 +00:00
|
|
|
//删除菜单
|
|
|
|
@handler DeleteMenuHandler
|
|
|
|
post /api/ldap-admin/delete_menu(DeleteMenuReq) returns (response);
|
|
|
|
//获取菜单详情
|
|
|
|
@handler GetMenuDetailHandler
|
|
|
|
get /api/ldap-admin/get_menu_detail(GetMenuDetailReq) returns (response);
|
|
|
|
//获取菜单列表
|
|
|
|
@handler GetMenusHandler
|
|
|
|
get /api/ldap-admin/get_menus(GetMenusReq) returns (response);
|
2023-11-16 06:07:53 +00:00
|
|
|
//获取ldap组织列表
|
2023-11-16 08:59:51 +00:00
|
|
|
@handler GetLdapOrginationsHandler
|
2023-11-16 06:29:24 +00:00
|
|
|
get /api/ldap-admin/get_ldap_orginations(request) returns (response);
|
2023-11-16 06:07:53 +00:00
|
|
|
//增加ldap组织
|
2023-11-16 06:29:24 +00:00
|
|
|
@handler CreateLdapOrginationHandler
|
|
|
|
post /api/ldap-admin/create_ldap_orgination(CreateLdapOrginationReq) returns (response);
|
2023-11-16 06:07:53 +00:00
|
|
|
//删除ldap组织
|
2023-11-16 06:29:24 +00:00
|
|
|
@handler DeleteLdapOrginationHandler
|
|
|
|
post /api/ldap-admin/delete_ldap_orgination(DeleteLdapOrginationReq) returns (response);
|
2023-11-16 08:57:29 +00:00
|
|
|
//修改ldap组织
|
2023-11-16 06:29:24 +00:00
|
|
|
@handler UpdateLdapOrginationHandler
|
|
|
|
post /api/ldap-admin/update_ldap_orgination(UpdateLdapOrginationReq) returns (response);
|
2023-11-16 08:57:29 +00:00
|
|
|
//添加ldap用户到员工基本组中
|
|
|
|
@handler CreateLdapUserHandler
|
|
|
|
post /api/ldap-admin/create_ldap_user(CreateLdapUserReq) returns (response);
|
|
|
|
//修改ldap用户信息
|
|
|
|
@handler UpdateLdapUserHandler
|
|
|
|
post /api/ldap-admin/update_ldap_user(UpdateLdapUserReq) returns (response);
|
|
|
|
//删除ldap用户
|
|
|
|
@handler DeleteLdapUserHandler
|
|
|
|
post /api/ldap-admin/delete_ldap_user(DeleteLdapUserReq) returns (response);
|
|
|
|
//获取ldap用户信息
|
|
|
|
@handler GetLdapUserInfoHandler
|
|
|
|
get /api/ldap-admin/get_ldap_user_info(GetLdapUserInfoReq) returns (response);
|
2023-11-17 02:22:23 +00:00
|
|
|
//ldap组织添加成员
|
|
|
|
@handler AddLdapOrginationMemberHandler
|
|
|
|
post /api/ldap-admin/add_ldap_orgination_member(AddLdapOrginationMemberReq) returns (response);
|
|
|
|
//ldap组织移除成员
|
|
|
|
@handler RemoveLdapOrginationMemberHandler
|
|
|
|
post /api/ldap-admin/remove_ldap_orgination_member(RemoveLdapOrginationMemberReq) returns (response);
|
2023-11-14 07:03:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type GetApisReq {
|
|
|
|
Sort string `form:"sort,optional"`
|
|
|
|
CurrentPage int `form:"current_page,optional,default=1"`
|
|
|
|
PerPage int `form:"per_page,optional,default=10"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type SaveApiReq {
|
|
|
|
Id int64 `json:"id"`
|
|
|
|
Method string `json:"method"`
|
|
|
|
Path string `json:"path"`
|
|
|
|
Category string `json:"category"`
|
|
|
|
Remark string `json:"remark"`
|
2023-11-13 09:52:20 +00:00
|
|
|
}
|
|
|
|
|
2023-11-15 07:16:14 +00:00
|
|
|
//保存菜单
|
|
|
|
type SaveMenuReq {
|
2023-11-15 07:50:18 +00:00
|
|
|
Id int64 `json:"id"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
Title string `json:"title"`
|
|
|
|
Icon string `json:"icon"`
|
|
|
|
Path string `json:"path"`
|
|
|
|
Sort int64 `json:"sort"`
|
|
|
|
ParentId int64 `json:"parent_id"`
|
|
|
|
Status int64 `json:"status,options=0|1"`
|
|
|
|
}
|
|
|
|
//删除菜单
|
|
|
|
type DeleteMenuReq {
|
|
|
|
Id int64 `json:"id"`
|
|
|
|
}
|
|
|
|
//获取菜单详情
|
|
|
|
type GetMenuDetailReq {
|
|
|
|
Id int64 `form:"id"`
|
|
|
|
}
|
|
|
|
type GetMenuDetailRsp {
|
|
|
|
Id int64 `json:"id"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
Title string `json:"title"`
|
|
|
|
Icon string `json:"icon"`
|
|
|
|
Path string `json:"path"`
|
|
|
|
Sort int64 `json:"sort"`
|
|
|
|
ParentId int64 `json:"parent_id"`
|
|
|
|
Status int64 `json:"status"`
|
|
|
|
}
|
|
|
|
//获取菜单列表
|
|
|
|
type GetMenusReq {
|
2023-11-15 08:32:07 +00:00
|
|
|
CurrentPage int `form:"current_page"`
|
2023-11-15 07:50:18 +00:00
|
|
|
Name string `form:"name"`
|
|
|
|
Title string `form:"title"`
|
|
|
|
Path string `form:"path"`
|
2023-11-15 08:32:07 +00:00
|
|
|
ParentId *int64 `form:"parent_id"`
|
2023-11-15 07:50:18 +00:00
|
|
|
}
|
|
|
|
type GetMenusRsp {
|
|
|
|
List []MenuItem `json:"list"`
|
|
|
|
Meta Meta `json:"meta"`
|
|
|
|
}
|
|
|
|
type MenuItem {
|
2023-11-15 07:16:14 +00:00
|
|
|
Id int64 `json:"id"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
Title string `json:"title"`
|
|
|
|
Icon string `json:"icon"`
|
|
|
|
Path string `json:"path"`
|
|
|
|
Sort int64 `json:"sort"`
|
|
|
|
ParentId int64 `json:"parent_id"`
|
|
|
|
Status int64 `json:"status"`
|
2023-11-16 06:07:53 +00:00
|
|
|
}
|
|
|
|
//增加ldap组织
|
2023-11-16 06:29:24 +00:00
|
|
|
type CreateLdapOrginationReq {
|
|
|
|
OrginationOu string `json:"orgination_ou"` //组织ou
|
|
|
|
BusinessCategory string `json:"business_category"` //组织分类名称
|
|
|
|
ParentOrginationDN string `json:"parent_orgination_dn"` //父级dn
|
2023-11-16 06:07:53 +00:00
|
|
|
}
|
|
|
|
//删除ldap组织
|
2023-11-16 06:29:24 +00:00
|
|
|
type DeleteLdapOrginationReq {
|
|
|
|
OrginationDN string `json:"orgination_dn"` //组织dn
|
2023-11-16 06:07:53 +00:00
|
|
|
}
|
|
|
|
//修改ldap组织
|
2023-11-16 06:29:24 +00:00
|
|
|
type UpdateLdapOrginationReq {
|
|
|
|
OrginationDN string `json:"orgination_dn"` //组织dn
|
2023-11-16 06:07:53 +00:00
|
|
|
BusinessCategory string `json:"business_category"` //组织分类名称
|
2023-11-16 08:57:29 +00:00
|
|
|
}
|
|
|
|
//添加ldap用户到员工基本组中
|
|
|
|
type CreateLdapUserReq {
|
|
|
|
UserName string `json:"user_name"` //用户名
|
|
|
|
Email string `json:"email"` //邮箱
|
|
|
|
Password string `json:"password"` //密码
|
|
|
|
Mobile string `json:"mobile"` //手机号
|
|
|
|
Avatar string `json:"avatar"` //头像地址
|
|
|
|
Status int64 `json:"status,options=0|1"` //状态 1正常0离职
|
|
|
|
}
|
|
|
|
//修改ldap用户信息
|
|
|
|
type UpdateLdapUserReq {
|
2023-11-16 09:42:05 +00:00
|
|
|
UserDN string `json:"user_dn"` //用户dn
|
|
|
|
UserName string `json:"user_name"` //用户名
|
|
|
|
Password string `json:"password,optional"` //密码
|
|
|
|
Mobile string `json:"mobile,optional"` //手机号
|
|
|
|
Avatar string `json:"avatar,optional"` //头像地址
|
|
|
|
Status int64 `json:"status,options=0|1"` //状态 1正常0离职
|
2023-11-16 08:57:29 +00:00
|
|
|
}
|
|
|
|
//删除ldap用户
|
|
|
|
type DeleteLdapUserReq {
|
2023-11-16 09:57:25 +00:00
|
|
|
UserDN string `json:"user_dn"` //用户dn
|
2023-11-16 08:57:29 +00:00
|
|
|
}
|
|
|
|
//获取ldap用户信息
|
|
|
|
type GetLdapUserInfoReq {
|
2023-11-16 10:29:45 +00:00
|
|
|
UserDN string `form:"user_dn"` //用户dn
|
|
|
|
}
|
|
|
|
type GetLdapUserInfoRsp {
|
|
|
|
UserId int64 `json:"userId"`
|
|
|
|
UserDN string `json:"user_dn"`
|
|
|
|
UserName string `json:"user_name"` //用户名
|
|
|
|
Email string `json:"email"` //邮箱
|
|
|
|
Mobile string `json:"mobile"` //手机号
|
|
|
|
Avatar string `json:"avatar"` //头像地址
|
|
|
|
Status int64 `json:"status,options=0|1"` //状态 1正常0离职
|
2023-11-17 02:22:23 +00:00
|
|
|
}
|
|
|
|
//ldap组织添加成员
|
|
|
|
type AddLdapOrginationMemberReq {
|
|
|
|
OrginationDN string `json:"orgination_dn"` //目标组织DN
|
|
|
|
UserDN string `json:"user_dn"` //用户DN
|
|
|
|
}
|
|
|
|
//ldap组织移除成员
|
|
|
|
type RemoveLdapOrginationMemberReq {
|
|
|
|
OrginationDN string `json:"orgination_dn"` //目标组织DN
|
|
|
|
UserDN string `json:"user_dn"` //用户DN
|
2023-11-13 09:52:20 +00:00
|
|
|
}
|