Class: Fog::Storage::Aliyun::Mock
- Inherits:
-
Object
- Object
- Fog::Storage::Aliyun::Mock
- 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
- #copy_object(source_bucket, source_object, target_bucket, target_object) ⇒ Object
- #delete_bucket(bucket) ⇒ Object
- #delete_container(container, options = {}) ⇒ Object
- #delete_object(object, options = {}) ⇒ Object
- #get_bucket(bucket) ⇒ Object
- #get_container(container, options = {}) ⇒ Object
- #get_containers(options = {}) ⇒ Object
- #get_object(object, range = nil, options = {}) ⇒ Object
- #get_object_http_url_public(object, expires, options = {}) ⇒ Object
- #get_object_https_url_public(object, expires, options = {}) ⇒ Object
- #head_object(object, options = {}) ⇒ Object
-
#initialize(options = {}) ⇒ Mock
constructor
A new instance of Mock.
- #list_buckets(options = {}) ⇒ Object
- #list_objects(options = {}) ⇒ Object
- #put_bucket(bucketName) ⇒ Object
- #put_container(name, options = {}) ⇒ Object
- #put_object(object, file = nil, options = {}) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Mock
Returns a new instance of Mock.
187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
# File 'lib/fog/aliyun/storage.rb', line 187 def initialize(={}) @aliyun_oss_endpoint = [:aliyun_oss_endpoint] @aliyun_oss_location = [:aliyun_oss_location] @aliyun_accesskey_id = [:aliyun_accesskey_id] @aliyun_accesskey_secret = [:aliyun_accesskey_secret] @aliyun_oss_bucket = [:aliyun_oss_bucket] #missing_credentials = Array.new #missing_credentials << :aliyun_oss_endpoint unless @aliyun_oss_endpoint #missing_credentials << :aliyun_oss_location unless @aliyun_oss_location #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] || {} #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
36 37 38 |
# File 'lib/fog/aliyun/requests/storage/copy_object.rb', line 36 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
32 33 34 |
# File 'lib/fog/aliyun/requests/storage/delete_container.rb', line 32 def delete_container(container, ={}) end |
#delete_object(object, options = {}) ⇒ Object
48 49 |
# File 'lib/fog/aliyun/requests/storage/delete_object.rb', line 48 def delete_object(object, ={}) end |
#get_bucket(bucket) ⇒ Object
143 144 |
# File 'lib/fog/aliyun/requests/storage/get_bucket.rb', line 143 def get_bucket(bucket) end |
#get_container(container, options = {}) ⇒ Object
67 68 |
# File 'lib/fog/aliyun/requests/storage/get_container.rb', line 67 def get_container(container, = {}) end |
#get_containers(options = {}) ⇒ Object
71 72 |
# File 'lib/fog/aliyun/requests/storage/get_containers.rb', line 71 def get_containers( = {}) 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, = {}) 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, = {}) 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, = {}) end |
#head_object(object, options = {}) ⇒ Object
29 30 |
# File 'lib/fog/aliyun/requests/storage/head_object.rb', line 29 def head_object(object, ={}) end |
#list_buckets(options = {}) ⇒ Object
42 43 |
# File 'lib/fog/aliyun/requests/storage/list_buckets.rb', line 42 def list_buckets(={}) end |
#list_objects(options = {}) ⇒ Object
99 100 |
# File 'lib/fog/aliyun/requests/storage/list_objects.rb', line 99 def list_objects(={}) 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, ={}) end |
#put_object(object, file = nil, options = {}) ⇒ Object
194 195 |
# File 'lib/fog/aliyun/requests/storage/put_object.rb', line 194 def put_object(object, file=nil, ={}) end |