dapr-ruby 0.4.2 → 0.4.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c99a2a4013428ec577a3414e5a879cd6fe47ba41a746e27ba4a568318c7b2688
4
- data.tar.gz: 014e7b29879bc9da02eff98d9aaf3e86272b5c862a67e656ca6527715f9d2d01
3
+ metadata.gz: afeba2b554a9d435ca8dbdd3f91f89b22f55de40d014482229babebf277dc582
4
+ data.tar.gz: c6de8eeaf5f3451121c6368c88da2c85f7d2b633f71a7356407e6ea8ceff3724
5
5
  SHA512:
6
- metadata.gz: dbb1a81b96bba3f0e0d3c1dba8ac08fbc40a3e36962343174481bdb223bd43f7125a95723c3681e6f0834b8cd13b2f434bd2d4e6a50c1e5e547acfbb4e3b0ed4
7
- data.tar.gz: ef1bdbf13dac588b2f24c5b2079d99ff8c55db661f6d9bec14ff6d00fbb7fdc6c4340a5b884c556af12b3a3e96ca8be8b577e056dff6292c1ba5be5e7d3f4824
6
+ metadata.gz: fda292adca379b0a9b73defd7c31be8a518011dbe1f3c8897ebffafce5c9b929b78a8963c1d2466fcdd13e98712deaf0f6a0342327fdcb8fd202ca073b2ae09f
7
+ data.tar.gz: 5494042c706975735a34b8fcccce7de95c520d8c374bfdf5b4924b44ec0c79bd2f51897a34cf17a23b1694f9e144b2bcdc149aa714df94de7610dc0e7db0546d
data/Gemfile CHANGED
@@ -1,6 +1,8 @@
1
- source "https://rubygems.org"
1
+ # frozen_string_literal: true
2
2
 
3
- git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
3
+ source 'https://rubygems.org'
4
+
5
+ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
4
6
 
5
7
  # Specify your gem's dependencies in dapr.gemspec
6
8
  gemspec
data/Rakefile CHANGED
@@ -1,6 +1,8 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
4
+ require 'rspec/core/rake_task'
3
5
 
4
6
  RSpec::Core::RakeTask.new(:spec)
5
7
 
6
- task :default => :spec
8
+ task default: :spec
data/bin/console CHANGED
@@ -1,7 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
- require "bundler/setup"
4
- require "dapr"
4
+ require 'bundler/setup'
5
+ require 'dapr'
5
6
 
6
7
  # You can add fixtures and/or initialization code here to make experimenting
7
8
  # with your gem easier. You can also use a different console, if you like.
@@ -10,5 +11,5 @@ require "dapr"
10
11
  # require "pry"
11
12
  # Pry.start
12
13
 
13
- require "irb"
14
+ require 'irb'
14
15
  IRB.start(__FILE__)
data/dapr.gemspec CHANGED
@@ -1,46 +1,47 @@
1
+ # frozen_string_literal: true
1
2
 
