burgundy-lord-thrift 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +8 -8
  2. data/lib/burgundy-lord-thrift.rb +130 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YTc4NWE4NmY1NWUxMGQ1Nzk4N2EzNDAzZWI4NzQzMTY0MmI5NjU2OQ==
4
+ Y2UxYjU1MWVhZjFiNGEzOTZkYmFkNmRiYzhkNmZjYWI3YjNkNWU1Yg==
5
5
  data.tar.gz: !binary |-
6
- MGMyNWNkNTM3YzA3MjM3MDUyMjIwYjQ0NDkyMDIzYTM5ZjJiMmUxMw==
6
+ YjIxNjE4MjhmMWNiMjg4ZDlhYWFhYTkyZWE4N2M4YWMxOTYzNTkyNw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- M2E5YTQzZWU1ZmY4Y2FmMGNiMWJhYjgxZGM2NDg2YjI4ZGUyN2U2M2NkYTZh
10
- MWI2OWFlMTY5ZTA3ZmFjM2MwM2Y2YTE4ZjUwMDNkYjJmYzdmYTQyOWIyYmM0
11
- YzY0MGFmZmFhYmQzNWEwNDM4OGJmMWQ3Mjc2NTAzMmVhMjFjMzU=
9
+ YmUxMDU4MzA5YTQ3ZmE4YWIwMjM5NWU1NWM2MDg1NmU5ZjQ4ZTlkYjI4MDkw
10
+ MzRjMzQyNjA4MWNhZGY4Mzk4MDFiN2MzOWIyMDU5MzMyNDY0ZGM5YzliNzVh
11
+ YmJjNmVkN2NhNjQwNjg5OTlkZTU5ZGNhNWU2MTE2MDZiYmM3NWQ=
12
12
  data.tar.gz: !binary |-
13
- MzM5YjAxZThlM2EyYTkzNDQ3Y2ViODU3OTc2YjYzZGFjZDllZGUyNWQyZTk1
14
- MDAwZGEyMTc1NDBhMGRhOTlmYzQ2NWExNjdkMjQwMjgyMGM3N2FiN2YzNGQ2
15
- NGYwMDRmMjk2ZTMwOWIyZGY5YmVjZWI5YmJjMDRkOTU1NTI2NzY=
13
+ MTZmNzNiMjE1ZDA1YTVkZTg2YTAzOTJhNGE3MDc3MTg2NzAwODQxOWEzMDgx
14
+ M2UzNDMwM2VmNDNjYTBjMzRiMWU0ODE5MjZjODU3ZjI4NmQ1MTAxY2NhNzk5
15
+ ZTQ3NTkxZWUxYTAyN2JiYWE1MTMzZDc4YzA5YTQwZjdjYzIzYTc=
@@ -1 +1,130 @@
1
- require './lib/gen-rb/lord'
1
+ #
2
+ # Autogenerated by Thrift Compiler (0.9.1)
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ require 'thrift'
8
+
9
+ module Lord
10
+ class Client
11
+ include ::Thrift::Client
12
+
13
+ def ping()
14
+ send_ping()
15
+ recv_ping()
16
+ end
17
+
18
+ def send_ping()
19
+ send_message('ping', Ping_args)
20
+ end
21
+
22
+ def recv_ping()
23
+ result = receive_message(Ping_result)
24
+ return
25
+ end
26
+
27
+ def query(account_id, options)
28
+ send_query(account_id, options)
29
+ return recv_query()
30
+ end
31
+
32
+ def send_query(account_id, options)
33
+ send_message('query', Query_args, :account_id => account_id, :options => options)
34
+ end
35
+
36
+ def recv_query()
37
+ result = receive_message(Query_result)
38
+ return result.success unless result.success.nil?
39
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'query failed: unknown result')
40
+ end
41
+
42
+ end
43
+
44
+ class Processor
45
+ include ::Thrift::Processor
46
+
47
+ def process_ping(seqid, iprot, oprot)
48
+ args = read_args(iprot, Ping_args)
49
+ result = Ping_result.new()
50
+ @handler.ping()
51
+ write_result(result, oprot, 'ping', seqid)
52
+ end
53
+
54
+ def process_query(seqid, iprot, oprot)
55
+ args = read_args(iprot, Query_args)
56
+ result = Query_result.new()
57
+ result.success = @handler.query(args.account_id, args.options)
58
+ write_result(result, oprot, 'query', seqid)
59
+ end
60
+
61
+ end
62
+
63
+ # HELPER FUNCTIONS AND STRUCTURES
64
+
65
+ class Ping_args
66
+ include ::Thrift::Struct, ::Thrift::Struct_Union
67
+
68
+ FIELDS = {
69
+
70
+ }
71
+
72
+ def struct_fields; FIELDS; end
73
+
74
+ def validate
75
+ end
76
+
77
+ ::Thrift::Struct.generate_accessors self
78
+ end
79
+
80
+ class Ping_result
81
+ include ::Thrift::Struct, ::Thrift::Struct_Union
82
+
83
+ FIELDS = {
84
+
85
+ }
86
+
87
+ def struct_fields; FIELDS; end
88
+
89
+ def validate
90
+ end
91
+
92
+ ::Thrift::Struct.generate_accessors self
93
+ end
94
+
95
+ class Query_args
96
+ include ::Thrift::Struct, ::Thrift::Struct_Union
97
+ ACCOUNT_ID = 1
98
+ OPTIONS = 2
99
+
100
+ FIELDS = {
101
+ ACCOUNT_ID => {:type => ::Thrift::Types::STRING, :name => 'account_id'},
102
+ OPTIONS => {:type => ::Thrift::Types::MAP, :name => 'options', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}
103
+ }
104
+
105
+ def struct_fields; FIELDS; end
106
+
107
+ def validate
108
+ end
109
+
110
+ ::Thrift::Struct.generate_accessors self
111
+ end
112
+
113
+ class Query_result
114
+ include ::Thrift::Struct, ::Thrift::Struct_Union
115
+ SUCCESS = 0
116
+
117
+ FIELDS = {
118
+ SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'}
119
+ }
120
+
121
+ def struct_fields; FIELDS; end
122
+
123
+ def validate
124
+ end
125
+
126
+ ::Thrift::Struct.generate_accessors self
127
+ end
128
+
129
+ end
130
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: burgundy-lord-thrift
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Bronitsky