common.api
1.4 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// 通用接口
@server(
prefix: v1
group: common
)
service Core {
@doc "日志查询"
@handler commonGetLog
get /log/:module
@doc "文件服务"
@handler commonGetFile
get /file/:module
}
// 通用接口
@server(
prefix: v1
middleware: LogRequest
group: common
)
service Core {
@doc "短信验证码"
@handler commonSmsCode
post /common/sms/code (CommonSmsCodeRequest) returns (CommonSmsCodeResposne)
@doc "短信验证码"
@handler commonTextToSpeech
post /common/tts (TextToSpeechRequest) returns (TextToSpeechResponse)
@doc "微信二维码"
@handler miniQrcodeInvite
post /mini/qrcode (MiniQrCodeRequest)
@doc "清理缓存"
@handler commonGetClearCache
get /clear
}
// 短信验证码
type(
CommonSmsCodeRequest{
Phone string `json:"phone"`
}
CommonSmsCodeResposne{
}
)
type(
MiniQrCodeRequest{
Page string `json:"page"` // 微信页面入口
Scene string `json:"scene"` // 参数
}
)
type(
TextToSpeechRequest{
Text string `json:"text"` // 文本信息
}
TextToSpeechResponse{
AudioUrl string `json:"audioUrl"` // 音频文件地址
}
)