Add dual writer for key and immutable storage

This commit is contained in:
nolash
2021-10-22 16:42:38 +02:00
parent fd6e9c23a7
commit eb42095a74
8 changed files with 139 additions and 66 deletions

View File

@@ -12,7 +12,10 @@ from cic import (
Proof,
Processor,
)
from cic.output import HTTPWriter
from cic.output import (
HTTPWriter,
KeyedWriterFactory,
)
from cic.meta import (
Meta,
MetadataWriter,
@@ -66,8 +69,8 @@ def execute(config, eargs):
MetadataSigner.gpg_path = os.path.join('/tmp')
MetadataSigner.key_file_path = '/home/lash/src/client/cic/grassrootseconomics/cic-internal-integration/apps/cic-ussd/tests/data/pgp/privatekeys_meta.asc'
MetadataSigner.gpg_passphrase = 'merman'
writers['proof'] = HTTPWriter
writers['attachment'] = HTTPWriter
writers['proof'] = KeyedWriterFactory(MetadataWriter, HTTPWriter).new
writers['attachment'] = KeyedWriterFactory(None, HTTPWriter).new
writers['meta'] = MetadataWriter
output_writer_path_meta = eargs.metadata_endpoint