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.
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( = {}) @aliyun_oss_endpoint = [:aliyun_oss_endpoint] @aliyun_region_id = [:aliyun_region_id] @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_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 = [: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, = {}) end |
#delete_object(object, options = {}) ⇒ Object
46 47 |
# File 'lib/fog/aliyun/requests/storage/delete_object.rb', line 46 def delete_object(object, = {}) 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, = {}) end |
#get_containers(options = {}) ⇒ Object
59 60 |
# File 'lib/fog/aliyun/requests/storage/get_containers.rb', line 59 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
35 36 |
# File 'lib/fog/aliyun/requests/storage/list_buckets.rb', line 35 def list_buckets( = {}) end |
#list_objects(options = {}) ⇒ Object
86 87 |
# File 'lib/fog/aliyun/requests/storage/list_objects.rb', line 86 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
184 185 |
# File 'lib/fog/aliyun/requests/storage/put_object.rb', line 184 def put_object(object, file = nil, = {}) end |