You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
2.5 KiB
46 lines
2.5 KiB
syntax = "proto3";
|
|
option go_package = ".;pb";
|
|
|
|
// 百炼多模态设备计量 —— 半托管模式
|
|
// 设备端通过本模块 HTTP 中转调用阿里云 POP 网关,Go 服务不做业务加工,仅做签名透传。
|
|
// 说明:路由按 {module}_{method} 小写生成,例如 bailian_deviceregister / bailian_gettoken
|
|
|
|
// 设备端上送的注册请求 —— 原样转发给 POP
|
|
message BailianDeviceRegisterReq {
|
|
string appId = 1; //@go_tags(`json:"appId" binding:"required"`) 产品标识
|
|
string deviceName = 2; //@go_tags(`json:"deviceName"`) 设备唯一标识(可选,透传用)
|
|
string nonce = 3; //@go_tags(`json:"nonce" binding:"required"`) 16 字节随机数 32 字符
|
|
string requestTime = 4; //@go_tags(`json:"requestTime" binding:"required"`) 毫秒时间戳字符串
|
|
string sdkVersion = 5; //@go_tags(`json:"sdkVersion"`) 设备端 SDK 版本
|
|
string signature = 6; //@go_tags(`json:"signature" binding:"required"`) 设备端签名
|
|
}
|
|
|
|
// 透传给设备端:结构必须与 POP 返回的 data 字段一致,设备端 SDK 解签
|
|
message BailianDeviceRegisterResp {
|
|
string nonce = 1; //@go_tags(`json:"nonce"`)
|
|
string responseTime = 2; //@go_tags(`json:"responseTime"`)
|
|
string appId = 3; //@go_tags(`json:"appId"`)
|
|
string deviceName = 4; //@go_tags(`json:"deviceName"`)
|
|
string signature = 5; //@go_tags(`json:"signature"`)
|
|
}
|
|
|
|
// 设备端上送的获取令牌请求 —— 原样转发给 POP,tokenKey 由服务端补注
|
|
message BailianGetTokenReq {
|
|
string appId = 1; //@go_tags(`json:"appId" binding:"required"`)
|
|
string deviceName = 2; //@go_tags(`json:"deviceName" binding:"required"`)
|
|
string nonce = 3; //@go_tags(`json:"nonce"`) 可选,部分版本设备 SDK 不下发
|
|
string payMode = 4; //@go_tags(`json:"payMode"`) 固定 "LICENSE"
|
|
string requestTime = 5; //@go_tags(`json:"requestTime" binding:"required"`)
|
|
string sdkVersion = 6; //@go_tags(`json:"sdkVersion"`)
|
|
string tokenType = 7; //@go_tags(`json:"tokenType" binding:"required"`) 固定 "MMI"
|
|
string signature = 8; //@go_tags(`json:"signature" binding:"required"`)
|
|
}
|
|
|
|
message BailianGetTokenResp {
|
|
string nonce = 1; //@go_tags(`json:"nonce"`)
|
|
string responseTime = 2; //@go_tags(`json:"responseTime"`)
|
|
string appId = 3; //@go_tags(`json:"appId"`)
|
|
string deviceName = 4; //@go_tags(`json:"deviceName"`)
|
|
string requestIp = 5; //@go_tags(`json:"requestIp"`)
|
|
string signature = 6; //@go_tags(`json:"signature"`)
|
|
}
|
|
|