This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
devicehub-teal/ereuse_devicehub/resources/proof/__init__.py

38 lines
730 B
Python
Raw Normal View History

2020-03-11 23:40:41 +00:00
from teal.resource import Converters, Resource
2020-03-12 16:07:35 +00:00
from ereuse_devicehub.resources.proof import schemas
2020-03-12 14:11:38 +00:00
from ereuse_devicehub.resources.proof.views import ProofView
2020-03-11 23:40:41 +00:00
class ProofDef(Resource):
SCHEMA = schemas.Proof
VIEW = ProofView
2020-03-12 16:07:35 +00:00
# AUTH = True
AUTH = False
2020-03-11 23:40:41 +00:00
ID_CONVERTER = Converters.uuid
2020-03-12 14:11:38 +00:00
class ProofTransferDef(ProofDef):
2020-03-11 23:40:41 +00:00
VIEW = None
2020-03-12 14:11:38 +00:00
SCHEMA = schemas.ProofTransfer
2020-03-11 23:40:41 +00:00
2020-03-12 14:11:38 +00:00
class ProofDataWipeDef(ProofDef):
2020-03-11 23:40:41 +00:00
VIEW = None
2020-03-12 14:11:38 +00:00
SCHEMA = schemas.ProofDataWipe
2020-03-11 23:40:41 +00:00
2020-03-12 14:11:38 +00:00
class ProofFunction(ProofDef):
2020-03-11 23:40:41 +00:00
VIEW = None
2020-03-12 14:11:38 +00:00
SCHEMA = schemas.ProofFunction
2020-03-11 23:40:41 +00:00
2020-03-12 14:11:38 +00:00
class ProofReuse(ProofDef):
2020-03-11 23:40:41 +00:00
VIEW = None
2020-03-12 14:11:38 +00:00
SCHEMA = schemas.ProofReuse
2020-03-11 23:40:41 +00:00
2020-03-12 14:11:38 +00:00
class ProofRecycling(ProofDef):
2020-03-11 23:40:41 +00:00
VIEW = None
2020-03-12 14:11:38 +00:00
SCHEMA = schemas.ProofRecycling