2
- lib = File.expand_path("../lib", __FILE__)
3
+ lib = File.expand_path('lib', __dir__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require "dapr/version"
5
+ require 'dapr/version'
5
6
 
6
7
  Gem::Specification.new do |spec|
7
- spec.name = "dapr-ruby"
8
+ spec.name = 'dapr-ruby'
8
9
  spec.version = Dapr::VERSION
9
- spec.authors = ["tjwp","bougyman"]
10
- spec.email = ["tjwp@users.noreply.github.com","bougyman@users.noreply.github.com"]
10
+ spec.authors = %w[tjwp bougyman]
11
+ spec.email = ['tjwp@users.noreply.github.com', 'bougyman@users.noreply.github.com']
11
12
 
12
- spec.summary = %q{Dapr SDK for Ruby}
13
- spec.description = %q{Dapr SDK for Ruby}
14
- spec.homepage = "https://github.com/rubyists/dapr-ruby-sdk"
15
- spec.license = "MIT"
13
+ spec.summary = 'Dapr SDK for Ruby'
14
+ spec.description = 'Dapr SDK for Ruby'
15
+ spec.homepage = 'https://github.com/rubyists/dapr-ruby-sdk'
16
+ spec.license = 'MIT'
16
17
 
17
18
  # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
18
19
  # to allow pushing to a single host or delete this section to allow pushing to any host.
19
20
  if spec.respond_to?(:metadata)
20
- spec.metadata["allowed_push_host"] = "https://rubygems.org"
21
+ spec.metadata['allowed_push_host'] = 'https://rubygems.org'
21
22
 
22
- spec.metadata["homepage_uri"] = spec.homepage
23
- spec.metadata["source_code_uri"] = spec.homepage
24
- spec.metadata["changelog_uri"] = "#{spec.homepage}/CHANGELOG.md"
25
- spec.metadata["github_repo"] = "ssh://github.com/rubyists/dapr-ruby-sdk"
23
+ spec.metadata['homepage_uri'] = spec.homepage
24
+ spec.metadata['source_code_uri'] = spec.homepage
25
+ spec.metadata['changelog_uri'] = "#{spec.homepage}/CHANGELOG.md"
26
+ spec.metadata['github_repo'] = 'ssh://github.com/rubyists/dapr-ruby-sdk'
26
27
  else
27
- raise "RubyGems 2.0 or newer is required to protect against " \
28
- "public gem pushes."
28
+ raise 'RubyGems 2.0 or newer is required to protect against ' \
29
+ 'public gem pushes.'
29
30
  end
30
31
 
31
32
  # Specify which files should be added to the gem when it is released.
32
33
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
33
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
34
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
34
35
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
35
36
  end
36
- spec.bindir = "exe"
37
+ spec.bindir = 'exe'
37
38
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
38
- spec.require_paths = ["lib"]
39
+ spec.require_paths = ['lib']
39
40
 
40
- spec.add_runtime_dependency "google-protobuf"
41
+ spec.add_runtime_dependency 'google-protobuf'
41
42
 
42
- spec.add_development_dependency "grpc"
43
- spec.add_development_dependency "grpc-tools"
44
- spec.add_development_dependency "rake"
45
- spec.add_development_dependency "rspec"
43
+ spec.add_development_dependency 'grpc'
44
+ spec.add_development_dependency 'grpc-tools'
45
+ spec.add_development_dependency 'rake'
46
+ spec.add_development_dependency 'rspec'
46
47
  end
data/example.rb CHANGED
@@ -1,25 +1,25 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "dapr/proto/runtime/v1/dapr_services_pb"
3
+ require 'dapr/proto/runtime/v1/dapr_services_pb'
4
4
 
5
5
  port = ENV.fetch('DAPR_GRPC_PORT', '5001')
6
6
  dapr_uri = "localhost:#{port}"
7
7
 
8
8
  client = Dapr::Proto::Runtime::V1::Dapr::Stub.new(dapr_uri, :this_channel_is_insecure)
9
- data = 'lala'
10
- client.publish_event(Dapr::Proto::Runtime::V1::PublishEventRequest.new(pubsub_name: 'pubsub', topic: 'sith', data: 'lala'))
9
+ client.publish_event(Dapr::Proto::Runtime::V1::PublishEventRequest.new(pubsub_name: 'pubsub', topic: 'sith',
10
+ data: 'lala'))
11
11
  puts('Published')
12
12
 
13
13
  key = 'mykey'
14
14
  store_name = 'statestore'
15
- state = Dapr::Proto::Common::V1::StateItem.new(key: key, value: 'my state')
16
- req = Dapr::Proto::Runtime::V1::SaveStateRequest.new(store_name: store_name, states: [state])
15
+ state = Dapr::Proto::Common::V1::StateItem.new(key:, value: 'my state')
16
+ req = Dapr::Proto::Runtime::V1::SaveStateRequest.new(store_name:, states: [state])
17
17
  client.save_state(req)
18
18
  puts('Saved!')
19
19
 
20
- resp = client.get_state(Dapr::Proto::Runtime::V1::GetStateRequest.new(store_name: store_name, key: key))
20
+ resp = client.get_state(Dapr::Proto::Runtime::V1::GetStateRequest.new(store_name:, key:))
21
21
  puts('Got state!')
22
22
  puts(resp)
23
23
 
24
- client.delete_state(Dapr::Proto::Runtime::V1::DeleteStateRequest.new(store_name: store_name, key: key))
24
+ client.delete_state(Dapr::Proto::Runtime::V1::DeleteStateRequest.new(store_name:, key:))
25
25
  puts('Deleted!')
@@ -1,4 +1,6 @@
1
- require_relative "./app_callback_service"
1
+ # frozen_string_literal: true
2
+
3
+ require_relative './app_callback_service'
2
4
 
3
5
  $stdout.sync = true
4
6
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "dapr/proto/runtime/v1/appcallback_services_pb"
4
- require "json"
3
+ require 'dapr/proto/runtime/v1/appcallback_services_pb'
4
+ require 'json'
5
5
 
6
6
  class AppCallbackService < Dapr::Proto::Runtime::V1::AppCallback::Service
7
7
  Any = Google::Protobuf::Any
@@ -13,27 +13,27 @@ class AppCallbackService < Dapr::Proto::Runtime::V1::AppCallback::Service
13
13
  raw_data = invoke.data
14
14
  puts "invoked method '#{method}' with data '#{raw_data}'!"
15
15
  data = JSON.parse(raw_data.value) if raw_data&.value
16
- result = { method: method, data: data }
16
+ result = { method:, data: }
17
17
  Dapr::Proto::Common::V1::InvokeResponse.new(data: Any.new(value: result.to_json))
18
- rescue => ex
19
- Dapr::Proto::Common::V1::InvokeResponse.new(data: Any.new(value: { error: ex.inspect }.to_json))
18
+ rescue StandardError => e
19
+ Dapr::Proto::Common::V1::InvokeResponse.new(data: Any.new(value: { error: e.inspect }.to_json))
20
20
  end
21
21
 
22
22
  def list_topic_subscriptions(_empty, _call)
23
- puts "topics requested!"
24
- pubsub_name = "pubsub"
25
- Protocol::ListTopicSubscriptionsResponse.
26
- new(subscriptions: Array(Protocol::TopicSubscription.new(pubsub_name: pubsub_name, topic: "example")))
23
+ puts 'topics requested!'
24
+ pubsub_name = 'pubsub'
25
+ Protocol::ListTopicSubscriptionsResponse
26
+ .new(subscriptions: Array(Protocol::TopicSubscription.new(pubsub_name:, topic: 'example')))
27
27
  end
28
28
 
29
29
  def list_input_bindings(_empty, _call)
30
- puts "bindings requested!"
31
- bindings = %w(binding)
32
- Protocol::ListInputBindingsResponse.new(bindings: bindings)
30
+ puts 'bindings requested!'
31
+ bindings = %w[binding]
32
+ Protocol::ListInputBindingsResponse.new(bindings:)
33
33
  end
34
34
 
35
35
  def on_binding_event(binding_event, _call)
36
- puts "binding event!"
36
+ puts 'binding event!'
37
37
  name = binding_event.name
38
38
  raw_data = binding_event.data
39
39
  _metadata = binding_event.metadata
@@ -42,12 +42,12 @@ class AppCallbackService < Dapr::Proto::Runtime::V1::AppCallback::Service
42
42
  end
43
43
 
44
44
  def on_topic_event(topic_event, _call)
45
- puts "topic event!"
45
+ puts 'topic event!'
46
46
  topic = topic_event.topic
47
47
  raw_data = topic_event.data
48
48
  puts "Topic Event: topic:#{topic}, data: #{raw_data}"
49
49
  Google::Protobuf::Empty.new
50
- rescue => ex
51
- puts ex.inspect
50
+ rescue StandardError => e
51
+ puts e.inspect
52
52
  end
53
53
  end
@@ -1,19 +1,19 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "dapr/proto/runtime/v1/dapr_services_pb"
3
+ require 'dapr/proto/runtime/v1/dapr_services_pb'
4
4
 
5
5
  $stdout.sync = true
6
6
 
7
- port = ENV["DAPR_GRPC_PORT"]
7
+ port = ENV['DAPR_GRPC_PORT']
8
8
  stub = Dapr::Proto::Runtime::V1::Dapr::Stub.new("localhost:#{port}", :this_channel_is_insecure)
9
- request = Dapr::Proto::Runtime::V1::InvokeServiceRequest.
10
- new(id: "invoke-receiver",
11
- message: Dapr::Proto::Common::V1::InvokeRequest.new(
12
- method: "my-method",
13
- data: Google::Protobuf::Any.new(value: "TEST MESSAGE"),
14
- content_type: "text/plain; charset=UTF-8"
15
- ))
9
+ request = Dapr::Proto::Runtime::V1::InvokeServiceRequest
10
+ .new(id: 'invoke-receiver',
11
+ message: Dapr::Proto::Common::V1::InvokeRequest.new(
12
+ method: 'my-method',
13
+ data: Google::Protobuf::Any.new(value: 'TEST MESSAGE'),
14
+ content_type: 'text/plain; charset=UTF-8'
15
+ ))
16
16
  response = stub.invoke_service(request)
17
17
 
18
18
  puts response.content_type
19
- puts response.data.value
19
+ puts response.data.value
@@ -2,26 +2,26 @@
2
2
 
3
3
  $stdout.sync = true
4
4
 
5
- require "dapr/proto/runtime/v1/appcallback_services_pb"
5
+ require 'dapr/proto/runtime/v1/appcallback_services_pb'
6
6
 
7
7
  class InvokeReceiverService < Dapr::Proto::Runtime::V1::AppCallback::Service
8
8
  Any = Google::Protobuf::Any
9
9
 
10
10
  def on_invoke(invoke, _call)
11
- content_type = "text/plain; charset=UTF-8"
12
- puts "Invoked method '#{invoke["method"]}' with value '#{invoke["data"]["value"]}'"
13
- data = if invoke["method"] == "my-method"
14
- Any.new(value: "INVOKE_RECEIVED")
11
+ content_type = 'text/plain; charset=UTF-8'
12
+ puts "Invoked method '#{invoke['method']}' with value '#{invoke['data']['value']}'"
13
+ data = if invoke['method'] == 'my-method'
14
+ Any.new(value: 'INVOKE_RECEIVED')
15
15
  else
16
- Any.new(value: "unsupported method")
16
+ Any.new(value: 'unsupported method')
17
17
  end
18
18
 
19
- Dapr::Proto::Common::V1::InvokeResponse.new(data: data, content_type: content_type)
19
+ Dapr::Proto::Common::V1::InvokeResponse.new(data:, content_type:)
20
20
  end
21
21
  end
22
22
 
23
23
  server = GRPC::RpcServer.new
24
- server.add_http2_port("0.0.0.0:50051", :this_port_is_insecure)
24
+ server.add_http2_port('0.0.0.0:50051', :this_port_is_insecure)
25
25
  server.handle(InvokeReceiverService)
26
26
 
27
- server.run_till_terminated_or_interrupted([1, +"int", +"SIGQUIT"])
27
+ server.run_till_terminated_or_interrupted([1, +'int', +'SIGQUIT'])
@@ -1,19 +1,19 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "dapr/proto/runtime/v1/dapr_services_pb"
3
+ require 'dapr/proto/runtime/v1/dapr_services_pb'
4
4
 
5
5
  $stdout.sync = true
6
6
 
7
7
  RuntimeV1 = Dapr::Proto::Runtime::V1
8
8
 
9
- port = ENV["DAPR_GRPC_PORT"]
9
+ port = ENV['DAPR_GRPC_PORT']
10
10
  client = Dapr::Proto::Runtime::V1::Dapr::Stub.new("localhost:#{port}", :this_channel_is_insecure)
11
11
 
12
12
  # This matches the name of the pubsub component used
13
- pubsub_name = "pubsub"
13
+ pubsub_name = 'pubsub'
14
14
 
15
- data = "ACTION=1"
16
- client.publish_event(RuntimeV1::PublishEventRequest.
17
- new(pubsub_name: pubsub_name, topic: "TOPIC_A", data: data))
15
+ data = 'ACTION=1'
16
+ client.publish_event(RuntimeV1::PublishEventRequest
17
+ .new(pubsub_name:, topic: 'TOPIC_A', data:))
18
18
 
19
19
  puts "Published #{data}"
@@ -1,22 +1,22 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "dapr/proto/runtime/v1/appcallback_services_pb"
3
+ require 'dapr/proto/runtime/v1/appcallback_services_pb'
4
4
 
5
5
  $stdout.sync = true
6
6
 
7
7
  class Subscriber < Dapr::Proto::Runtime::V1::AppCallback::Service
8
8
  RuntimeV1 = Dapr::Proto::Runtime::V1
9
9
 
10
-
11
10
  # Dapr will call this method to get the list of topics the app
12
11
  # wants to subscribe to. In this example, we are telling Dapr
13
12
  # To subscribe to a topic named TOPIC_A
14
13
  def list_topic_subscriptions(_empty, _call)
15
14
  # Name of the configured pubsub component
16
- pubsub_name = "pubsub"
15
+ pubsub_name = 'pubsub'
17
16
 
18
17
  RuntimeV1::ListTopicSubscriptionsResponse.new(
19
- subscriptions: Array(RuntimeV1::TopicSubscription.new(pubsub_name: pubsub_name, topic: "TOPIC_A")))
18
+ subscriptions: Array(RuntimeV1::TopicSubscription.new(pubsub_name:, topic: 'TOPIC_A'))
19
+ )
20
20
  end
