upfluence-thrift 2.4.4 → 2.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/thrift/definition.rb +29 -8
- data/lib/thrift/processor.rb +96 -0
- data/lib/thrift/types/annotation/deprecation/deprecation_constants.rb +17 -0
- data/lib/thrift/types/annotation/deprecation/deprecation_types.rb +44 -0
- data/lib/thrift/types/annotation/naming/naming.rb +23 -0
- data/lib/thrift/types/annotation/naming/naming_constants.rb +17 -0
- data/lib/thrift/types/annotation/naming/naming_types.rb +59 -0
- data/lib/thrift/types/known/{any.rb → any/any.rb} +1 -1
- data/lib/thrift/types/known/{any_constants.rb → any/any_constants.rb} +2 -2
- data/lib/thrift/types/known/{any_types.rb → any/any_types.rb} +21 -3
- data/lib/thrift/types/known/{duration.rb → duration/duration.rb} +1 -1
- data/lib/thrift/types/known/{duration_constants.rb → duration/duration_constants.rb} +2 -2
- data/lib/thrift/types/known/{duration_types.rb → duration/duration_types.rb} +21 -3
- data/lib/thrift/types/known/{timestamp.rb → timestamp/timestamp.rb} +1 -1
- data/lib/thrift/types/known/{timestamp_constants.rb → timestamp/timestamp_constants.rb} +2 -2
- data/lib/thrift/types/known/{timestamp_types.rb → timestamp/timestamp_types.rb} +21 -3
- data/lib/thrift/types/{value.rb → value/value.rb} +1 -1
- data/lib/thrift/types/{value_constants.rb → value/value_constants.rb} +2 -2
- data/lib/thrift/types/{value_types.rb → value/value_types.rb} +135 -15
- data/lib/thrift.rb +5 -0
- data/spec/spec_helper.rb +17 -17
- metadata +45 -93
- data/benchmark/gen-rb/benchmark_constants.rb +0 -11
- data/benchmark/gen-rb/benchmark_service.rb +0 -106
- data/benchmark/gen-rb/benchmark_types.rb +0 -10
- data/spec/gen-rb/base/base_service.rb +0 -106
- data/spec/gen-rb/base/base_service_constants.rb +0 -11
- data/spec/gen-rb/base/base_service_types.rb +0 -33
- data/spec/gen-rb/extended/extended_service.rb +0 -103
- data/spec/gen-rb/extended/extended_service_constants.rb +0 -11
- data/spec/gen-rb/extended/extended_service_types.rb +0 -12
- data/spec/gen-rb/flat/namespaced_nonblocking_service.rb +0 -343
- data/spec/gen-rb/flat/referenced_constants.rb +0 -11
- data/spec/gen-rb/flat/referenced_types.rb +0 -17
- data/spec/gen-rb/flat/thrift_namespaced_spec_constants.rb +0 -11
- data/spec/gen-rb/flat/thrift_namespaced_spec_types.rb +0 -35
- data/spec/gen-rb/namespaced_spec_namespace/namespaced_nonblocking_service.rb +0 -343
- data/spec/gen-rb/namespaced_spec_namespace/thrift_namespaced_spec_constants.rb +0 -11
- data/spec/gen-rb/namespaced_spec_namespace/thrift_namespaced_spec_types.rb +0 -35
- data/spec/gen-rb/nonblocking_service.rb +0 -343
- data/spec/gen-rb/other_namespace/referenced_constants.rb +0 -11
- data/spec/gen-rb/other_namespace/referenced_types.rb +0 -17
- data/spec/gen-rb/thrift_spec_constants.rb +0 -11
- data/spec/gen-rb/thrift_spec_types.rb +0 -699
- data/test/debug_proto/gen-rb/debug_proto_test_constants.rb +0 -274
- data/test/debug_proto/gen-rb/debug_proto_test_types.rb +0 -936
- data/test/debug_proto/gen-rb/empty_service.rb +0 -39
- data/test/debug_proto/gen-rb/inherited.rb +0 -105
- data/test/debug_proto/gen-rb/reverse_order_service.rb +0 -107
- data/test/debug_proto/gen-rb/service_for_exception_with_a_map.rb +0 -106
- data/test/debug_proto/gen-rb/srv.rb +0 -410
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4fb37f79c1ff995e30d8891a0efe29ffe64d638a3dd5968c27a8e31363c14af6
|
4
|
+
data.tar.gz: 698761793f4c21b60d6cf99524230b039bab1bedf5c247fe10970487278f290f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c02b5806633a061e286f0f6b4bd93fe8c0d4a82308d7f8c0b5939b9823aeca9c0c4a38200fe241fac608900499e813dced8eec9f2d9a490d7ec42d0735fd7554
|
7
|
+
data.tar.gz: 80322343ae8247133b175e267206a9eeaf26868918ac52b71d06702ba98b946e06b69a0d2f09842fb8ff285bcaad25e566da7747cf007f69217432b8fedff170
|
data/lib/thrift/definition.rb
CHANGED
@@ -1,4 +1,12 @@
|
|
1
1
|
module Thrift
|
2
|
+
class DefaultCanonicalNameExtractor
|
3
|
+
class << self
|
4
|
+
def extract(definition)
|
5
|
+
[definition.struct_type]
|
6
|
+
end
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
2
10
|
class StructDefinition
|
3
11
|
attr_reader :klass
|
4
12
|
|
@@ -6,6 +14,14 @@ module Thrift
|
|
6
14
|
@klass = klass
|
7
15
|
end
|
8
16
|
|
17
|
+
def structured_annotations
|
18
|
+
@klass::STRUCTURED_ANNOTATIONS
|
19
|
+
end
|
20
|
+
|
21
|
+
def legacy_annotations
|
22
|
+
@klass::LEGACY_ANNOTATIONS
|
23
|
+
end
|
24
|
+
|
9
25
|
def namespace
|
10
26
|
@klass::NAMESPACE
|
11
27
|
end
|
@@ -17,15 +33,15 @@ module Thrift
|
|
17
33
|
def struct_type
|
18
34
|
"#{namespace}.#{name}"
|
19
35
|
end
|
20
|
-
end
|
21
|
-
|
22
|
-
class ServiceDefinition < StructDefinition
|
23
|
-
attr_reader :klass
|
24
36
|
|
25
|
-
def
|
26
|
-
|
37
|
+
def canonical_names
|
38
|
+
CANONICAL_NAME_EXTRACTORS.reduce([]) do |acc, cur|
|
39
|
+
acc + cur.extract(self)
|
40
|
+
end
|
27
41
|
end
|
42
|
+
end
|
28
43
|
|
44
|
+
class ServiceDefinition < StructDefinition
|
29
45
|
def client_class
|
30
46
|
@klass::Client
|
31
47
|
end
|
@@ -34,8 +50,8 @@ module Thrift
|
|
34
50
|
@klass::Processor
|
35
51
|
end
|
36
52
|
|
37
|
-
def
|
38
|
-
|
53
|
+
def name
|
54
|
+
service
|
39
55
|
end
|
40
56
|
|
41
57
|
def service
|
@@ -49,6 +65,7 @@ module Thrift
|
|
49
65
|
|
50
66
|
STRUCT_DEFINITIONS = {}
|
51
67
|
SERVICE_DEFINITIONS = {}
|
68
|
+
CANONICAL_NAME_EXTRACTORS = [DefaultCanonicalNameExtractor]
|
52
69
|
|
53
70
|
class << self
|
54
71
|
def register_struct_type(klass)
|
@@ -60,5 +77,9 @@ module Thrift
|
|
60
77
|
definition = ServiceDefinition.new(klass)
|
61
78
|
SERVICE_DEFINITIONS[definition.service_type] = definition
|
62
79
|
end
|
80
|
+
|
81
|
+
def register_canonical_name_extractor(klass)
|
82
|
+
CANONICAL_NAME_EXTRACTORS << klass
|
83
|
+
end
|
63
84
|
end
|
64
85
|
end
|
data/lib/thrift/processor.rb
CHANGED
@@ -19,13 +19,109 @@
|
|
19
19
|
|
20
20
|
module Thrift
|
21
21
|
module Processor
|
22
|
+
class BaseProcessorFunction
|
23
|
+
def initialize(fname, middleware, args_klass, method)
|
24
|
+
@fname = fname
|
25
|
+
@middleware = middleware
|
26
|
+
@args_klass = args_klass
|
27
|
+
@method = method
|
28
|
+
end
|
29
|
+
|
30
|
+
protected
|
31
|
+
|
32
|
+
def read_args(iprot)
|
33
|
+
args = @args_klass.new
|
34
|
+
|
35
|
+
args.read(iprot)
|
36
|
+
iprot.read_message_end
|
37
|
+
|
38
|
+
args
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
class BinaryProcessorFunction < BaseProcessorFunction
|
43
|
+
def process(seqid, iprot, oprot)
|
44
|
+
execute(seqid, iprot, oprot)
|
45
|
+
|
46
|
+
true
|
47
|
+
end
|
48
|
+
|
49
|
+
private
|
50
|
+
|
51
|
+
def execute(seqid, iprot, oprot)
|
52
|
+
args = read_args(iprot)
|
53
|
+
|
54
|
+
result = @middleware.handle_binary(@fname, args) do |args|
|
55
|
+
@method.call(args)
|
56
|
+
end
|
57
|
+
|
58
|
+
write_result(result, oprot, seqid)
|
59
|
+
rescue => e
|
60
|
+
write_exception(e, oprot, seqid)
|
61
|
+
end
|
62
|
+
|
63
|
+
def write_exception(exception, oprot, seqid)
|
64
|
+
oprot.write_message_begin(@fname, MessageTypes::EXCEPTION, seqid)
|
65
|
+
|
66
|
+
unless exception.is_a? ApplicationException
|
67
|
+
exception = ApplicationException.new(
|
68
|
+
ApplicationException::INTERNAL_ERROR,
|
69
|
+
"Internal error processing #{@fname}: #{exception.class}: #{exception}"
|
70
|
+
)
|
71
|
+
end
|
72
|
+
|
73
|
+
exception.write(oprot)
|
74
|
+
oprot.write_message_end
|
75
|
+
oprot.trans.flush
|
76
|
+
end
|
77
|
+
|
78
|
+
def write_result(result, oprot, seqid)
|
79
|
+
oprot.write_message_begin(@fname, MessageTypes::REPLY, seqid)
|
80
|
+
result.write(oprot)
|
81
|
+
oprot.write_message_end
|
82
|
+
oprot.trans.flush
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
class UnaryProcessorFunction < BaseProcessorFunction
|
87
|
+
def process(_seqid, iprot, _oprot)
|
88
|
+
args = read_args(iprot)
|
89
|
+
|
90
|
+
@middleware.handle_unary(@fname, args) do |args|
|
91
|
+
@method.call(args)
|
92
|
+
end
|
93
|
+
|
94
|
+
true
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
22
98
|
def initialize(handler, middlewares = [])
|
23
99
|
@handler = handler
|
24
100
|
@middleware = Middleware.wrap(middlewares)
|
101
|
+
|
102
|
+
@functions = if self.class.const_defined?(:METHODS)
|
103
|
+
self.class::METHODS.reduce({}) do |acc, (key, args)|
|
104
|
+
klass = args[:oneway] ? UnaryProcessorFunction : BinaryProcessorFunction
|
105
|
+
|
106
|
+
acc.merge key => klass.new(
|
107
|
+
key,
|
108
|
+
@middleware,
|
109
|
+
args[:args_klass],
|
110
|
+
method("execute_#{key}")
|
111
|
+
)
|
112
|
+
end
|
113
|
+
end || {}
|
25
114
|
end
|
26
115
|
|
27
116
|
def process(iprot, oprot)
|
28
117
|
name, _type, seqid = iprot.read_message_begin
|
118
|
+
|
119
|
+
func = @functions[name]
|
120
|
+
|
121
|
+
return func.process(seqid, iprot, oprot) if func
|
122
|
+
|
123
|
+
# TODO: once all the stubs will be generated w thrift >=2.5 the next lines
|
124
|
+
# can be deleted
|
29
125
|
if respond_to?("process_#{name}")
|
30
126
|
begin
|
31
127
|
send("process_#{name}", seqid, iprot, oprot)
|
@@ -0,0 +1,17 @@
|
|
1
|
+
#
|
2
|
+
# Autogenerated by Thrift Compiler (2.5.4-upfluence)
|
3
|
+
#
|
4
|
+
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
+
#
|
6
|
+
|
7
|
+
require 'thrift'
|
8
|
+
require 'thrift/types/annotation/deprecation/deprecation_types'
|
9
|
+
|
10
|
+
module Thrift
|
11
|
+
module Types
|
12
|
+
module Annotation
|
13
|
+
module Deprecation
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
#
|
2
|
+
# Autogenerated by Thrift Compiler (2.5.4-upfluence)
|
3
|
+
#
|
4
|
+
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
+
#
|
6
|
+
|
7
|
+
require 'thrift'
|
8
|
+
|
9
|
+
module Thrift
|
10
|
+
module Types
|
11
|
+
module Annotation
|
12
|
+
module Deprecation
|
13
|
+
class Deprecated; end
|
14
|
+
|
15
|
+
class Deprecated
|
16
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
17
|
+
|
18
|
+
NAME = 'Deprecated'.freeze
|
19
|
+
NAMESPACE = 'types.annotation.deprecation'.freeze
|
20
|
+
|
21
|
+
LEGACY_ANNOTATIONS = {
|
22
|
+
}.freeze
|
23
|
+
|
24
|
+
STRUCTURED_ANNOTATIONS = [
|
25
|
+
].freeze
|
26
|
+
|
27
|
+
|
28
|
+
FIELDS = {
|
29
|
+
|
30
|
+
}
|
31
|
+
|
32
|
+
def struct_fields; FIELDS; end
|
33
|
+
|
34
|
+
def validate
|
35
|
+
end
|
36
|
+
|
37
|
+
::Thrift::Struct.generate_accessors self
|
38
|
+
::Thrift.register_struct_type self
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'thrift/types/annotation/naming/naming_types'
|
2
|
+
|
3
|
+
module Thrift
|
4
|
+
module Types
|
5
|
+
module Annotation
|
6
|
+
module Naming
|
7
|
+
class CanonicalNameExtractor
|
8
|
+
class << self
|
9
|
+
def extract(definition)
|
10
|
+
definition.structured_annotations.select do |sa|
|
11
|
+
sa.is_a? PreviouslyKnownAs
|
12
|
+
end.map do |pka|
|
13
|
+
"#{pka.namespace_ || definition.namespace}.#{pka.name || definition.name}"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
::Thrift.register_canonical_name_extractor self
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
#
|
2
|
+
# Autogenerated by Thrift Compiler (2.5.4-upfluence)
|
3
|
+
#
|
4
|
+
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
+
#
|
6
|
+
|
7
|
+
require 'thrift'
|
8
|
+
require 'thrift/types/annotation/naming/naming_types'
|
9
|
+
|
10
|
+
module Thrift
|
11
|
+
module Types
|
12
|
+
module Annotation
|
13
|
+
module Naming
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
#
|
2
|
+
# Autogenerated by Thrift Compiler (2.5.4-upfluence)
|
3
|
+
#
|
4
|
+
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
+
#
|
6
|
+
|
7
|
+
require 'thrift'
|
8
|
+
|
9
|
+
module Thrift
|
10
|
+
module Types
|
11
|
+
module Annotation
|
12
|
+
module Naming
|
13
|
+
class PreviouslyKnownAs; end
|
14
|
+
|
15
|
+
class PreviouslyKnownAs
|
16
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
17
|
+
|
18
|
+
NAME = 'PreviouslyKnownAs'.freeze
|
19
|
+
NAMESPACE = 'types.annotation.naming'.freeze
|
20
|
+
|
21
|
+
LEGACY_ANNOTATIONS = {
|
22
|
+
}.freeze
|
23
|
+
|
24
|
+
STRUCTURED_ANNOTATIONS = [
|
25
|
+
].freeze
|
26
|
+
|
27
|
+
THRIFT_FIELD_INDEX_NAMESPACE_ = 1
|
28
|
+
THRIFT_FIELD_INDEX_NAME = 2
|
29
|
+
|
30
|
+
THRIFT_FIELD_NAMESPACE__LEGACY_ANNOTATIONS = {
|
31
|
+
}.freeze
|
32
|
+
|
33
|
+
THRIFT_FIELD_NAMESPACE__STRUCTURED_ANNOTATIONS = [
|
34
|
+
].freeze
|
35
|
+
|
36
|
+
THRIFT_FIELD_NAME_LEGACY_ANNOTATIONS = {
|
37
|
+
}.freeze
|
38
|
+
|
39
|
+
THRIFT_FIELD_NAME_STRUCTURED_ANNOTATIONS = [
|
40
|
+
].freeze
|
41
|
+
|
42
|
+
FIELDS = {
|
43
|
+
THRIFT_FIELD_INDEX_NAMESPACE_ => {type: ::Thrift::Types::STRING, name: 'namespace_', optional: true, legacy_annotations: THRIFT_FIELD_NAMESPACE__LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_NAMESPACE__STRUCTURED_ANNOTATIONS},
|
44
|
+
THRIFT_FIELD_INDEX_NAME => {type: ::Thrift::Types::STRING, name: 'name', optional: true, legacy_annotations: THRIFT_FIELD_NAME_LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_NAME_STRUCTURED_ANNOTATIONS}
|
45
|
+
}
|
46
|
+
|
47
|
+
def struct_fields; FIELDS; end
|
48
|
+
|
49
|
+
def validate
|
50
|
+
end
|
51
|
+
|
52
|
+
::Thrift::Struct.generate_accessors self
|
53
|
+
::Thrift.register_struct_type self
|
54
|
+
end
|
55
|
+
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -1,11 +1,11 @@
|
|
1
1
|
#
|
2
|
-
# Autogenerated by Thrift Compiler (2.
|
2
|
+
# Autogenerated by Thrift Compiler (2.5.4-upfluence)
|
3
3
|
#
|
4
4
|
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
5
|
#
|
6
6
|
|
7
7
|
require 'thrift'
|
8
|
-
require 'any_types'
|
8
|
+
require 'thrift/types/known/any/any_types'
|
9
9
|
|
10
10
|
module Thrift
|
11
11
|
module Types
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Autogenerated by Thrift Compiler (2.
|
2
|
+
# Autogenerated by Thrift Compiler (2.5.4-upfluence)
|
3
3
|
#
|
4
4
|
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
5
|
#
|
@@ -18,12 +18,30 @@ module Thrift
|
|
18
18
|
NAME = 'Any'.freeze
|
19
19
|
NAMESPACE = 'types.known.any'.freeze
|
20
20
|
|
21
|
+
LEGACY_ANNOTATIONS = {
|
22
|
+
}.freeze
|
23
|
+
|
24
|
+
STRUCTURED_ANNOTATIONS = [
|
25
|
+
].freeze
|
26
|
+
|
21
27
|
THRIFT_FIELD_INDEX_TYPE = 1
|
22
28
|
THRIFT_FIELD_INDEX_VALUE = 2
|
23
29
|
|
30
|
+
THRIFT_FIELD_TYPE_LEGACY_ANNOTATIONS = {
|
31
|
+
}.freeze
|
32
|
+
|
33
|
+
THRIFT_FIELD_TYPE_STRUCTURED_ANNOTATIONS = [
|
34
|
+
].freeze
|
35
|
+
|
36
|
+
THRIFT_FIELD_VALUE_LEGACY_ANNOTATIONS = {
|
37
|
+
}.freeze
|
38
|
+
|
39
|
+
THRIFT_FIELD_VALUE_STRUCTURED_ANNOTATIONS = [
|
40
|
+
].freeze
|
41
|
+
|
24
42
|
FIELDS = {
|
25
|
-
THRIFT_FIELD_INDEX_TYPE => {type: ::Thrift::Types::STRING, name: 'type'},
|
26
|
-
THRIFT_FIELD_INDEX_VALUE => {type: ::Thrift::Types::STRING, name: 'value', binary: true}
|
43
|
+
THRIFT_FIELD_INDEX_TYPE => {type: ::Thrift::Types::STRING, name: 'type', legacy_annotations: THRIFT_FIELD_TYPE_LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_TYPE_STRUCTURED_ANNOTATIONS},
|
44
|
+
THRIFT_FIELD_INDEX_VALUE => {type: ::Thrift::Types::STRING, name: 'value', binary: true, legacy_annotations: THRIFT_FIELD_VALUE_LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_VALUE_STRUCTURED_ANNOTATIONS}
|
27
45
|
}
|
28
46
|
|
29
47
|
def struct_fields; FIELDS; end
|
@@ -1,11 +1,11 @@
|
|
1
1
|
#
|
2
|
-
# Autogenerated by Thrift Compiler (2.
|
2
|
+
# Autogenerated by Thrift Compiler (2.5.4-upfluence)
|
3
3
|
#
|
4
4
|
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
5
|
#
|
6
6
|
|
7
7
|
require 'thrift'
|
8
|
-
require 'duration_types'
|
8
|
+
require 'thrift/types/known/duration/duration_types'
|
9
9
|
|
10
10
|
module Thrift
|
11
11
|
module Types
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Autogenerated by Thrift Compiler (2.
|
2
|
+
# Autogenerated by Thrift Compiler (2.5.4-upfluence)
|
3
3
|
#
|
4
4
|
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
5
|
#
|
@@ -18,12 +18,30 @@ module Thrift
|
|
18
18
|
NAME = 'Duration'.freeze
|
19
19
|
NAMESPACE = 'types.known.duration'.freeze
|
20
20
|
|
21
|
+
LEGACY_ANNOTATIONS = {
|
22
|
+
}.freeze
|
23
|
+
|
24
|
+
STRUCTURED_ANNOTATIONS = [
|
25
|
+
].freeze
|
26
|
+
|
21
27
|
THRIFT_FIELD_INDEX_SECONDS = 1
|
22
28
|
THRIFT_FIELD_INDEX_NANOS = 2
|
23
29
|
|
30
|
+
THRIFT_FIELD_SECONDS_LEGACY_ANNOTATIONS = {
|
31
|
+
}.freeze
|
32
|
+
|
33
|
+
THRIFT_FIELD_SECONDS_STRUCTURED_ANNOTATIONS = [
|
34
|
+
].freeze
|
35
|
+
|
36
|
+
THRIFT_FIELD_NANOS_LEGACY_ANNOTATIONS = {
|
37
|
+
}.freeze
|
38
|
+
|
39
|
+
THRIFT_FIELD_NANOS_STRUCTURED_ANNOTATIONS = [
|
40
|
+
].freeze
|
41
|
+
|
24
42
|
FIELDS = {
|
25
|
-
THRIFT_FIELD_INDEX_SECONDS => {type: ::Thrift::Types::I64, name: 'seconds'},
|
26
|
-
THRIFT_FIELD_INDEX_NANOS => {type: ::Thrift::Types::I32, name: 'nanos'}
|
43
|
+
THRIFT_FIELD_INDEX_SECONDS => {type: ::Thrift::Types::I64, name: 'seconds', legacy_annotations: THRIFT_FIELD_SECONDS_LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_SECONDS_STRUCTURED_ANNOTATIONS},
|
44
|
+
THRIFT_FIELD_INDEX_NANOS => {type: ::Thrift::Types::I32, name: 'nanos', legacy_annotations: THRIFT_FIELD_NANOS_LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_NANOS_STRUCTURED_ANNOTATIONS}
|
27
45
|
}
|
28
46
|
|
29
47
|
def struct_fields; FIELDS; end
|
@@ -1,11 +1,11 @@
|
|
1
1
|
#
|
2
|
-
# Autogenerated by Thrift Compiler (2.
|
2
|
+
# Autogenerated by Thrift Compiler (2.5.4-upfluence)
|
3
3
|
#
|
4
4
|
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
5
|
#
|
6
6
|
|
7
7
|
require 'thrift'
|
8
|
-
require 'timestamp_types'
|
8
|
+
require 'thrift/types/known/timestamp/timestamp_types'
|
9
9
|
|
10
10
|
module Thrift
|
11
11
|
module Types
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Autogenerated by Thrift Compiler (2.
|
2
|
+
# Autogenerated by Thrift Compiler (2.5.4-upfluence)
|
3
3
|
#
|
4
4
|
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
5
|
#
|
@@ -18,12 +18,30 @@ module Thrift
|
|
18
18
|
NAME = 'Timestamp'.freeze
|
19
19
|
NAMESPACE = 'types.known.timestamp'.freeze
|
20
20
|
|
21
|
+
LEGACY_ANNOTATIONS = {
|
22
|
+
}.freeze
|
23
|
+
|
24
|
+
STRUCTURED_ANNOTATIONS = [
|
25
|
+
].freeze
|
26
|
+
|
21
27
|
THRIFT_FIELD_INDEX_SECONDS = 1
|
22
28
|
THRIFT_FIELD_INDEX_NANOS = 2
|
23
29
|
|
30
|
+
THRIFT_FIELD_SECONDS_LEGACY_ANNOTATIONS = {
|
31
|
+
}.freeze
|
32
|
+
|
33
|
+
THRIFT_FIELD_SECONDS_STRUCTURED_ANNOTATIONS = [
|
34
|
+
].freeze
|
35
|
+
|
36
|
+
THRIFT_FIELD_NANOS_LEGACY_ANNOTATIONS = {
|
37
|
+
}.freeze
|
38
|
+
|
39
|
+
THRIFT_FIELD_NANOS_STRUCTURED_ANNOTATIONS = [
|
40
|
+
].freeze
|
41
|
+
|
24
42
|
FIELDS = {
|
25
|
-
THRIFT_FIELD_INDEX_SECONDS => {type: ::Thrift::Types::I64, name: 'seconds'},
|
26
|
-
THRIFT_FIELD_INDEX_NANOS => {type: ::Thrift::Types::I32, name: 'nanos'}
|
43
|
+
THRIFT_FIELD_INDEX_SECONDS => {type: ::Thrift::Types::I64, name: 'seconds', legacy_annotations: THRIFT_FIELD_SECONDS_LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_SECONDS_STRUCTURED_ANNOTATIONS},
|
44
|
+
THRIFT_FIELD_INDEX_NANOS => {type: ::Thrift::Types::I32, name: 'nanos', legacy_annotations: THRIFT_FIELD_NANOS_LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_NANOS_STRUCTURED_ANNOTATIONS}
|
27
45
|
}
|
28
46
|
|
29
47
|
def struct_fields; FIELDS; end
|
@@ -1,11 +1,11 @@
|
|
1
1
|
#
|
2
|
-
# Autogenerated by Thrift Compiler (2.
|
2
|
+
# Autogenerated by Thrift Compiler (2.5.4-upfluence)
|
3
3
|
#
|
4
4
|
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
5
|
#
|
6
6
|
|
7
7
|
require 'thrift'
|
8
|
-
require 'value_types'
|
8
|
+
require 'thrift/types/value/value_types'
|
9
9
|
|
10
10
|
module Thrift
|
11
11
|
module Types
|