Class: Azure::Core::SignedService

Inherits:
FilteredService show all
Defined in:
lib/azure/core/signed_service.rb

Overview

A base class for Service implementations

Instance Attribute Summary collapse

Attributes inherited from FilteredService

#filters

Attributes inherited from Service

#client, #host

Instance Method Summary collapse

Methods inherited from FilteredService

#with_filter

Methods inherited from Service

#generate_uri

Constructor Details

#initialize(signer = nil, account_name = nil, options = {}) ⇒ SignedService

Create a new instance of the SignedService

Parameters:

  • signer (Azure::Core::Auth::Signer) (defaults to: nil)

    . An implementation of Signer used for signing requests. (optional, Default=Azure::Core::Auth::SharedKey.new)

  • account_name (String) (defaults to: nil)

    The account name (optional, Default=Azure.config.storage_account_name)

  • options (Hash) (defaults to: {})

    options



29
30
31
32
33
34
35
# File 'lib/azure/core/signed_service.rb', line 29

def initialize(signer=nil, =nil, options={})
  super('', options)
  signer ||= Core::Auth::SharedKey.new(client., client.storage_access_key)
  @account_name =  || client.
  @signer = signer
  filters.unshift Core::Http::SignerFilter.new(signer) if signer
end

Instance Attribute Details

#account_nameObject

Returns the value of attribute account_name.



37
38
39
# File 'lib/azure/core/signed_service.rb', line 37

def 
  @account_name
end

#signerObject

Returns the value of attribute signer.



38
39
40
# File 'lib/azure/core/signed_service.rb', line 38

def signer
  @signer
end

Instance Method Details

#call(method, uri, body = nil, headers = nil) ⇒ Object



40
41
42
# File 'lib/azure/core/signed_service.rb', line 40

def call(method, uri, body=nil, headers=nil)
  super(method, uri, body, headers)
end