21
21
 
22
22
  def on_topic_event(topic_event, _call)
@@ -26,7 +26,7 @@ class Subscriber < Dapr::Proto::Runtime::V1::AppCallback::Service
26
26
  end
27
27
 
28
28
  server = GRPC::RpcServer.new
29
- server.add_http2_port("0.0.0.0:50051", :this_port_is_insecure)
29
+ server.add_http2_port('0.0.0.0:50051', :this_port_is_insecure)
30
30
  server.handle(Subscriber)
31
31
 
32
- server.run_till_terminated_or_interrupted([1, +"int", +"SIGQUIT"])
32
+ server.run_till_terminated_or_interrupted([1, +'int', +'SIGQUIT'])
@@ -1,29 +1,29 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "dapr/proto/runtime/v1/dapr_services_pb"
3
+ require 'dapr/proto/runtime/v1/dapr_services_pb'
4
4
 
5
5
  $stdout.sync = true
6
6
 
7
7
  RuntimeV1 = Dapr::Proto::Runtime::V1
8
8
 
9
- port = ENV["DAPR_GRPC_PORT"]
9
+ port = ENV['DAPR_GRPC_PORT']
10
10
  client = Dapr::Proto::Runtime::V1::Dapr::Stub.new("localhost:#{port}", :this_channel_is_insecure)
