41 lines
855 B
Python
41 lines
855 B
Python
from abc import ABC, abstractmethod
|
|
|
|
|
|
class Storage(ABC):
|
|
@property
|
|
@abstractmethod
|
|
def bucket(self):
|
|
raise NotImplementedError
|
|
|
|
@abstractmethod
|
|
def make_bucket(self):
|
|
raise NotImplementedError
|
|
|
|
@abstractmethod
|
|
def has_bucket(self):
|
|
raise NotImplementedError
|
|
|
|
@abstractmethod
|
|
def put_object(self, object_name, data):
|
|
raise NotImplementedError
|
|
|
|
@abstractmethod
|
|
def exists(self, object_name):
|
|
raise NotImplementedError
|
|
|
|
@abstractmethod
|
|
def get_object(self, object_name):
|
|
raise NotImplementedError
|
|
|
|
@abstractmethod
|
|
def get_all_objects(self):
|
|
raise NotImplementedError
|
|
|
|
@abstractmethod
|
|
def clear_bucket(self):
|
|
raise NotImplementedError
|
|
|
|
@abstractmethod
|
|
def get_all_object_names(self):
|
|
raise NotImplementedError
|