3.3 KiB
3.3 KiB
\UserApiApi
All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| GetUserInfo | Get /api/user/{id} | 获取用户信息 |
| Login | Post /api/user/login | 登录 |
| Register | Post /api/user/register | 注册 |
| SearchUser | Get /api/user/search | 用户搜索 |
GetUserInfo
UserInfoReply GetUserInfo(ctx, id, body) 获取用户信息
Required Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | string | ||
| body | UserInfoReq |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Login
interface{} Login(ctx, body) 登录
Required Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| body | LoginReq |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Register
interface{} Register(ctx, body) 注册
注册一个用户
Required Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| body | RegisterReq |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SearchUser
UserSearchReply SearchUser(ctx, body) 用户搜索
Required Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| body | UserSearchReq |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]