barge

command module
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2022 License: Apache-2.0, MIT Imports: 4 Imported by: 0

README

Estuary Barge

Barge is a CLI tool that directly uses estuary api to stream/upload files to the filecoin network.

image

This project is based on the a sub module on Estuary under /cmd/barge.

Installation

Pre-requisites
  • Go
  • make
  • filecoin-ffi (this is a submodule)

Clone this repo and run the following

make all

This will generate a barge binary on the root folder that you can test.

Usage

Grab your API key from Estuary and run the following:
./barge login <API KEY>
Initialize

Initialize barge with the following command. This will create a configuration file which holds the estuary connection information.

./barge init 
Local configuration file
{
  "estuary": {
    "host": "http://localhost:3004",
    "primaryshuttle": "http://localhost:3005",
    "token": "<local API token>"
  }
}
Remote Estuary configuration
{
  "estuary": {
    "host": "https://api.estuary.tech",
    "primaryshuttle": "https://shuttle-4.estuary.tech",
    "token": "<Estuary API token>"
  }
}

Usage

Upload a file
./barge plumb put-file <file path>
Upload a CAR file
./barge plumb put-car <CAR file path>

WebUI

Run Web

./barge web

http://localhost:3000

REST API Endpoints

Run Web and use the following endpoints to interact with the barge.

./barge web
Upload file
curl --location --request POST 'http://localhost:3000/api/v0/plumb/file' \
--form 'file=@"website.png"'
Upload CAR
curl --location --request POST 'http://localhost:3000/api/v0/plumb/car' \
--form 'file=@"file.car"'

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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