From 4a7d4165f84835d9b16b918d6d0399e1d86b8b6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Fri, 17 Jun 2022 19:00:56 +0800 Subject: [PATCH] modify plugin name --- kiri-grpc-server/composer.json | 11 ++ .../exp/GPBMetadata/UserService.php | Bin 0 -> 1969 bytes .../exp/User/UserDetailRequest.php | 58 ++++++ .../exp/User/UserDetailResponse.php | 85 +++++++++ .../exp/User/UserJwtCheckRequest.php | 58 ++++++ .../exp/User/UserJwtCheckResponse.php | 85 +++++++++ kiri-grpc-server/exp/User/UserKickRequest.php | 58 ++++++ .../exp/User/UserKickResponse.php | 85 +++++++++ kiri-grpc-server/exp/User/UserLockRequest.php | 85 +++++++++ .../exp/User/UserLockResponse.php | 85 +++++++++ .../exp/User/UserOfflineRequest.php | 58 ++++++ .../exp/User/UserOfflineResponse.php | 85 +++++++++ .../exp/User/UserOnlineRequest.php | 87 +++++++++ .../exp/User/UserOnlineResponse.php | 176 ++++++++++++++++++ .../exp/User/UserShieldRequest.php | 58 ++++++ .../exp/User/UserShieldResponse.php | 85 +++++++++ kiri-grpc-server/exp/User/UserStatus.php | 166 +++++++++++++++++ .../exp/User/UserUnLockRequest.php | 58 ++++++ .../exp/User/UserUnLockResponse.php | 85 +++++++++ kiri-grpc-server/src/GrpcServer.php | 42 +++++ 20 files changed, 1510 insertions(+) create mode 100644 kiri-grpc-server/composer.json create mode 100644 kiri-grpc-server/exp/GPBMetadata/UserService.php create mode 100644 kiri-grpc-server/exp/User/UserDetailRequest.php create mode 100644 kiri-grpc-server/exp/User/UserDetailResponse.php create mode 100644 kiri-grpc-server/exp/User/UserJwtCheckRequest.php create mode 100644 kiri-grpc-server/exp/User/UserJwtCheckResponse.php create mode 100644 kiri-grpc-server/exp/User/UserKickRequest.php create mode 100644 kiri-grpc-server/exp/User/UserKickResponse.php create mode 100644 kiri-grpc-server/exp/User/UserLockRequest.php create mode 100644 kiri-grpc-server/exp/User/UserLockResponse.php create mode 100644 kiri-grpc-server/exp/User/UserOfflineRequest.php create mode 100644 kiri-grpc-server/exp/User/UserOfflineResponse.php create mode 100644 kiri-grpc-server/exp/User/UserOnlineRequest.php create mode 100644 kiri-grpc-server/exp/User/UserOnlineResponse.php create mode 100644 kiri-grpc-server/exp/User/UserShieldRequest.php create mode 100644 kiri-grpc-server/exp/User/UserShieldResponse.php create mode 100644 kiri-grpc-server/exp/User/UserStatus.php create mode 100644 kiri-grpc-server/exp/User/UserUnLockRequest.php create mode 100644 kiri-grpc-server/exp/User/UserUnLockResponse.php create mode 100644 kiri-grpc-server/src/GrpcServer.php diff --git a/kiri-grpc-server/composer.json b/kiri-grpc-server/composer.json new file mode 100644 index 00000000..064c2d22 --- /dev/null +++ b/kiri-grpc-server/composer.json @@ -0,0 +1,11 @@ +{ + "name": "game-worker/kiri-grpc-server", + "autoload": { + "psr-4": { + "Kiri\\Grpc\\": "src/" + } + }, + "require": { + "google/protobuf": "^v3.3.0" + } +} diff --git a/kiri-grpc-server/exp/GPBMetadata/UserService.php b/kiri-grpc-server/exp/GPBMetadata/UserService.php new file mode 100644 index 0000000000000000000000000000000000000000..e7ad5f75201b80d7b20e50d8c57d21c6a8558b73 GIT binary patch literal 1969 zcmb7FYflqF6ct-axuD?UqxRFVHlZZiL?9t4)(2FZDq14&#nhPT?vzegcGsO*6b*mO zKc_Q0JG(;*icLuAoqNtbbMBp)XD`B02#-*Q_$0!dxM*;O_=un|3V7fI9vZ~MA&HO^ zoP^XPQ3IiN4}Itzpx5p0!Lop|AdVc;L@^Vq;_s9?q>;b@e0)M!h#i7Dd)w~`$1di0 z3&8O(W9U$1?<)ZO1SCFTJn*Q47{^?E)hPQyeab2J=no;Sg@)K;MBpcLhq3Q)8u&;8 zdcH&It4MLm+*%ljt+Y_T69h*d>F>$iiJkSkJ|~fny?&c8C!!$_qCJt?Y#tGwc_JhA z)wHanqeE0z8k@}tkuAidn3&ZOiU^M*e=E@~3C^?s5@k=G(^SVR*Uiel5q{URLE3JSSs9$nROdVlylC=U6tWQV@|@ ziNU9$MNy@g{GNjXBi}32@`wEh?nwGWUy^<#Ut_|!M9A7*S5>js!7`Ir82F4>^H6jG zm!wJ-U`C7u!$%|$GHW+rL4y9mYY8PTK2yT&r?8mkU#~_NMZ?=X=yAn)nt>^Wd2HiIua~63p#l#=E{azTGgjldEDH zcxkcm9vF?3qfoF!AsmLHuW}L!7J`zT_?RWbFt@hYkZo_sHtZ*HyOvfR4o$t|^RWR- z64TRJ*Aizhs{wf@rd1m;PMpq!O1U0uO=)@ijqi*|&V12gdjsxD#d+4H6IEJk2ZN?ybDmFzBmteyztMY-}d NNix;LaSrDIe*iKeKMVi> literal 0 HcmV?d00001 diff --git a/kiri-grpc-server/exp/User/UserDetailRequest.php b/kiri-grpc-server/exp/User/UserDetailRequest.php new file mode 100644 index 00000000..a4ea0169 --- /dev/null +++ b/kiri-grpc-server/exp/User/UserDetailRequest.php @@ -0,0 +1,58 @@ +user.UserDetailRequest + */ +class UserDetailRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int64 userId = 1; + */ + protected $userId = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $userId + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\UserService::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int64 userId = 1; + * @return int|string + */ + public function getUserId() + { + return $this->userId; + } + + /** + * Generated from protobuf field int64 userId = 1; + * @param int|string $var + * @return $this + */ + public function setUserId($var) + { + GPBUtil::checkInt64($var); + $this->userId = $var; + + return $this; + } + +} + diff --git a/kiri-grpc-server/exp/User/UserDetailResponse.php b/kiri-grpc-server/exp/User/UserDetailResponse.php new file mode 100644 index 00000000..fdffbf1a --- /dev/null +++ b/kiri-grpc-server/exp/User/UserDetailResponse.php @@ -0,0 +1,85 @@ +user.UserDetailResponse + */ +class UserDetailResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int64 code = 1; + */ + protected $code = 0; + /** + * Generated from protobuf field bytes params = 2; + */ + protected $params = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $code + * @type string $params + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\UserService::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int64 code = 1; + * @return int|string + */ + public function getCode() + { + return $this->code; + } + + /** + * Generated from protobuf field int64 code = 1; + * @param int|string $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkInt64($var); + $this->code = $var; + + return $this; + } + + /** + * Generated from protobuf field bytes params = 2; + * @return string + */ + public function getParams() + { + return $this->params; + } + + /** + * Generated from protobuf field bytes params = 2; + * @param string $var + * @return $this + */ + public function setParams($var) + { + GPBUtil::checkString($var, False); + $this->params = $var; + + return $this; + } + +} + diff --git a/kiri-grpc-server/exp/User/UserJwtCheckRequest.php b/kiri-grpc-server/exp/User/UserJwtCheckRequest.php new file mode 100644 index 00000000..68e5d525 --- /dev/null +++ b/kiri-grpc-server/exp/User/UserJwtCheckRequest.php @@ -0,0 +1,58 @@ +user.UserJwtCheckRequest + */ +class UserJwtCheckRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string token = 1; + */ + protected $token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $token + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\UserService::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string token = 1; + * @return string + */ + public function getToken() + { + return $this->token; + } + + /** + * Generated from protobuf field string token = 1; + * @param string $var + * @return $this + */ + public function setToken($var) + { + GPBUtil::checkString($var, True); + $this->token = $var; + + return $this; + } + +} + diff --git a/kiri-grpc-server/exp/User/UserJwtCheckResponse.php b/kiri-grpc-server/exp/User/UserJwtCheckResponse.php new file mode 100644 index 00000000..b212bf46 --- /dev/null +++ b/kiri-grpc-server/exp/User/UserJwtCheckResponse.php @@ -0,0 +1,85 @@ +user.UserJwtCheckResponse + */ +class UserJwtCheckResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int64 code = 1; + */ + protected $code = 0; + /** + * Generated from protobuf field int64 userId = 2; + */ + protected $userId = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $code + * @type int|string $userId + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\UserService::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int64 code = 1; + * @return int|string + */ + public function getCode() + { + return $this->code; + } + + /** + * Generated from protobuf field int64 code = 1; + * @param int|string $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkInt64($var); + $this->code = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 userId = 2; + * @return int|string + */ + public function getUserId() + { + return $this->userId; + } + + /** + * Generated from protobuf field int64 userId = 2; + * @param int|string $var + * @return $this + */ + public function setUserId($var) + { + GPBUtil::checkInt64($var); + $this->userId = $var; + + return $this; + } + +} + diff --git a/kiri-grpc-server/exp/User/UserKickRequest.php b/kiri-grpc-server/exp/User/UserKickRequest.php new file mode 100644 index 00000000..dc86f62d --- /dev/null +++ b/kiri-grpc-server/exp/User/UserKickRequest.php @@ -0,0 +1,58 @@ +user.UserKickRequest + */ +class UserKickRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int64 userId = 1; + */ + protected $userId = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $userId + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\UserService::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int64 userId = 1; + * @return int|string + */ + public function getUserId() + { + return $this->userId; + } + + /** + * Generated from protobuf field int64 userId = 1; + * @param int|string $var + * @return $this + */ + public function setUserId($var) + { + GPBUtil::checkInt64($var); + $this->userId = $var; + + return $this; + } + +} + diff --git a/kiri-grpc-server/exp/User/UserKickResponse.php b/kiri-grpc-server/exp/User/UserKickResponse.php new file mode 100644 index 00000000..cdca83a5 --- /dev/null +++ b/kiri-grpc-server/exp/User/UserKickResponse.php @@ -0,0 +1,85 @@ +user.UserKickResponse + */ +class UserKickResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int64 code = 1; + */ + protected $code = 0; + /** + * Generated from protobuf field string message = 2; + */ + protected $message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $code + * @type string $message + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\UserService::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int64 code = 1; + * @return int|string + */ + public function getCode() + { + return $this->code; + } + + /** + * Generated from protobuf field int64 code = 1; + * @param int|string $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkInt64($var); + $this->code = $var; + + return $this; + } + + /** + * Generated from protobuf field string message = 2; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Generated from protobuf field string message = 2; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + +} + diff --git a/kiri-grpc-server/exp/User/UserLockRequest.php b/kiri-grpc-server/exp/User/UserLockRequest.php new file mode 100644 index 00000000..f6e47ac6 --- /dev/null +++ b/kiri-grpc-server/exp/User/UserLockRequest.php @@ -0,0 +1,85 @@ +user.UserLockRequest + */ +class UserLockRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int64 userId = 1; + */ + protected $userId = 0; + /** + * Generated from protobuf field int64 day = 2; + */ + protected $day = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $userId + * @type int|string $day + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\UserService::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int64 userId = 1; + * @return int|string + */ + public function getUserId() + { + return $this->userId; + } + + /** + * Generated from protobuf field int64 userId = 1; + * @param int|string $var + * @return $this + */ + public function setUserId($var) + { + GPBUtil::checkInt64($var); + $this->userId = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 day = 2; + * @return int|string + */ + public function getDay() + { + return $this->day; + } + + /** + * Generated from protobuf field int64 day = 2; + * @param int|string $var + * @return $this + */ + public function setDay($var) + { + GPBUtil::checkInt64($var); + $this->day = $var; + + return $this; + } + +} + diff --git a/kiri-grpc-server/exp/User/UserLockResponse.php b/kiri-grpc-server/exp/User/UserLockResponse.php new file mode 100644 index 00000000..2d04e8d2 --- /dev/null +++ b/kiri-grpc-server/exp/User/UserLockResponse.php @@ -0,0 +1,85 @@ +user.UserLockResponse + */ +class UserLockResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int64 code = 1; + */ + protected $code = 0; + /** + * Generated from protobuf field string message = 2; + */ + protected $message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $code + * @type string $message + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\UserService::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int64 code = 1; + * @return int|string + */ + public function getCode() + { + return $this->code; + } + + /** + * Generated from protobuf field int64 code = 1; + * @param int|string $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkInt64($var); + $this->code = $var; + + return $this; + } + + /** + * Generated from protobuf field string message = 2; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Generated from protobuf field string message = 2; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + +} + diff --git a/kiri-grpc-server/exp/User/UserOfflineRequest.php b/kiri-grpc-server/exp/User/UserOfflineRequest.php new file mode 100644 index 00000000..ae8f2b7c --- /dev/null +++ b/kiri-grpc-server/exp/User/UserOfflineRequest.php @@ -0,0 +1,58 @@ +user.UserOfflineRequest + */ +class UserOfflineRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int64 userId = 1; + */ + protected $userId = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $userId + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\UserService::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int64 userId = 1; + * @return int|string + */ + public function getUserId() + { + return $this->userId; + } + + /** + * Generated from protobuf field int64 userId = 1; + * @param int|string $var + * @return $this + */ + public function setUserId($var) + { + GPBUtil::checkInt64($var); + $this->userId = $var; + + return $this; + } + +} + diff --git a/kiri-grpc-server/exp/User/UserOfflineResponse.php b/kiri-grpc-server/exp/User/UserOfflineResponse.php new file mode 100644 index 00000000..9219eb5e --- /dev/null +++ b/kiri-grpc-server/exp/User/UserOfflineResponse.php @@ -0,0 +1,85 @@ +user.UserOfflineResponse + */ +class UserOfflineResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int64 code = 1; + */ + protected $code = 0; + /** + * Generated from protobuf field string message = 2; + */ + protected $message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $code + * @type string $message + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\UserService::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int64 code = 1; + * @return int|string + */ + public function getCode() + { + return $this->code; + } + + /** + * Generated from protobuf field int64 code = 1; + * @param int|string $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkInt64($var); + $this->code = $var; + + return $this; + } + + /** + * Generated from protobuf field string message = 2; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Generated from protobuf field string message = 2; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + +} + diff --git a/kiri-grpc-server/exp/User/UserOnlineRequest.php b/kiri-grpc-server/exp/User/UserOnlineRequest.php new file mode 100644 index 00000000..2352fa9c --- /dev/null +++ b/kiri-grpc-server/exp/User/UserOnlineRequest.php @@ -0,0 +1,87 @@ +user.UserOnlineRequest + */ +class UserOnlineRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string token = 1; + */ + protected $token = ''; + /** + * Generated from protobuf field string LastInnerIp = 2; + */ + protected $LastInnerIp = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $token + * @type string $LastInnerIp + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\UserService::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string token = 1; + * @return string + */ + public function getToken() + { + return $this->token; + } + + /** + * Generated from protobuf field string token = 1; + * @param string $var + * @return $this + */ + public function setToken($var) + { + GPBUtil::checkString($var, True); + $this->token = $var; + + return $this; + } + + /** + * Generated from protobuf field string LastInnerIp = 2; + * @return string + */ + public function getLastInnerIp() + { + return $this->LastInnerIp; + } + + /** + * Generated from protobuf field string LastInnerIp = 2; + * @param string $var + * @return $this + */ + public function setLastInnerIp($var) + { + GPBUtil::checkString($var, True); + $this->LastInnerIp = $var; + + return $this; + } + +} + diff --git a/kiri-grpc-server/exp/User/UserOnlineResponse.php b/kiri-grpc-server/exp/User/UserOnlineResponse.php new file mode 100644 index 00000000..1cc3aae0 --- /dev/null +++ b/kiri-grpc-server/exp/User/UserOnlineResponse.php @@ -0,0 +1,176 @@ +user.UserOnlineResponse + */ +class UserOnlineResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int64 code = 1; + */ + protected $code = 0; + /** + * Generated from protobuf field string message = 2; + */ + protected $message = ''; + /** + * Generated from protobuf field int64 userId = 3; + */ + protected $userId = 0; + /** + * Generated from protobuf field int64 appId = 4; + */ + protected $appId = 0; + /** + * Generated from protobuf field .user.UserStatus status = 5; + */ + protected $status = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $code + * @type string $message + * @type int|string $userId + * @type int|string $appId + * @type \User\UserStatus $status + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\UserService::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int64 code = 1; + * @return int|string + */ + public function getCode() + { + return $this->code; + } + + /** + * Generated from protobuf field int64 code = 1; + * @param int|string $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkInt64($var); + $this->code = $var; + + return $this; + } + + /** + * Generated from protobuf field string message = 2; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Generated from protobuf field string message = 2; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 userId = 3; + * @return int|string + */ + public function getUserId() + { + return $this->userId; + } + + /** + * Generated from protobuf field int64 userId = 3; + * @param int|string $var + * @return $this + */ + public function setUserId($var) + { + GPBUtil::checkInt64($var); + $this->userId = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 appId = 4; + * @return int|string + */ + public function getAppId() + { + return $this->appId; + } + + /** + * Generated from protobuf field int64 appId = 4; + * @param int|string $var + * @return $this + */ + public function setAppId($var) + { + GPBUtil::checkInt64($var); + $this->appId = $var; + + return $this; + } + + /** + * Generated from protobuf field .user.UserStatus status = 5; + * @return \User\UserStatus|null + */ + public function getStatus() + { + return isset($this->status) ? $this->status : null; + } + + public function hasStatus() + { + return isset($this->status); + } + + public function clearStatus() + { + unset($this->status); + } + + /** + * Generated from protobuf field .user.UserStatus status = 5; + * @param \User\UserStatus $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkMessage($var, \User\UserStatus::class); + $this->status = $var; + + return $this; + } + +} + diff --git a/kiri-grpc-server/exp/User/UserShieldRequest.php b/kiri-grpc-server/exp/User/UserShieldRequest.php new file mode 100644 index 00000000..aba43631 --- /dev/null +++ b/kiri-grpc-server/exp/User/UserShieldRequest.php @@ -0,0 +1,58 @@ +user.UserShieldRequest + */ +class UserShieldRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int64 userId = 1; + */ + protected $userId = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $userId + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\UserService::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int64 userId = 1; + * @return int|string + */ + public function getUserId() + { + return $this->userId; + } + + /** + * Generated from protobuf field int64 userId = 1; + * @param int|string $var + * @return $this + */ + public function setUserId($var) + { + GPBUtil::checkInt64($var); + $this->userId = $var; + + return $this; + } + +} + diff --git a/kiri-grpc-server/exp/User/UserShieldResponse.php b/kiri-grpc-server/exp/User/UserShieldResponse.php new file mode 100644 index 00000000..60312459 --- /dev/null +++ b/kiri-grpc-server/exp/User/UserShieldResponse.php @@ -0,0 +1,85 @@ +user.UserShieldResponse + */ +class UserShieldResponse extends Message +{ + /** + * Generated from protobuf field int64 code = 1; + */ + protected $code = 0; + /** + * Generated from protobuf field string message = 2; + */ + protected $message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $code + * @type string $message + * } + */ + public function __construct($data = NULL) { + UserService::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int64 code = 1; + * @return int|string + */ + public function getCode() + { + return $this->code; + } + + /** + * Generated from protobuf field int64 code = 1; + * @param int|string $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkInt64($var); + $this->code = $var; + + return $this; + } + + /** + * Generated from protobuf field string message = 2; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Generated from protobuf field string message = 2; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + +} + diff --git a/kiri-grpc-server/exp/User/UserStatus.php b/kiri-grpc-server/exp/User/UserStatus.php new file mode 100644 index 00000000..9bb5d741 --- /dev/null +++ b/kiri-grpc-server/exp/User/UserStatus.php @@ -0,0 +1,166 @@ +user.UserStatus + */ +class UserStatus extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int64 isLock = 1; + */ + protected $isLock = 0; + /** + * Generated from protobuf field int64 isShield = 2; + */ + protected $isShield = 0; + /** + * Generated from protobuf field string nickname = 3; + */ + protected $nickname = ''; + /** + * Generated from protobuf field string avatar = 4; + */ + protected $avatar = ''; + /** + * Generated from protobuf field string sex = 5; + */ + protected $sex = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $isLock + * @type int|string $isShield + * @type string $nickname + * @type string $avatar + * @type string $sex + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\UserService::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int64 isLock = 1; + * @return int|string + */ + public function getIsLock() + { + return $this->isLock; + } + + /** + * Generated from protobuf field int64 isLock = 1; + * @param int|string $var + * @return $this + */ + public function setIsLock($var) + { + GPBUtil::checkInt64($var); + $this->isLock = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 isShield = 2; + * @return int|string + */ + public function getIsShield() + { + return $this->isShield; + } + + /** + * Generated from protobuf field int64 isShield = 2; + * @param int|string $var + * @return $this + */ + public function setIsShield($var) + { + GPBUtil::checkInt64($var); + $this->isShield = $var; + + return $this; + } + + /** + * Generated from protobuf field string nickname = 3; + * @return string + */ + public function getNickname() + { + return $this->nickname; + } + + /** + * Generated from protobuf field string nickname = 3; + * @param string $var + * @return $this + */ + public function setNickname($var) + { + GPBUtil::checkString($var, True); + $this->nickname = $var; + + return $this; + } + + /** + * Generated from protobuf field string avatar = 4; + * @return string + */ + public function getAvatar() + { + return $this->avatar; + } + + /** + * Generated from protobuf field string avatar = 4; + * @param string $var + * @return $this + */ + public function setAvatar($var) + { + GPBUtil::checkString($var, True); + $this->avatar = $var; + + return $this; + } + + /** + * Generated from protobuf field string sex = 5; + * @return string + */ + public function getSex() + { + return $this->sex; + } + + /** + * Generated from protobuf field string sex = 5; + * @param string $var + * @return $this + */ + public function setSex($var) + { + GPBUtil::checkString($var, True); + $this->sex = $var; + + return $this; + } + +} + diff --git a/kiri-grpc-server/exp/User/UserUnLockRequest.php b/kiri-grpc-server/exp/User/UserUnLockRequest.php new file mode 100644 index 00000000..45956b71 --- /dev/null +++ b/kiri-grpc-server/exp/User/UserUnLockRequest.php @@ -0,0 +1,58 @@ +user.UserUnLockRequest + */ +class UserUnLockRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int64 userId = 1; + */ + protected $userId = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $userId + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\UserService::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int64 userId = 1; + * @return int|string + */ + public function getUserId() + { + return $this->userId; + } + + /** + * Generated from protobuf field int64 userId = 1; + * @param int|string $var + * @return $this + */ + public function setUserId($var) + { + GPBUtil::checkInt64($var); + $this->userId = $var; + + return $this; + } + +} + diff --git a/kiri-grpc-server/exp/User/UserUnLockResponse.php b/kiri-grpc-server/exp/User/UserUnLockResponse.php new file mode 100644 index 00000000..bb065352 --- /dev/null +++ b/kiri-grpc-server/exp/User/UserUnLockResponse.php @@ -0,0 +1,85 @@ +user.UserUnLockResponse + */ +class UserUnLockResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int64 code = 1; + */ + protected $code = 0; + /** + * Generated from protobuf field string message = 2; + */ + protected $message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $code + * @type string $message + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\UserService::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int64 code = 1; + * @return int|string + */ + public function getCode() + { + return $this->code; + } + + /** + * Generated from protobuf field int64 code = 1; + * @param int|string $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkInt64($var); + $this->code = $var; + + return $this; + } + + /** + * Generated from protobuf field string message = 2; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Generated from protobuf field string message = 2; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + +} + diff --git a/kiri-grpc-server/src/GrpcServer.php b/kiri-grpc-server/src/GrpcServer.php new file mode 100644 index 00000000..cd516d15 --- /dev/null +++ b/kiri-grpc-server/src/GrpcServer.php @@ -0,0 +1,42 @@ +