11
11
 
12
- key = "my-key"
13
- store_name = "statestore"
12
+ key = 'my-key'
13
+ store_name = 'statestore'
14
14
 
15
- state = Dapr::Proto::Common::V1::StateItem.
16
- new(key: key, value: "my state")
15
+ state = Dapr::Proto::Common::V1::StateItem
16
+ .new(key:, value: 'my state')
17
17
 
18
- client.save_state(RuntimeV1::SaveStateRequest.
19
- new(store_name: store_name, states: Array(state)))
20
- puts "Saved!"
18
+ client.save_state(RuntimeV1::SaveStateRequest
19
+ .new(store_name:, states: Array(state)))
20
+ puts 'Saved!'
21
21
 
22
- response = client.get_state(RuntimeV1::GetStateRequest.
23
- new(store_name: store_name, key: key))
24
- puts "Fetched!"
22
+ response = client.get_state(RuntimeV1::GetStateRequest
23
+ .new(store_name:, key:))
24
+ puts 'Fetched!'
25
25
  puts response.inspect
26
26
 
27
- client.delete_state(RuntimeV1::DeleteStateRequest.
28
- new(store_name: store_name, key: key))
29
- puts "Deleted!"
27
+ client.delete_state(RuntimeV1::DeleteStateRequest
28
+ .new(store_name:, key:))
29
+ puts 'Deleted!'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
4
  # source: dapr/proto/common/v1/common.proto
