spp

command
v0.0.0-...-b84eec1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2020 License: GPL-3.0 Imports: 14 Imported by: 0

README

Storage Provider Proxy

Prerequisite

make init

API

  • GET /challenge: Auth over an Ethereum account
  • POST /:fileHash/:token/:signature: Upload a specific file. Signature of the challenge needs to be provided. Access is granted if the address has write permission on the Smart-Contract provided docHash
  • GET /:fileHash/:token/:signature: Download a specific file. Signature of the challenge needs to be provided. Access is granted if the address has read permission on the Smart-Contract with the provided docHash.
  • GET /info: Returns Storage Provider's info
  • GET /ping: Returns "pong" if service running
  • GET /health: Returns a list of the dependencies' statuses (for ex. Ethereum Node connection)

GO Build

make spp

Create Smart Contract source

go get -u -v github.com/ethereum/go-ethereum/cmd/abigen
abigen --abi ./eth/solidity/ProxeusFS.abi --pkg eth --type ProxeusFSContract --out ./eth/proxeusFSContract.go

Info

A file named settings.json should be placed on the same directory than the executable having the following structure:

{
  "name": "Storage Name",
  "description": "A description",
  "jurisdictionCountry": "Switzerland",
  "dataCenter": "Cham",
  "logoUrl": "https://proxeus.com/wp-content/uploads/2018/07/logo.svg",
  "termsAndConditionsUrl": "",
  "privacyPolicyUrl": "",
  "maxFileSizeByte": 10000,             
  "maxStorageDays": 1000,       
  "graceSeconds": 1000,                // How long is the file kept after expiration. UNUSED!
  "priceByte": "0.001",               // In XESWei
  "priceDay": "0.000005"              // In XESWei
}

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
eth
fs
db

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL