Class: Fog::Storage::Aliyun::Mock

Inherits:
Object
  • Object
show all
Defined in:
lib/fog/aliyun/storage.rb,
lib/fog/aliyun/requests/storage/get_bucket.rb,
lib/fog/aliyun/requests/storage/get_object.rb,
lib/fog/aliyun/requests/storage/put_bucket.rb,
lib/fog/aliyun/requests/storage/put_object.rb,
lib/fog/aliyun/requests/storage/copy_object.rb,
lib/fog/aliyun/requests/storage/head_object.rb,
lib/fog/aliyun/requests/storage/list_buckets.rb,
lib/fog/aliyun/requests/storage/list_objects.rb,
lib/fog/aliyun/requests/storage/delete_bucket.rb,
lib/fog/aliyun/requests/storage/delete_object.rb,
lib/fog/aliyun/requests/storage/get_container.rb,
lib/fog/aliyun/requests/storage/put_container.rb,
lib/fog/aliyun/requests/storage/get_containers.rb,
lib/fog/aliyun/requests/storage/delete_container.rb,
lib/fog/aliyun/requests/storage/get_object_http_url.rb,
lib/fog/aliyun/requests/storage/get_object_https_url.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Mock

Returns a new instance of Mock.



206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
# File 'lib/fog/aliyun/storage.rb', line 206

def initialize(options = {})
  @aliyun_oss_endpoint     = options[:aliyun_oss_endpoint]
  @aliyun_region_id        = options[:aliyun_region_id]
  @aliyun_accesskey_id     = options[:aliyun_accesskey_id]
  @aliyun_accesskey_secret = options[:aliyun_accesskey_secret]
  @aliyun_oss_bucket       = options[:aliyun_oss_bucket]

  # missing_credentials = Array.new
  # missing_credentials << :aliyun_oss_endpoint unless @aliyun_oss_endpoint
  # missing_credentials << :aliyun_region_id unless @aliyun_region_id
  # missing_credentials << :aliyun_accesskey_id  unless @aliyun_accesskey_id
  # missing_credentials << :aliyun_accesskey_secret unless @aliyun_accesskey_secret
  # raise ArgumentError, "Missing required arguments: #{missing_credentials.join(', ')}" unless missing_credentials.empty?

  @connection_options = options[:connection_options] || {}

  # uri = URI.parse(@aliyun_oss_endpoint)
  # @host   = uri.host
  # @path   = uri.path
  # @port   = uri.port
  # @scheme = uri.scheme

  # @persistent = options[:persistent] || false
end

Instance Method Details

#copy_object(source_bucket, source_object, target_bucket, target_object) ⇒ Object



34
35
# File 'lib/fog/aliyun/requests/storage/copy_object.rb', line 34

def copy_object(source_bucket, source_object, target_bucket, target_object)
end

#delete_bucket(bucket) ⇒ Object



25
26
# File 'lib/fog/aliyun/requests/storage/delete_bucket.rb', line 25

def delete_bucket(bucket)
end

#delete_container(container, options = {}) ⇒ Object



30
31
# File 'lib/fog/aliyun/requests/storage/delete_container.rb', line 30

def delete_container(container, options = {})
end

#delete_object(object, options = {}) ⇒ Object



46
47
# File 'lib/fog/aliyun/requests/storage/delete_object.rb', line 46

def delete_object(object, options = {})
end

#get_bucket(bucket) ⇒ Object



136
137
# File 'lib/fog/aliyun/requests/storage/get_bucket.rb', line 136

def get_bucket(bucket)
end

#get_container(container, options = {}) ⇒ Object



55
56
# File 'lib/fog/aliyun/requests/storage/get_container.rb', line 55

def get_container(container, options = {})
end

#get_containers(options = {}) ⇒ Object



59
60
# File 'lib/fog/aliyun/requests/storage/get_containers.rb', line 59

def get_containers(options = {})
end

#get_object(object, range = nil, options = {}) ⇒ Object



40
41
# File 'lib/fog/aliyun/requests/storage/get_object.rb', line 40

def get_object(object, range = nil, options = {})
end

#get_object_http_url_public(object, expires, options = {}) ⇒ Object



38
39
# File 'lib/fog/aliyun/requests/storage/get_object_http_url.rb', line 38

def get_object_http_url_public(object, expires, options = {})
end

#get_object_https_url_public(object, expires, options = {}) ⇒ Object



38
39
# File 'lib/fog/aliyun/requests/storage/get_object_https_url.rb', line 38

def get_object_https_url_public(object, expires, options = {})
end

#head_object(object, options = {}) ⇒ Object



29
30
# File 'lib/fog/aliyun/requests/storage/head_object.rb', line 29

def head_object(object, options = {})
end

#list_buckets(options = {}) ⇒ Object



35
36
# File 'lib/fog/aliyun/requests/storage/list_buckets.rb', line 35

def list_buckets(options = {})
end

#list_objects(options = {}) ⇒ Object



86
87
# File 'lib/fog/aliyun/requests/storage/list_objects.rb', line 86

def list_objects(options = {})
end

#put_bucket(bucketName) ⇒ Object



17
18
# File 'lib/fog/aliyun/requests/storage/put_bucket.rb', line 17

def put_bucket(bucketName)
end

#put_container(name, options = {}) ⇒ Object



30
31
# File 'lib/fog/aliyun/requests/storage/put_container.rb', line 30

def put_container(name, options = {})
end

#put_object(object, file = nil, options = {}) ⇒ Object



184
185
# File 'lib/fog/aliyun/requests/storage/put_object.rb', line 184

def put_object(object, file = nil, options = {})
end