3
5
 
@@ -6,12 +8,12 @@ require 'google/protobuf'
6
8
  require 'google/protobuf/any_pb'
7
9
 
8
10
  Google::Protobuf::DescriptorPool.generated_pool.build do
9
- add_file("dapr/proto/common/v1/common.proto", :syntax => :proto3) do
10
- add_message "dapr.proto.common.v1.HTTPExtension" do
11
- optional :verb, :enum, 1, "dapr.proto.common.v1.HTTPExtension.Verb"
11
+ add_file('dapr/proto/common/v1/common.proto', syntax: :proto3) do
12
+ add_message 'dapr.proto.common.v1.HTTPExtension' do
13
+ optional :verb, :enum, 1, 'dapr.proto.common.v1.HTTPExtension.Verb'
12
14
  optional :querystring, :string, 2
13
15
  end
14
- add_enum "dapr.proto.common.v1.HTTPExtension.Verb" do
16
+ add_enum 'dapr.proto.common.v1.HTTPExtension.Verb' do
15
17
  value :NONE, 0
16
18
  value :GET, 1
17
19
  value :HEAD, 2
@@ -23,45 +25,45 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
23
25
  value :TRACE, 8
24
26
  value :PATCH, 9
25
27
  end
26
- add_message "dapr.proto.common.v1.InvokeRequest" do
28
+ add_message 'dapr.proto.common.v1.InvokeRequest' do
27
29
  optional :method, :string, 1
