fusenapi/server_api/ldap-admin.api

43 lines
1.1 KiB
Plaintext
Raw Normal View History

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 {
//获取部门列表
@handler GetDepartmentsHandler
2023-11-14 03:26:08 +00:00
get /api/ldap-admin/get_departments(request) returns (response);
2023-11-13 10:57:11 +00:00
//保存部门信息
@handler SaveDepartmentHandler
post /api/ldap-admin/save_department(SaveDepartmentReq) returns (response);
2023-11-13 09:52:20 +00:00
}
//获取部门列表
2023-11-13 10:57:11 +00:00
type GetDepartmentsRsp {
2023-11-14 03:26:08 +00:00
List []*DepartmentsItem `json:"list"`
2023-11-13 10:57:11 +00:00
}
type DepartmentsItem {
2023-11-14 03:26:08 +00:00
Id int64 `json:"id"`
Name string `json:"name"`
Remark string `json:"remark"`
Type string `json:"type"`
ParentId int64 `json:"parent_id"`
Dn string `json:"dn"`
SyncState int64 `json:"sync_state"`
Child []*DepartmentsItem `json:"child"`
2023-11-13 10:57:11 +00:00
}
//保存部门信息
type SaveDepartmentReq {
Id int64 `json:"id"`
Name string `json:"name"`
Remark string `json:"remark"`
Type string `json:"type"`
ParentId int64 `json:"parent_id"`
Dn string `json:"dn"`
2023-11-13 09:52:20 +00:00
}