summaryrefslogtreecommitdiff
path: root/tests/plugins/grpc/testdata/import
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-09-16 21:24:13 +0300
committerGitHub <[email protected]>2021-09-16 21:24:13 +0300
commit337d292dd2d6ff0a555098b1970d8194d8df8bc2 (patch)
treea2ab31666f95813a592bea2b207f2db0ba188c92 /tests/plugins/grpc/testdata/import
parent5d2cd55ab522d4f1e65a833f91146444465a32ac (diff)
parentcc56349f3ad19aa54ae7900c50e018d757305804 (diff)
[#783]: feat(grpc): update GRPC plugin to RR `v2`
[#783]: feat(grpc): update GRPC plugin to RR `v2`
Diffstat (limited to 'tests/plugins/grpc/testdata/import')
-rw-r--r--tests/plugins/grpc/testdata/import/Import/ServiceInterface.php32
-rw-r--r--tests/plugins/grpc/testdata/import/service.proto17
-rw-r--r--tests/plugins/grpc/testdata/import/sub/message.proto7
3 files changed, 56 insertions, 0 deletions
diff --git a/tests/plugins/grpc/testdata/import/Import/ServiceInterface.php b/tests/plugins/grpc/testdata/import/Import/ServiceInterface.php
new file mode 100644
index 00000000..13e58daf
--- /dev/null
+++ b/tests/plugins/grpc/testdata/import/Import/ServiceInterface.php
@@ -0,0 +1,32 @@
+<?php
+# Generated by the protocol buffer compiler (spiral/php-grpc). DO NOT EDIT!
+# source: import/service.proto
+
+namespace Import;
+
+use Spiral\GRPC;
+use Import\Sub;
+
+interface ServiceInterface extends GRPC\ServiceInterface
+{
+ // GRPC specific service name.
+ public const NAME = "import.Service";
+
+ /**
+ * @param GRPC\ContextInterface $ctx
+ * @param Message $in
+ * @return Message
+ *
+ * @throws GRPC\Exception\InvokeException
+ */
+ public function SimpleMethod(GRPC\ContextInterface $ctx, Message $in): Message;
+
+ /**
+ * @param GRPC\ContextInterface $ctx
+ * @param Sub\Message $in
+ * @return Sub\Message
+ *
+ * @throws GRPC\Exception\InvokeException
+ */
+ public function ImportMethod(GRPC\ContextInterface $ctx, Sub\Message $in): Sub\Message;
+}
diff --git a/tests/plugins/grpc/testdata/import/service.proto b/tests/plugins/grpc/testdata/import/service.proto
new file mode 100644
index 00000000..5d888f09
--- /dev/null
+++ b/tests/plugins/grpc/testdata/import/service.proto
@@ -0,0 +1,17 @@
+syntax = "proto3";
+
+package import;
+
+import "import/sub/message.proto";
+
+service Service {
+ rpc SimpleMethod (Message) returns (Message) {
+ }
+
+ rpc ImportMethod (import.sub.Message) returns (import.sub.Message) {
+ }
+}
+
+message Message {
+ int64 id = 1;
+} \ No newline at end of file
diff --git a/tests/plugins/grpc/testdata/import/sub/message.proto b/tests/plugins/grpc/testdata/import/sub/message.proto
new file mode 100644
index 00000000..1db0313b
--- /dev/null
+++ b/tests/plugins/grpc/testdata/import/sub/message.proto
@@ -0,0 +1,7 @@
+syntax = "proto3";
+
+package import.sub;
+
+message Message {
+ int64 id = 1;
+} \ No newline at end of file