-
Notifications
You must be signed in to change notification settings - Fork 2
/
api.yaml
44 lines (43 loc) · 1018 Bytes
/
api.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
- Name: User
PackagePath: "api/user"
Desc: "用户相关的controller"
RoutePrefix: "/test/user"
AllPost: true
RouteImports:
- "controller/role"
- "controller/role1"
RouteHandlers:
- "role.xxx()"
- "role2.xxx()"
Routes:
- Name: Login
Desc: "登录"
Path: "/v1/login"
Method: "POST"
Handlers:
- "middleware.AccessHandler()"
- "middleware.SignHandler()"
Arguments:
- "Id: string"
- "Username: string, Optional, Desc: 登录帐号, Default: \"debug\""
Result: nil
- Name: GetInfo
Desc: "获取用户信息"
Path: "/v1/get_info"
Method: "GET"
Arguments:
- "Id: string"
Result: User
- Name: Role
PackagePath: "controller/role"
Desc: "角色相关的controller"
RoutePrefix: "/test/role"
AllPost: true
Routes:
- Name: GetInfo
Desc: "获取角色信息"
Path: "/v1/get_info"
Method: "GET"
Arguments:
- "Id: string"
Result: Role