Dial Home Device. Small gateway for protocol translation.
It is an HTTP REST Server to stream the response from the decentralized Storj network to the client (download) & vice versa (upload). Written in Golang.
Usage:
gateway-dhd [command] <flags>
Available Commands:
help Help about any command
start start the REST server
Flags:
-e, --enableDocs For generating UI documentation of the REST server
-h, --help help for gateway-dhd
-p, --port string Port number of the REST server (default "8080")
start
- Start the REST server at the specified port number specified in the port
flag (default port: 8080
).
To build from scratch, install the latest Go.
Note: Ensure go modules are enabled (GO111MODULE=on)
To clone the repo
$ git clone https://github.com/storj-thirdparty/gateway-dhd.git
Then, build the project using the following:
$ cd gateway-dhd
$ go build
(Optional) If you want to customize the Swagger UI documentation, add those UI annotations to gateway-dhd/cmd/start.go
file and then build the project using the following:
$ go get -u github.com/swaggo/swag/cmd/swag
$ cd gateway-dhd
$ swag init -g cmd/start.go
$ go build
To download the project inside your GOPATH use the following command:
$ go get github.com/storj-thirdparty/gateway-dhd
Once you have built the project run the following commands as per your requirement:
$ ./gateway-dhd start
$ ./gateway-dhd start --enableDocs
$ ./gateway-dhd start --port <custom_port_number>
$ ./gateway-dhd start --port <custom_port_number> --enableDocs
$ ./gateway-dhd --help
$ ./gateway-dhd start --help
Once the REST server has been started & if the Swagger UI documentation for this API has been enabled, then it can be accessed from the following URL in the browser
$ <gateway_url>:<port_number>/swagger/index.html
(For example: localhost:8080/swagger/index.html)
- The project has been tested on the following operating systems:
* Windows
* Version: 10 Pro
* Processor: Intel(R) Core(TM) i3-5005U CPU @ 2.00GHz 2.00GHz
* macOS Catalina
* Version: 10.15.4
* Processor: 2.5 GHz Dual-Core Intel Core i5
* ubuntu
* Version: 16.04 LTS
* Processor: AMD A6-7310 APU with AMD Radeon R4 Graphics × 4