Class: Miasma::Models::Storage
- Inherits:
-
Types::Api
- Object
- Types::Api
- Miasma::Models::Storage
- Defined in:
- lib/miasma/models/storage.rb,
lib/miasma/models/storage/file.rb,
lib/miasma/models/storage/files.rb,
lib/miasma/models/storage/bucket.rb,
lib/miasma/models/storage/buckets.rb
Overview
Abstract storage API
Defined Under Namespace
Classes: Bucket, Buckets, File, Files
Constant Summary
- MAX_BODY_SIZE_FOR_STRINGIFY =
Returns max bytes allowed for storing body in string
102400
- READ_BODY_CHUNK_SIZE =
Returns chunking size for reading IO
102400
Instance Method Summary (collapse)
-
- (Array<Models::Storage::Bucket>) bucket_all
Return all buckets.
-
- (TrueClass, FalseClass) bucket_destroy(bucket)
Destroy bucket.
-
- (Models::Storage::Bucket) bucket_reload(bucket)
Reload the bucket.
-
- (Models::Storage::Bucket) bucket_save(bucket)
Save bucket.
-
- (Types::Collection<Models::Storage::Bucket>) buckets(args = {})
Storage buckets.
-
- (Array<File>) file_all(bucket)
Return all files within bucket.
-
- (TrueClass, FalseClass) file_destroy(file)
Destroy file.
-
- (Models::Storage::File) file_reload(file)
Reload the file.
-
- (Models::Storage::File) file_save(file)
Save file.
Constructor Details
This class inherits a constructor from Miasma::Types::Api
Instance Method Details
- (Array<Models::Storage::Bucket>) bucket_all
Return all buckets
55 56 57 |
# File 'lib/miasma/models/storage.rb', line 55 def bucket_all raise NotImplementedError end |
- (TrueClass, FalseClass) bucket_destroy(bucket)
Destroy bucket
40 41 42 |
# File 'lib/miasma/models/storage.rb', line 40 def bucket_destroy(bucket) raise NotImplementedError end |
- (Models::Storage::Bucket) bucket_reload(bucket)
Reload the bucket
48 49 50 |
# File 'lib/miasma/models/storage.rb', line 48 def bucket_reload(bucket) raise NotImplementedError end |
- (Models::Storage::Bucket) bucket_save(bucket)
Save bucket
32 33 34 |
# File 'lib/miasma/models/storage.rb', line 32 def bucket_save(bucket) raise NotImplementedError end |
- (Types::Collection<Models::Storage::Bucket>) buckets(args = {})
Storage buckets
22 23 24 25 26 |
# File 'lib/miasma/models/storage.rb', line 22 def buckets(args={}) memoize(:buckets) do Buckets.new(self) end end |
- (Array<File>) file_all(bucket)
Return all files within bucket
63 64 65 |
# File 'lib/miasma/models/storage.rb', line 63 def file_all(bucket) raise NotImplementedError end |
- (TrueClass, FalseClass) file_destroy(file)
Destroy file
79 80 81 |
# File 'lib/miasma/models/storage.rb', line 79 def file_destroy(file) raise NotImplementedError end |
- (Models::Storage::File) file_reload(file)
Reload the file
87 88 89 |
# File 'lib/miasma/models/storage.rb', line 87 def file_reload(file) raise NotImplementedError end |
- (Models::Storage::File) file_save(file)
Save file
71 72 73 |
# File 'lib/miasma/models/storage.rb', line 71 def file_save(file) raise NotImplementedError end |