28
- optional :data, :message, 2, "google.protobuf.Any"
30
+ optional :data, :message, 2, 'google.protobuf.Any'
29
31
  optional :content_type, :string, 3
30
- optional :http_extension, :message, 4, "dapr.proto.common.v1.HTTPExtension"
32
+ optional :http_extension, :message, 4, 'dapr.proto.common.v1.HTTPExtension'
31
33
  end
32
- add_message "dapr.proto.common.v1.InvokeResponse" do
33
- optional :data, :message, 1, "google.protobuf.Any"
34
+ add_message 'dapr.proto.common.v1.InvokeResponse' do
35
+ optional :data, :message, 1, 'google.protobuf.Any'
34
36
  optional :content_type, :string, 2
35
37
  end
36
- add_message "dapr.proto.common.v1.StreamPayload" do
38
+ add_message 'dapr.proto.common.v1.StreamPayload' do
37
39
  optional :data, :bytes, 1
38
40
  optional :seq, :uint64, 2
39
41
  end
40
- add_message "dapr.proto.common.v1.StateItem" do
42
+ add_message 'dapr.proto.common.v1.StateItem' do
41
43
  optional :key, :string, 1
42
44
  optional :value, :bytes, 2
43
- optional :etag, :message, 3, "dapr.proto.common.v1.Etag"
45
+ optional :etag, :message, 3, 'dapr.proto.common.v1.Etag'
44
46
  map :metadata, :string, :string, 4
45
- optional :options, :message, 5, "dapr.proto.common.v1.StateOptions"
47
+ optional :options, :message, 5, 'dapr.proto.common.v1.StateOptions'
46
48
  end
47
- add_message "dapr.proto.common.v1.Etag" do
49
+ add_message 'dapr.proto.common.v1.Etag' do
48
50
  optional :value, :string, 1
49
51
  end
