126 lines
3.6 KiB
Plaintext
126 lines
3.6 KiB
Plaintext
syntax = "v1"
|
|
|
|
info (
|
|
title: // TODO: add title
|
|
desc: // TODO: add description
|
|
author: ""
|
|
email: ""
|
|
)
|
|
|
|
import "basic.api"
|
|
|
|
service ldap-admin {
|
|
//获取API列表
|
|
@handler GetApisHandler
|
|
get /api/ldap-admin/get_apis(GetApisReq) returns (response);
|
|
|
|
//保存API
|
|
@handler SaveApiHandler
|
|
post /api/ldap-admin/save_api(SaveApiReq) returns (response);
|
|
|
|
//保存菜单
|
|
@handler SaveMenuHandler
|
|
post /api/ldap-admin/save_menu(SaveMenuReq) returns (response);
|
|
//删除菜单
|
|
@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);
|
|
//获取ldap组织列表
|
|
@handler GetOrganizationsHandler
|
|
get /api/ldap-admin/get_organizations(request) returns (response);
|
|
//增加ldap组织
|
|
@handler CreateLdapOrganizationHandler
|
|
post /api/ldap-admin/create_ldap_orgination(CreateLdapOrganizationReq) returns (response);
|
|
//删除ldap组织
|
|
@handler DeleteLdapOrganizationHandler
|
|
post /api/ldap-admin/delete_ldap_orgination(DeleteLdapOrganizationReq) returns (response);
|
|
//修改组织
|
|
@handler UpdateLdapOrganizationHandler
|
|
post /api/ldap-admin/update_ldap_orgination(UpdateLdapOrganizationReq) returns (response);
|
|
}
|
|
|
|
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"`
|
|
}
|
|
|
|
//保存菜单
|
|
type SaveMenuReq {
|
|
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 {
|
|
CurrentPage int `form:"current_page"`
|
|
Name string `form:"name"`
|
|
Title string `form:"title"`
|
|
Path string `form:"path"`
|
|
ParentId *int64 `form:"parent_id"`
|
|
}
|
|
type GetMenusRsp {
|
|
List []MenuItem `json:"list"`
|
|
Meta Meta `json:"meta"`
|
|
}
|
|
type MenuItem {
|
|
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"`
|
|
}
|
|
//增加ldap组织
|
|
type CreateLdapOrganizationReq {
|
|
OrganizationOu string `json:"organization_ou"` //组织ou
|
|
BusinessCategory string `json:"business_category"` //组织分类名称
|
|
ParentOrganizationDN string `json:"parent_organization_dn"` //父级dn
|
|
}
|
|
//删除ldap组织
|
|
type DeleteLdapOrganizationReq {
|
|
OrganizationDN string `json:"organization_dn"` //组织dn
|
|
}
|
|
//修改ldap组织
|
|
type UpdateLdapOrganizationReq {
|
|
OrganizationDN string `json:"organization_dn"` //组织dn
|
|
BusinessCategory string `json:"business_category"` //组织分类名称
|
|
} |