2025-01-20 01:55:44 +08:00
|
|
|
syntax = "v1"
|
|
|
|
|
2025-01-20 17:36:03 +08:00
|
|
|
import "common.api"
|
2025-01-20 14:37:14 +08:00
|
|
|
|
|
|
|
|
2025-01-20 18:20:25 +08:00
|
|
|
type WechatCode2TokenRequest {
|
2025-01-20 01:55:44 +08:00
|
|
|
AppId string `form:"appId"`
|
|
|
|
Code string `form:"code"`
|
|
|
|
}
|
|
|
|
|
|
|
|
@server (
|
|
|
|
group: wechat
|
|
|
|
prefix: /v1/wechat // 对当前 Foo 语法块下的所有路由,新增 /v1 路由前缀,不需要则请删除此行
|
|
|
|
timeout: 3s // 对当前 Foo 语法块下的所有路由进行超时配置,不需要则请删除此行
|
|
|
|
maxBytes: 1048576 // 对当前 Foo 语法块下的所有路由添加请求体大小控制,单位为 byte,goctl 版本 >= 1.5.0 才支持
|
|
|
|
)
|
|
|
|
|
|
|
|
service game_open_api-api {
|
|
|
|
|
|
|
|
@handler wechatCode2UserId
|
2025-01-20 18:20:25 +08:00
|
|
|
get /code2token (WechatCode2TokenRequest) returns (Auth )
|
2025-01-20 01:55:44 +08:00
|
|
|
}
|
|
|
|
|