50
- add_message "dapr.proto.common.v1.StateOptions" do
51
- optional :concurrency, :enum, 1, "dapr.proto.common.v1.StateOptions.StateConcurrency"
52
- optional :consistency, :enum, 2, "dapr.proto.common.v1.StateOptions.StateConsistency"
52
+ add_message 'dapr.proto.common.v1.StateOptions' do
53
+ optional :concurrency, :enum, 1, 'dapr.proto.common.v1.StateOptions.StateConcurrency'
54
+ optional :consistency, :enum, 2, 'dapr.proto.common.v1.StateOptions.StateConsistency'
53
55
  end
54
- add_enum "dapr.proto.common.v1.StateOptions.StateConcurrency" do
56
+ add_enum 'dapr.proto.common.v1.StateOptions.StateConcurrency' do
55
57
  value :CONCURRENCY_UNSPECIFIED, 0
56
58
  value :CONCURRENCY_FIRST_WRITE, 1
57
59
  value :CONCURRENCY_LAST_WRITE, 2
58
60
  end
59
- add_enum "dapr.proto.common.v1.StateOptions.StateConsistency" do
61
+ add_enum 'dapr.proto.common.v1.StateOptions.StateConsistency' do
60
62
  value :CONSISTENCY_UNSPECIFIED, 0
61
63
  value :CONSISTENCY_EVENTUAL, 1
62
64
  value :CONSISTENCY_STRONG, 2
63
65
  end
64
- add_message "dapr.proto.common.v1.ConfigurationItem" do
66
+ add_message 'dapr.proto.common.v1.ConfigurationItem' do
65
67
  optional :value, :string, 1
66
68
  optional :version, :string, 2
67
69
  map :metadata, :string, :string, 3
@@ -73,17 +75,17 @@ module Dapr
73
75
  module Proto
74
76
  module Common
75
77
  module V1
76
- HTTPExtension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("dapr.proto.common.v1.HTTPExtension").msgclass
77
- HTTPExtension::Verb = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("dapr.proto.common.v1.HTTPExtension.Verb").enummodule
78
- InvokeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("dapr.proto.common.v1.InvokeRequest").msgclass
79
- InvokeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("dapr.proto.common.v1.InvokeResponse").msgclass
80
- StreamPayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("dapr.proto.common.v1.StreamPayload").msgclass
81
- StateItem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("dapr.proto.common.v1.StateItem").msgclass
82
- Etag = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("dapr.proto.common.v1.Etag").msgclass
83
- StateOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("dapr.proto.common.v1.StateOptions").msgclass
84
- StateOptions::StateConcurrency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("dapr.proto.common.v1.StateOptions.StateConcurrency").enummodule
85
- StateOptions::StateConsistency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("dapr.proto.common.v1.StateOptions.StateConsistency").enummodule
86
- ConfigurationItem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("dapr.proto.common.v1.ConfigurationItem").msgclass
78
+ HTTPExtension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup('dapr.proto.common.v1.HTTPExtension').msgclass
79
+ HTTPExtension::Verb = ::Google::Protobuf::DescriptorPool.generated_pool.lookup('dapr.proto.common.v1.HTTPExtension.Verb').enummodule
80
+ InvokeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup('dapr.proto.common.v1.InvokeRequest').msgclass
81
+ InvokeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup('dapr.proto.common.v1.InvokeResponse').msgclass
82
+ StreamPayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup('dapr.proto.common.v1.StreamPayload').msgclass
83
+ StateItem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup('dapr.proto.common.v1.StateItem').msgclass
84
+ Etag = ::Google::Protobuf::DescriptorPool.generated_pool.lookup('dapr.proto.common.v1.Etag').msgclass
85
+ StateOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup('dapr.proto.common.v1.StateOptions').msgclass
86
+ StateOptions::StateConcurrency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup('dapr.proto.common.v1.StateOptions.StateConcurrency').enummodule
87
+ StateOptions::StateConsistency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup('dapr.proto.common.v1.StateOptions.StateConsistency').enummodule
88
+ ConfigurationItem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup('dapr.proto.common.v1.ConfigurationItem').msgclass
87
89
  end
88
90
  end
89
91
  end