Usage: ./network_up.sh { start | stop | restart }
- blockchainType,网络类型,取值xchain或fabric,默认xchain网络
- storageModeType,底层存储引擎,本地存储为 local,IPFS 为 ipfs,默认为 local
./network_up.sh start -b $blockchainType -s $storageModeType
./network_up.sh stop -b $blockchainType
./network_up.sh restart -b $blockchainType -s $storageModeType
Usage: ./xdb_test.sh {create_namespace | upload_file | download_file | filelist | getfilebyid
- nameSpace, 文件存储所需的命名空间
./xdb_test.sh create_namespace -n $nameSpace
- nameSpace, 取值2.1步骤创建的nameSpace
- filePath, 所需上传的文件路径
- fileDescription, 文件的描述信息
./xdb_test.sh upload_file -n $nameSpace -i $filePath -d $fileDescription
- fileID,文件ID
./xdb_test.sh download_file -f $fileID
- nameSpace, 文件所在的命名空间
./xdb_test.sh filelist -n $nameSpace
- nameSpace, 文件所在的命名空间
- dataOwnerPublicKey, 数据拥有者的公钥
docker exec -it dataowner.node.com sh -c "
./xdb-cli files list --host http://dataowner.node.com:80 -n $nameSpace -o $dataOwnerPublicKey"
- fileID,文件ID
./xdb_test.sh getfilebyid -f $fileID
- fileID,文件ID
docker exec -it dataowner.node.com sh -c "./xdb-cli files getbyid --host http://dataowner.node.com:80 -i $fileID"