Module: S3::Client::Storage

Defined in:
lib/s3/client/storage.rb

Instance Method Summary collapse

Instance Method Details

#bucketsObject



6
7
8
# File 'lib/s3/client/storage.rb', line 6

def buckets
  S3::BucketCollection.new(@api)
end

#create_bucket(bucket) ⇒ Object



14
15
16
17
18
# File 'lib/s3/client/storage.rb', line 14

def create_bucket(bucket)
  @api.create_bucket(bucket)

  S3::Bucket.new(@api, bucket)
end

#delete_bucket(bucket) ⇒ Object



20
21
22
23
24
# File 'lib/s3/client/storage.rb', line 20

def delete_bucket(bucket)
  @api.delete_bucket(bucket)

  nil
end

#delete_object(bucket, object) ⇒ Object



26
27
28
29
30
# File 'lib/s3/client/storage.rb', line 26

def delete_object(bucket, object)
  @api.delete_object(bucket, object)

  nil
end

#import(db_name, table, file_path, options = {}) ⇒ Object

options ==

  • label - label

  • jobs - count of executing pararell



36
37
38
39
40
# File 'lib/s3/client/storage.rb', line 36

def import(db_name, table, file_path, options = {})
  @api.import(db_name, table, file_path, options)

  nil
end

#objects(bucket) ⇒ Object



10
11
12
# File 'lib/s3/client/storage.rb', line 10

def objects(bucket)
  S3::ObjectCollection.new(@api, bucket)
end