You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.2 KiB
Plaintext

syntax = "v1"
type (
// Role request | 角色查询请求
// swagger:parameters GetRoleAdmin GetRoleListAdmin
RoleReq {
BaseID
*Pagination
// Name | 角色名称
//
// Required: false
// Example: wechat
Name string `form:"name,optional"`
// Code | 角色编码Like
//
// Required: false
// Example: Admin
Code string `form:"code,optional"`
}
// Role list response | 角色列表查询返回
RoleListResp {
// Page | 分页数据
Page *Pagination `json:"page,optional"`
// List | 数据列表
List []*RoleInfo `json:"list"`
}
)
@server(
jwt: Auth
group: role_admin
middleware: Authority
prefix: /api/admin/role
)
service api {
// Create role information | 创建角色
@handler createRoleAdmin
post /create (RoleInfo)
// Update role information | 更新角色
@handler updateRoleAdmin
post /update (RoleInfo)
// Delete role information | 删除角色信息
@handler deleteRoleAdmin
delete / (BaseIDs)
// Get role list | 获取角色列表
@handler getRoleListAdmin
get /list (RoleReq) returns (RoleListResp)
// Get Role | 根据条件获取角色
@handler getRoleAdmin
get / (RoleReq) returns (RoleInfo)
}