refact: rename stage to repository
This commit is contained in:
36
dashboard/libs/repository/repository.py
Normal file
36
dashboard/libs/repository/repository.py
Normal file
@@ -0,0 +1,36 @@
|
||||
import abc
|
||||
from .metadata import AbstractMetadataEngine
|
||||
|
||||
|
||||
class AbstractRepository(abc.ABC):
|
||||
metadata_engine = AbstractMetadataEngine
|
||||
|
||||
@abc.abstractmethod
|
||||
def schemas():
|
||||
""" List schemas """
|
||||
raise NotImplementedError
|
||||
|
||||
@abc.abstractmethod
|
||||
def tables(schema):
|
||||
""" List table in schema"""
|
||||
raise NotImplementedError
|
||||
|
||||
@abc.abstractmethod
|
||||
def info(self, path):
|
||||
""" Get infos about a file"""
|
||||
raise NotImplementedError
|
||||
|
||||
@abc.abstractmethod
|
||||
def read(self, path):
|
||||
""" Get content of a file"""
|
||||
raise NotImplementedError
|
||||
|
||||
@abc.abstractmethod
|
||||
def write(self, path, content):
|
||||
""" Write content into the file"""
|
||||
raise NotImplementedError
|
||||
|
||||
@abc.abstractmethod
|
||||
def delete(self, path):
|
||||
""" Delete the file """
|
||||
raise NotImplementedError
|
||||
Reference in New Issue
Block a user