From 74426360bb5f92f6377a91ff460d67a2c1e623b3 Mon Sep 17 00:00:00 2001 From: snoop Date: Wed, 28 Jun 2017 17:49:48 +0900 Subject: [PATCH] server grpc project --- .gitignore | 28 ++++++++++++ pom.xml | 77 ++++++++++++++++++++++++++++++++ src/main/proto/server_grpc.proto | 26 +++++++++++ src/main/resources/_ | 0 4 files changed, 131 insertions(+) create mode 100644 .gitignore create mode 100644 pom.xml create mode 100644 src/main/proto/server_grpc.proto create mode 100644 src/main/resources/_ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c314e7c --- /dev/null +++ b/.gitignore @@ -0,0 +1,28 @@ +# Created by .ignore support plugin (hsz.mobi) +### Java template +# Compiled class file +*.class + +# Log file +*.log + +# BlueJ files +*.ctxt + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.ear +*.zip +*.tar.gz +*.rar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +target/ +*.iml +.idea/ diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..3f903b0 --- /dev/null +++ b/pom.xml @@ -0,0 +1,77 @@ + + + 4.0.0 + + + com.loafle + maven_parent_jar + 1.0.0-RELEASE + + + com.loafle + overflow_api_server + jar + 1.0.0-SNAPSHOT + com.loafle.overflow_api_server + + + 1.2.0 + 3.2.0 + 0.5.0 + + + + + + src/main/resources + true + + + + + src/test/resources + true + + + + + + kr.motd.maven + os-maven-plugin + 1.5.0.Final + + + + + + org.xolstice.maven.plugins + protobuf-maven-plugin + ${protoc-maven-plugin.version} + + com.google.protobuf:protoc:${protoc.version}:exe:${os.detected.classifier} + grpc-java + io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier} + + + + + compile + compile-custom + + + + + + com.google.protobuf + protobuf-java + ${protoc.version} + + + + + + + + \ No newline at end of file diff --git a/src/main/proto/server_grpc.proto b/src/main/proto/server_grpc.proto new file mode 100644 index 0000000..88ceb29 --- /dev/null +++ b/src/main/proto/server_grpc.proto @@ -0,0 +1,26 @@ +syntax = "proto3"; + +option java_multiple_files = true; +option java_package = "com.loafle.overflow.api"; +option java_generic_services = true; + +message ServerInput { + string target = 1; + string method = 2; + repeated Param params = 3; +} + +message Param { + string type = 1; + string data = 2; + bool isCollection = 3; +} + +message ServerOutput { + string result = 1; +} + +service Server { + rpc exec(ServerInput) returns (ServerOutput) {} +} + diff --git a/src/main/resources/_ b/src/main/resources/_ new file mode 100644 index 0000000..e69de29