plesna/dashboard/libs/repository/repository.py

37 lines
866 B
Python
Raw Normal View History

2024-07-27 15:39:09 +00:00
import abc
from .metadata import AbstractMetadataEngine
2024-08-07 09:39:33 +00:00
class AbstractRepository(abc.ABC):
2024-07-27 15:39:09 +00:00
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