Module: Azure::Storage::Common::Default

Defined in:
lib/azure/storage/common/default.rb

Constant Summary collapse

STG_VERSION =

Default REST service (STG) version number. This is used only for SAS generator.

"2017-11-09"
DEFAULT_PARALLEL_OPERATION_THREAD_COUNT =

The number of default concurrent requests for parallel operation.

1
KB =

Constant representing a kilobyte (Non-SI version).

1024
MB =

Constant representing a megabyte (Non-SI version).

1024 * 1024
GB =

Constant representing a gigabyte (Non-SI version).

1024 * 1024 * 1024
HTTP =

Specifies HTTP.

"http"
HTTPS =

Specifies HTTPS.

"https"
DEFAULT_HTTP_PORT =

Default HTTP port.

80
DEFAULT_HTTPS_PORT =

Default HTTPS port.

443
XML_METADATA_MARKER =

Marker for atom metadata.

"$"
XML_VALUE_MARKER =

Marker for atom value.

"_"

Class Method Summary collapse

Class Method Details

.optionsObject



78
79
80
# File 'lib/azure/storage/common/default.rb', line 78

def options
  Hash[Azure::Storage::Common::Configurable.keys.map { |key| [key, send(key)] }]
end

.osObject



59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/azure/storage/common/default.rb', line 59

def os
  host_os = RbConfig::CONFIG["host_os"]
  case host_os
  when /mswin|msys|mingw|cygwin|bccwin|wince|emc/
    "Windows #{host_os}"
  when /darwin|mac os/
    "MacOS #{host_os}"
  when /linux/
    "Linux #{host_os}"
  when /solaris|bsd/
    "Unix #{host_os}"
  else
    "Unknown #{host_os}"
  end
end

.signerObject

A placeholder to map with the Azure::Storage::Common::Configurable.keys

Returns:

  • nil



132
133
# File 'lib/azure/storage/common/default.rb', line 132

def signer
end

.storage_access_keyString

Default storage access key

Returns:



84
85
86
# File 'lib/azure/storage/common/default.rb', line 84

def storage_access_key
  ENV["AZURE_STORAGE_ACCESS_KEY"]
end

.storage_account_nameString

Default storage account name

Returns:



90
91
92
# File 'lib/azure/storage/common/default.rb', line 90

def 
  ENV["AZURE_STORAGE_ACCOUNT"]
end

.storage_blob_hostString

Default storage blob host

Returns:



114
115
116
# File 'lib/azure/storage/common/default.rb', line 114

def storage_blob_host
  ENV["AZURE_STORAGE_BLOB_HOST"]
end

.storage_connection_stringString

Default storage connection string

Returns:



96
97
98
# File 'lib/azure/storage/common/default.rb', line 96

def storage_connection_string
  ENV["AZURE_STORAGE_CONNECTION_STRING"]
end

.storage_file_hostString

Default storage file host

Returns:



126
127
128
# File 'lib/azure/storage/common/default.rb', line 126

def storage_file_host
  ENV["AZURE_STORAGE_FILE_HOST"]
end

.storage_queue_hostString

Default storage queue host

Returns:



120
121
122
# File 'lib/azure/storage/common/default.rb', line 120

def storage_queue_host
  ENV["AZURE_STORAGE_QUEUE_HOST"]
end

.storage_sas_tokenString

Default storage shared access signature token

Returns:



102
103
104
# File 'lib/azure/storage/common/default.rb', line 102

def storage_sas_token
  ENV["AZURE_STORAGE_SAS_TOKEN"]
end

.storage_table_hostString

Default storage table host

Returns:



108
109
110
# File 'lib/azure/storage/common/default.rb', line 108

def storage_table_host
  ENV["AZURE_STORAGE_TABLE_HOST"]
end