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 00000000..e7ad5f75 Binary files /dev/null and b/kiri-grpc-server/exp/GPBMetadata/UserService.php differ 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 @@ +