Source

roktar / roktar / backends / _interface.py

Full commit
from abc import ABCMeta, abstractmethod


class RoktarBackend(object):
    __metaclass__ = ABCMeta
    
    def __init__(self, configuration):
        self._configuration = configuration
        self.init()
        
    def init(self):
        pass

    @abstractmethod
    def close(self):
        pass

    @abstractmethod
    def create_entity(self, data, author=None, data_for_indexing=None):
        pass

    @abstractmethod
    def get_entity(self, entity_id):
        pass
    
    @abstractmethod
    def get_changes(self, entity_id):
        pass
    
    @abstractmethod
    def get_all_entities(self):
        pass