[storage] Proper ABC
This commit is contained in:
parent
14b79bf0a4
commit
a0318ce82e
1 changed files with 22 additions and 6 deletions
|
@ -1,19 +1,35 @@
|
|||
from abc import ABCMeta, abstractmethod
|
||||
|
||||
class Storage:
|
||||
|
||||
class Storage():
|
||||
'''
|
||||
ABC for accounting storage
|
||||
'''
|
||||
__metaclass__ = ABCMeta
|
||||
|
||||
def __init__(self, *args, **kw):
|
||||
raise NotImplementedError()
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def get_transactions(self, *args, **kw):
|
||||
raise NotImplementedError()
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
def get_transaction(self, *args, **kw):
|
||||
raise NotImplementedError()
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
def get_account(self, *args, **kw):
|
||||
raise NotImplementedError()
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
def get_accounts(self, *args, **kw):
|
||||
raise NotImplementedError()
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
def update_transaction(self, transaction):
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
def reverse_transaction(self, transaction_id):
|
||||
raise NotImplementedError
|
||||
|
|
Loading…
Reference in a new issue