courier_spec 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/courier_proto.gemspec +13 -13
- data/lib/todo_pb.rb +6 -19
- data/lib/todo_services_pb.rb +22 -9
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af915ce00dad022d3e23c6238730d7c669118268b395a2f84bcfc42064a585d9
|
4
|
+
data.tar.gz: 911e123c5fbb12c145298280aaa459cf0dc118a748d6dc8937fa85e7321dd96d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 264e45e5ac53a8c0f6c18536a9ae8c881ec12757b2cbc18d277d56d8a30fc407734cdce05f3e1b83ee7c7dac4a142741f7325275d13afef47114d23fb866dcd2
|
7
|
+
data.tar.gz: 64dd13aaf160b127f8c601f8028a63eaeb5c95908a26545e9b6a9ae4a45e49e0e8ab8b7fe8d339cac65f183af9df1c3fd21af64e11e76d2abeec5ed75cd7e5e2
|
data/courier_proto.gemspec
CHANGED
@@ -3,19 +3,19 @@ lib = File.expand_path('../lib', __FILE__)
|
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
6
|
+
spec.name = 'courier_spec'
|
7
|
+
spec.version = '0.0.2'
|
8
|
+
spec.date = '2019-09-12'
|
9
|
+
spec.summary = "Courier Spec for proto files!"
|
10
|
+
spec.description = "The gem is the generated files for proto file"
|
11
|
+
spec.authors = ["Ruiyang Zhang"]
|
12
|
+
spec.email = 'ruiyang.zhang@juvo.com'
|
13
|
+
spec.homepage =
|
14
|
+
'https://rubygemspec.org/gems/courier_proto'
|
15
|
+
spec.license = 'MIT'
|
16
|
+
spec.files = Dir['**/*']
|
17
|
+
spec.require_path = 'lib'
|
18
|
+
spec.add_runtime_dependency 'grpc', '~> 1.6'
|
19
19
|
|
20
20
|
|
21
21
|
end
|
data/lib/todo_pb.rb
CHANGED
@@ -5,29 +5,16 @@ require 'google/protobuf'
|
|
5
5
|
|
6
6
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
7
|
add_file("todo.proto", :syntax => :proto3) do
|
8
|
-
add_message "
|
8
|
+
add_message "todo.HelloRequest" do
|
9
9
|
optional :name, :string, 1
|
10
10
|
end
|
11
|
-
add_message "
|
12
|
-
optional :
|
13
|
-
optional :name, :string, 2
|
14
|
-
optional :status, :string, 3
|
15
|
-
end
|
16
|
-
add_message "gogrpcspec.Summary" do
|
17
|
-
optional :todoTasks, :int32, 1
|
18
|
-
optional :doingTasks, :int32, 2
|
19
|
-
optional :doneTasks, :int32, 3
|
20
|
-
end
|
21
|
-
add_message "gogrpcspec.SpecificSummary" do
|
22
|
-
optional :employee, :message, 1, "gogrpcspec.Employee"
|
23
|
-
optional :summary, :message, 2, "gogrpcspec.Summary"
|
11
|
+
add_message "todo.HelloReply" do
|
12
|
+
optional :message, :string, 1
|
24
13
|
end
|
25
14
|
end
|
26
15
|
end
|
27
16
|
|
28
|
-
module
|
29
|
-
|
30
|
-
|
31
|
-
Summary = Google::Protobuf::DescriptorPool.generated_pool.lookup("gogrpcspec.Summary").msgclass
|
32
|
-
SpecificSummary = Google::Protobuf::DescriptorPool.generated_pool.lookup("gogrpcspec.SpecificSummary").msgclass
|
17
|
+
module Todo
|
18
|
+
HelloRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("todo.HelloRequest").msgclass
|
19
|
+
HelloReply = Google::Protobuf::DescriptorPool.generated_pool.lookup("todo.HelloReply").msgclass
|
33
20
|
end
|
data/lib/todo_services_pb.rb
CHANGED
@@ -1,24 +1,37 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
-
# Source: todo.proto for package '
|
2
|
+
# Source: todo.proto for package 'todo'
|
3
|
+
# Original file comments:
|
4
|
+
# Copyright 2015 gRPC authors.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
3
18
|
|
4
19
|
require 'grpc'
|
5
20
|
require 'todo_pb'
|
6
21
|
|
7
|
-
module
|
8
|
-
module
|
22
|
+
module Todo
|
23
|
+
module Greeter
|
24
|
+
# The greeting service definition.
|
9
25
|
class Service
|
10
26
|
|
11
27
|
include GRPC::GenericService
|
12
28
|
|
13
29
|
self.marshal_class_method = :encode
|
14
30
|
self.unmarshal_class_method = :decode
|
15
|
-
self.service_name = '
|
31
|
+
self.service_name = 'todo.Greeter'
|
16
32
|
|
17
|
-
|
18
|
-
rpc :
|
19
|
-
rpc :AddTasks, stream(Task), Summary
|
20
|
-
rpc :GetTasks, Employee, stream(Task)
|
21
|
-
rpc :ChangeToDone, stream(Task), stream(Task)
|
33
|
+
# Sends a greeting
|
34
|
+
rpc :SayHello, HelloRequest, HelloReply
|
22
35
|
end
|
23
36
|
|
24
37
|
Stub = Service.rpc_stub_class
|