fusenapi/server_api/ldap-admin.api

61 lines
1.5 KiB
Plaintext
Raw Normal View History

2023-11-13 17:52:20 +08: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 11:26:08 +08:00
get /api/ldap-admin/get_departments(request) returns (response);
2023-11-14 15:03:01 +08:00
//获取API列表
@handler GetApisHandler
get /api/ldap-admin/get_apis(GetApisReq) returns (response);
2023-11-14 18:39:10 +08:00
2023-11-14 15:03:01 +08:00
//保存API
@handler SaveApiHandler
post /api/ldap-admin/save_api(SaveApiReq) 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"`
Creator string `json:"creator"`
2023-11-13 17:52:20 +08:00
}
//获取部门列表
2023-11-13 18:57:11 +08:00
type GetDepartmentsRsp {
2023-11-14 11:26:08 +08:00
List []*DepartmentsItem `json:"list"`
2023-11-13 18:57:11 +08:00
}
type DepartmentsItem {
2023-11-14 11:26:08 +08: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"`
2023-11-14 11:57:09 +08:00
Sort int64 `json:"sort"`
2023-11-14 11:26:08 +08:00
Child []*DepartmentsItem `json:"child"`
2023-11-14 17:33:05 +08:00
Members []Member `json:"members"`
}
type Member {
Id int64 `json:"id"`
Name string `json:"name"`
Nickname string `json:"nickname"`
Email string `json:"email"`
2023-11-13 17:52:20 +08:00
}