Class: Tina4::Realtime::StorageBackend
- Inherits:
-
Object
- Object
- Tina4::Realtime::StorageBackend
- Defined in:
- lib/tina4/realtime/storage_backend.rb
Overview
Blob store interface for the realtime "files" feature.
put writes bytes, get reads them back, url returns a directly fetchable URL when the backend supports one (else nil - serve via the app download route), delete removes, exists? checks presence.
Direct Known Subclasses
Instance Method Summary collapse
- #delete(_key) ⇒ Object
- #exists?(_key) ⇒ Boolean
- #get(_key) ⇒ Object
- #put(_key, _data, _mime = "application/octet-stream") ⇒ Object
- #url(_key, _ttl = 3600) ⇒ Object
Instance Method Details
#delete(_key) ⇒ Object
23 24 25 |
# File 'lib/tina4/realtime/storage_backend.rb', line 23 def delete(_key) raise NotImplementedError end |
#exists?(_key) ⇒ Boolean
27 28 29 |
# File 'lib/tina4/realtime/storage_backend.rb', line 27 def exists?(_key) raise NotImplementedError end |
#get(_key) ⇒ Object
15 16 17 |
# File 'lib/tina4/realtime/storage_backend.rb', line 15 def get(_key) raise NotImplementedError end |
#put(_key, _data, _mime = "application/octet-stream") ⇒ Object
11 12 13 |
# File 'lib/tina4/realtime/storage_backend.rb', line 11 def put(_key, _data, _mime = "application/octet-stream") raise NotImplementedError end |
#url(_key, _ttl = 3600) ⇒ Object
19 20 21 |
# File 'lib/tina4/realtime/storage_backend.rb', line 19 def url(_key, _ttl = 3600) nil end |