Commit 30d9d842 authored by yujiwei's avatar yujiwei

update:add websitelog [b

parent 94bec4fc
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: websitelog.proto
namespace GPBMetadata;
class Websitelog
{
public static $is_initialized = false;
public static function initOnce() {
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
if (static::$is_initialized == true) {
return;
}
$pool->internalAddGeneratedFile(hex2bin(
"0a800c0a10776562736974656c6f672e70726f746f121367617465776179" .
"2e646174612e7261776c6f6722f2010a03554944120f0a07757365725f69" .
"64180120012803122b0a047479706518022001280e321d2e676174657761" .
"792e646174612e7261776c6f672e5549442e5479706512110a0964657669" .
"63655f6964180320012809120c0a047775696418052001280912110a0972" .
"656665725f75696418072001280912110a09757365725f6e616d65180820" .
"01280912110a09757365725f7479706518092001280912110a096275636b" .
"65745f6964180a2001280312180a1069735f73757065725f6163636f756e" .
"74180b20012808120b0a03776964180c2001280922190a04547970651208" .
"0a044e4f4e45100012070a034d4435100122b0040a074170704d65746112" .
"0e0a066170705f696418012001280912140a0c6275696c645f6e756d6265" .
"7218022001280912160a0e62756e646c655f76657273696f6e1803200128" .
"09121c0a14646973747269627574696f6e5f6368616e6e656c1804200128" .
"09120c0a04696d6569180620012809120e0a066d61635f69641807200128" .
"0912120a0a616e64726f69645f6964180820012809121e0a16616e64726f" .
"69645f6164766572746973696e675f696418092001280912130a0b646576" .
"6963655f6e616d65180b20012809120d0a056272616e64180c2001280912" .
"160a0e73637265656e5f64656e73697479180e2001280912170a0f70726f" .
"636573736f725f636f756e74180f2001280512170a0f706879736963616c" .
"5f6d656d6f727918102001280912140a0c73637265656e5f776964746818" .
"112001280512160a0e73637265656e745f68656967687418122001280512" .
"2f0a08706c6174666f726d18152001280e321d2e676174657761792e6461" .
"74612e7261776c6f672e506c6174666f726d12180a106f7065726174696e" .
"675f73797374656d18162001280912100a086c616e677561676518172001" .
"2809120f0a07636f756e747279181820012809120f0a07746d5f7a6f6e65" .
"18192001280912150a0d696f735f6a61696c627265616b18332001280812" .
"220a1a696f735f6164766572746973696e675f6964656e74696669657218" .
"382001280912210a19696f735f6964656e7469666965725f666f725f7665" .
"6e646f7218392001280922e5040a0a576562736974654c6f6712170a0f72" .
"6571756573745f74696d655f6d7318012001280312180a10726573706f6e" .
"73655f74696d655f6d73180220012803120e0a06616374696f6e18032001" .
"280912140a0c726563765f74696d655f6d7318062001280312130a0b7265" .
"6d6f74655f686f737418082001280912100a08636865636b73756d180920" .
"012809122e0a086170705f6d65746118652001280b321c2e676174657761" .
"792e646174612e7261776c6f672e4170704d65746112130a0b6170695f76" .
"657273696f6e18662001280912250a0375696418672001280b32182e6761" .
"74657761792e646174612e7261776c6f672e554944120d0a057265716964" .
"186820012809120a0a02697018692001280912100a086e65745f74797065" .
"186a20012809124d0a0f726571756573745f636f6e7465787418c7012003" .
"280b32332e676174657761792e646174612e7261776c6f672e5765627369" .
"74654c6f672e52657175657374436f6e74657874456e747279120f0a0673" .
"746174757318c90120012809120d0a04636f646518ca0120012805120f0a" .
"06726561736f6e18cb0120012809124f0a10726573706f6e73655f636f6e" .
"7465787418ab022003280b32342e676174657761792e646174612e726177" .
"6c6f672e576562736974654c6f672e526573706f6e7365436f6e74657874" .
"456e7472791a350a1352657175657374436f6e74657874456e747279120b" .
"0a036b6579180120012809120d0a0576616c75651802200128093a023801" .
"1a360a14526573706f6e7365436f6e74657874456e747279120b0a036b65" .
"79180120012809120d0a0576616c75651802200128093a0238012a3f0a08" .
"506c6174666f726d12070a03494f531000120b0a07416e64726f69641001" .
"12070a03576562100212140a07556e6b6e6f776e10ffffffffffffffffff" .
"01620670726f746f33"
));
static::$is_initialized = true;
}
}
This diff is collapsed.
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: websitelog.proto
namespace Gateway\Data\Rawlog;
/**
* 描述app的平台
*
* Protobuf type <code>gateway.data.rawlog.Platform</code>
*/
class Platform
{
/**
*ios  
*
* Generated from protobuf enum <code>IOS = 0;</code>
*/
const IOS = 0;
/**
* android
*
* Generated from protobuf enum <code>Android = 1;</code>
*/
const Android = 1;
/**
* web
*
* Generated from protobuf enum <code>Web = 2;</code>
*/
const Web = 2;
/**
*unknown
*
* Generated from protobuf enum <code>Unknown = -1;</code>
*/
const Unknown = -1;
}
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: websitelog.proto
namespace Gateway\Data\Rawlog;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>gateway.data.rawlog.UID</code>
*/
class UID extends \Google\Protobuf\Internal\Message
{
/**
* 用户ID
*
* Generated from protobuf field <code>int64 user_id = 1;</code>
*/
private $user_id = 0;
/**
* 如果是MD5,此时device_id和mac_id都是MD5过的
*
* Generated from protobuf field <code>.gateway.data.rawlog.UID.Type type = 2;</code>
*/
private $type = 0;
/**
* based imei on android or idfa on ios
*
* Generated from protobuf field <code>string device_id = 3;</code>
*/
private $device_id = '';
/**
* Web user id, 只有Web用户才有
*
* Generated from protobuf field <code>string wuid = 5;</code>
*/
private $wuid = '';
/**
* web user, 来源的uid
*
* Generated from protobuf field <code>string refer_uid = 7;</code>
*/
private $refer_uid = '';
/**
* 用户名
*
* Generated from protobuf field <code>string user_name = 8;</code>
*/
private $user_name = '';
/**
* 是否登录(游客)
*
* Generated from protobuf field <code>string user_type = 9;</code>
*/
private $user_type = '';
/**
* 用户bucket id
*
* Generated from protobuf field <code>int64 bucket_id = 10;</code>
*/
private $bucket_id = 0;
/**
* 是否超级公共账号
*
* Generated from protobuf field <code>bool is_super_account = 11;</code>
*/
private $is_super_account = false;
/**
*微信相关的MD5ID
*
* Generated from protobuf field <code>string wid = 12;</code>
*/
private $wid = '';
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type int|string $user_id
* 用户ID
* @type int $type
* 如果是MD5,此时device_id和mac_id都是MD5过的
* @type string $device_id
* based imei on android or idfa on ios
* @type string $wuid
* Web user id, 只有Web用户才有
* @type string $refer_uid
* web user, 来源的uid
* @type string $user_name
* 用户名
* @type string $user_type
* 是否登录(游客)
* @type int|string $bucket_id
* 用户bucket id
* @type bool $is_super_account
* 是否超级公共账号
* @type string $wid
* 微信相关的MD5ID
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Websitelog::initOnce();
parent::__construct($data);
}
/**
* 用户ID
*
* Generated from protobuf field <code>int64 user_id = 1;</code>
* @return int|string
*/
public function getUserId()
{
return $this->user_id;
}
/**
* 用户ID
*
* Generated from protobuf field <code>int64 user_id = 1;</code>
* @param int|string $var
* @return $this
*/
public function setUserId($var)
{
GPBUtil::checkInt64($var);
$this->user_id = $var;
return $this;
}
/**
* 如果是MD5,此时device_id和mac_id都是MD5过的
*
* Generated from protobuf field <code>.gateway.data.rawlog.UID.Type type = 2;</code>
* @return int
*/
public function getType()
{
return $this->type;
}
/**
* 如果是MD5,此时device_id和mac_id都是MD5过的
*
* Generated from protobuf field <code>.gateway.data.rawlog.UID.Type type = 2;</code>
* @param int $var
* @return $this
*/
public function setType($var)
{
GPBUtil::checkEnum($var, \Gateway\Data\Rawlog\UID_Type::class);
$this->type = $var;
return $this;
}
/**
* based imei on android or idfa on ios
*
* Generated from protobuf field <code>string device_id = 3;</code>
* @return string
*/
public function getDeviceId()
{
return $this->device_id;
}
/**
* based imei on android or idfa on ios
*
* Generated from protobuf field <code>string device_id = 3;</code>
* @param string $var
* @return $this
*/
public function setDeviceId($var)
{
GPBUtil::checkString($var, True);
$this->device_id = $var;
return $this;
}
/**
* Web user id, 只有Web用户才有
*
* Generated from protobuf field <code>string wuid = 5;</code>
* @return string
*/
public function getWuid()
{
return $this->wuid;
}
/**
* Web user id, 只有Web用户才有
*
* Generated from protobuf field <code>string wuid = 5;</code>
* @param string $var
* @return $this
*/
public function setWuid($var)
{
GPBUtil::checkString($var, True);
$this->wuid = $var;
return $this;
}
/**
* web user, 来源的uid
*
* Generated from protobuf field <code>string refer_uid = 7;</code>
* @return string
*/
public function getReferUid()
{
return $this->refer_uid;
}
/**
* web user, 来源的uid
*
* Generated from protobuf field <code>string refer_uid = 7;</code>
* @param string $var
* @return $this
*/
public function setReferUid($var)
{
GPBUtil::checkString($var, True);
$this->refer_uid = $var;
return $this;
}
/**
* 用户名
*
* Generated from protobuf field <code>string user_name = 8;</code>
* @return string
*/
public function getUserName()
{
return $this->user_name;
}
/**
* 用户名
*
* Generated from protobuf field <code>string user_name = 8;</code>
* @param string $var
* @return $this
*/
public function setUserName($var)
{
GPBUtil::checkString($var, True);
$this->user_name = $var;
return $this;
}
/**
* 是否登录(游客)
*
* Generated from protobuf field <code>string user_type = 9;</code>
* @return string
*/
public function getUserType()
{
return $this->user_type;
}
/**
* 是否登录(游客)
*
* Generated from protobuf field <code>string user_type = 9;</code>
* @param string $var
* @return $this
*/
public function setUserType($var)
{
GPBUtil::checkString($var, True);
$this->user_type = $var;
return $this;
}
/**
* 用户bucket id
*
* Generated from protobuf field <code>int64 bucket_id = 10;</code>
* @return int|string
*/
public function getBucketId()
{
return $this->bucket_id;
}
/**
* 用户bucket id
*
* Generated from protobuf field <code>int64 bucket_id = 10;</code>
* @param int|string $var
* @return $this
*/
public function setBucketId($var)
{
GPBUtil::checkInt64($var);
$this->bucket_id = $var;
return $this;
}
/**
* 是否超级公共账号
*
* Generated from protobuf field <code>bool is_super_account = 11;</code>
* @return bool
*/
public function getIsSuperAccount()
{
return $this->is_super_account;
}
/**
* 是否超级公共账号
*
* Generated from protobuf field <code>bool is_super_account = 11;</code>
* @param bool $var
* @return $this
*/
public function setIsSuperAccount($var)
{
GPBUtil::checkBool($var);
$this->is_super_account = $var;
return $this;
}
/**
*微信相关的MD5ID
*
* Generated from protobuf field <code>string wid = 12;</code>
* @return string
*/
public function getWid()
{
return $this->wid;
}
/**
*微信相关的MD5ID
*
* Generated from protobuf field <code>string wid = 12;</code>
* @param string $var
* @return $this
*/
public function setWid($var)
{
GPBUtil::checkString($var, True);
$this->wid = $var;
return $this;
}
}
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: websitelog.proto
namespace Gateway\Data\Rawlog\UID;
/**
* 出于安全的考虑,部分手机上使用的是md5过的imei号;
*
* Protobuf type <code>gateway.data.rawlog.UID.Type</code>
*/
class Type
{
/**
* Generated from protobuf enum <code>NONE = 0;</code>
*/
const NONE = 0;
/**
* Generated from protobuf enum <code>MD5 = 1;</code>
*/
const MD5 = 1;
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Type::class, \Gateway\Data\Rawlog\UID_Type::class);
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: websitelog.proto
namespace Gateway\Data\Rawlog;
if (false) {
/**
* This class is deprecated. Use Gateway\Data\Rawlog\UID\Type instead.
* @deprecated
*/
class UID_Type {}
}
class_exists(UID\Type::class);
@trigger_error('Gateway\Data\Rawlog\UID_Type is deprecated and will be removed in the next major release. Use Gateway\Data\Rawlog\UID\Type instead', E_USER_DEPRECATED);
This diff is collapsed.
<?php
namespace Api\PhpUtils\Protobuf\WebsiteLog;
use Api\PhpUtils\Http\Request;
use Gateway\Data\Rawlog\AppMeta;
use Gateway\Data\Rawlog\UID;
use Gateway\Data\Rawlog\WebsiteLog;
use http\Exception;
use Api\PhpUtils\Log;
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Gateway/Data/Rawlog/WebsiteLog.php';
//require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Yidian/Data/Rawlog/UID_Type.php';
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Gateway/Data/Rawlog/UID.php';
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Gateway/Data/Rawlog/UID/Type.php';
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Gateway/Data/Rawlog/AppMeta.php';
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Gateway/Data/Rawlog/Platform.php';
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'GPBMetadata/Websitelog.php';
class WebLog
{
private const BP_WEBSITE_PB_LOG_URL = 'http://online-feedback-receiver.ha.in.yidian.com:9088/OnlineFeedbackReceiver/ProtobufStreamHandler?topic=rawlog_bp_api_bp_gateway_prod';
/**
* 日志格式转pb格式
*
* @param array $log
* @return string
*/
public function log2pb(array $log) : string
{
try
{
//message对象
$uid = new UID();
$app_meta = new AppMeta();
$website_log = new WebsiteLog();
$action = $this->formatAction($_SERVER['action']);
$platform_list = array(
"IOS" => 0,
"Android" => 1,
"Web" => 2,
"Unknown" => -1
); //平台列表
//app_meta属性赋值
//App相关配置
$app_meta->setAppId($log['request']['appid'] ?? ''); //appid
$app_meta->setBundleVersion($log['request']['clientInfo']['userInfo']['appVersion'] ?? $log['request']['log']['bundle_version'] ?? '');
$app_meta->setDistributionChannel($log['request']['distribution'] ?? '');
$app_meta->setImei($log['request']['clientInfo']['userInfo']['imei'] ?? $log['request']['imei'] ?? '');
$app_meta->setMacId($log['request']['clientInfo']['userInfo']['mac'] ?? $log['request']['mac'] ?? '');
$app_meta->setAndroidId($log['request']['clientInfo']['userInfo']['androidId'] ?? $log['request']['androidId'] ?? '');
//设备相关的元数据
$app_meta->setDeviceName($log['request']['clientInfo']['deviceInfo']['deviceName'] ?? $log['request']['deviceName'] ?? $log['request']['clientInfo']['deviceInfo']['model'] ?? '');
$app_meta->setBrand($log['request']['clientInfo']['deviceInfo']['brand'] ?? $log['request']['deviceBrand'] ?? '');
$app_meta->setScreenDensity($log['request']['clientInfo']['deviceInfo']['screenDensity'] ?? '');
if (isset($log['request']['clientInfo']['deviceInfo']['screenWidth']) && is_numeric($log['request']['clientInfo']['deviceInfo']['screenWidth']))
{
$app_meta->setScreenWidth((int)$log['request']['clientInfo']['deviceInfo']['screenWidth']);
}
if (isset($log['request']['clientInfo']['deviceInfo']['screenHeight']) && is_numeric($log['request']['clientInfo']['deviceInfo']['screenHeight']))
{
$app_meta->setScreentHeight((int)$log['request']['clientInfo']['deviceInfo']['screenHeight']);
}
//操作系统相关配置
if (isset($log['request']['platform']) && is_numeric($log['request']['platform']) && in_array($log['request']['platform'], $platform_list))
{
$app_meta->setPlatform((int)$log['request']['platform']);
}
else
{
$app_meta->setPlatform(-1);
}
$app_meta->setOperatingSystem($log['request']['clientInfo']['deviceInfo']['androidVersion'] ?? $log['request']['clientInfo']['deviceInfo']['iosVersion'] ?? '');
$app_meta->setLanguage($log['request']['clientInfo']['userInfo']['language'] ?? '');
$app_meta->setCountry($log['request']['clientInfo']['userInfo']['country'] ?? '');
//iOS相关的信息
$app_meta->setIosAdvertisingIdentifier($log['request']['clientInfo']['userInfo']['ifa'] ?? $log['request']['clientInfo']['app_info']['ifa'] ?? '');
$app_meta->setIosIdentifierForVendor($log['request']['clientInfo']['app_info']['idfv'] ?? '');
//uid属性赋值
if (isset($log['request']['userid']) && is_numeric($log['request']['userid']))
{
$uid->setUserId((int)$log['request']['userid']); //userid
}
$uid->setDeviceId($log['request']['deviceid'] ?? $log['request']['clientInfo']['app_info']['device_id'] ?? '');
$uid->setUserName($log['request']['username'] ?? '');
$uid->setUserType($log['request']['usertype'] ?? '');
if (isset($log['request']['log']['bucket_id']) && is_numeric($log['request']['bucket_id']))
{
$uid->setBucketId($log['request']['log']['bucket_id']);
}
$uid->setIsSuperAccount($log['request']['is_super_account'] ?? false);
$uid->setWid($log['request']['wid'] ?? '');
//website_log属性赋值
$website_log->setRequestTimeMs(isset($log['request_time']) ? floor($log['request_time'] * 1000) : 0);
$website_log->setResponseTimeMs(isset($log['response_time']) ? floor($log['response_time'] * 1000) : 0);
$website_log->setAction($action);
$website_log->setRecvTimeMs(isset($log['recv_time']) ? floor($log['recv_time'] * 1000) : 0);
$website_log->setRemoteHost($log['request']['clientInfo']['userInfo']['ip'] ?? '');
$website_log->setChecksum($log['request']['checksum'] ?? '');
//request内容
$website_log->setAppMeta($app_meta);
$website_log->setApiVersion($log['request']['version'] ?? '');
$website_log->setUid($uid);
$website_log->setReqid($log['request']['requestId'] ?? $log['request']['reqid'] ?? '');
//response内容
$website_log->setStatus($log['response']['status'] ?? 'success');
$website_log->setCode($log['response']['code'] ?? 0);
$website_log->setReason($log['response']['reason'] ?? '');
return $website_log->serializeToString(); //序列化
} catch (Exception $e)
{
return '';
}
}
/**
* 格式化action: (1)将 // 替换成 /; (2)去掉开头的/; (3)/ 和 - 替换为 _; (4)转换为小写
*
* @param $action
* @return mixed
*/
private function formatAction($action)
{
$tmp1 = str_replace('//', '/', $action);
$tmp2 = strtolower(substr($tmp1, 1, strlen($tmp1) - 1));
return str_replace(array('/', '-'), '_', $tmp2);
}
/**
* 发送pb 日志
* @param $result
* @param int $percentage
* @param bool $send_request
* @param string $action
*/
public function sendPbLog($result,$percentage = 100, $send_request = true, $action = '')
{
if ($percentage >= 100 || $_SERVER['REQUEST_TIME'] % 100 < $percentage)
{
$log = array(
'request_time' => $_SERVER['REQUEST_TIME_FLOAT'],
'response_time' => microtime(true)
);
$log['action'] = $action ?? explode('?', $_SERVER['REQUEST_URI'])[0];
if ($send_request === true)
{
$log['request'] = array_merge( $_GET, $_POST );
} else if ($send_request !== false) {
$log['request'] = $send_request;
}
$log['response']['status'] = $result['status']??'';
$log['response']['code'] = $result['code']??'';
$log['response']['reason'] = $result['reason']??'';
if( !empty($GLOBALS['related_url']) )
{
$log['response']['related_url'] = $GLOBALS['related_url'];
}
if (extension_loaded('protobuf'))
{
$data = $this->log2pb($log);
if (!empty($data))
{
$bp_website_pb_log_url = self::BP_WEBSITE_PB_LOG_URL;
$res = (new Request())->post($bp_website_pb_log_url, $data, 50, ['Content-Type: binary/octet-stream'], [], 1);
}
}
}
}
}
\ No newline at end of file
syntax = "proto3";
package gateway.data.rawlog;
// 描述app的平台
enum Platform {
IOS = 0; //ios  
Android = 1; // android
Web = 2; // web
Unknown = -1; //unknown
};
message UID {
enum Type { // 出于安全的考虑,部分手机上使用的是md5过的imei号;
NONE = 0;
MD5 = 1;
};
int64 user_id = 1; // 用户ID
Type type = 2; // 如果是MD5,此时device_id和mac_id都是MD5过的
string device_id = 3; // based imei on android or idfa on ios
string wuid = 5; // Web user id, 只有Web用户才有
string refer_uid = 7; // web user, 来源的uid
string user_name = 8; // 用户名
string user_type = 9; // 是否登录(游客)
int64 bucket_id = 10; // 用户bucket id
bool is_super_account = 11; // 是否超级公共账号
string wid = 12; //微信相关的MD5ID
};
message AppMeta {
// App相关配置
string app_id = 1;
string build_number = 2; // 发布号是后台区分版本的唯一id,不同平台,不同版本都需要保证全局的唯一性
string bundle_version = 3; // app_version
string distribution_channel = 4; // 分发渠道,是否修改为枚举?
string imei = 6; // md5后的imei号
string mac_id = 7; // MacID
string android_id = 8; // 安卓系统用户id
string android_advertising_id = 9; // 安卓系统用户谷歌广告id 201805 安卓4660版本新增
// 设备相关的元数据
string device_name = 11; // 设备名
string brand = 12; // 机器的品牌
//optional string screen_resolution = 13; // 屏幕分辨率
string screen_density = 14; // 屏幕密度,每英寸有多少个显示点
int32 processor_count = 15; // 处理器核数
string physical_memory = 16; // 机器内存, 单位MB
int32 screen_width = 17; // 屏幕的宽度像素点
int32 screent_height = 18; // 屏幕的高度像素点
// 操作系统相关配置
Platform platform = 21; // 平台
string operating_system = 22; // 操作系统名
string language = 23; // 语言
string country = 24; // 国家
string tm_zone = 25; // 时区
// iOS相关的信息
bool ios_jailbreak = 51; // 是否越狱
string ios_advertising_identifier = 56; // 唯一区分设备号idfa
string ios_identifier_for_vendor = 57; // idfv
};
message WebsiteLog {
int64 request_time_ms = 1; // 请求时间,精确到毫秒
int64 response_time_ms = 2; // 请求的响应时间,精确到毫秒
string action = 3; // 事件标识
int64 recv_time_ms = 6; // 日志接收时间
string remote_host = 8; // 前端ip?
string checksum = 9; // 日志唯一性标识?
// 以下为 request 的内容
AppMeta app_meta = 101; // app客户端的meta信息
string api_version = 102; // API 版本号
UID uid = 103; // 用户相关的ID, 唯一标识用户
string reqid = 104; // (来自API组的需求) request_id
string ip = 105; //request.ip / request.clientInfo.deviceInfo.ip
string net_type = 106; //request.net
// 其它常用 request 参数待补充
map<string, string> request_context = 199; // 其它不常用的来自请求的输入参数
// 以下为 response 的内容
string status = 201; // 请求是否成功的状态标识
int32 code = 202; // 具体状态code
string reason = 203; // 错误原因
// 其它常用 response 参数待补充
map<string, string> response_context = 299; // 其它不常用的来自响应的输入参数
};
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment