# README
go-btfs-api
Go interface to BTFS HTTP API
Install
go get -u github.com/TRON-US/go-btfs-api
This will download the source into $GOPATH/src/github.com/TRON-US/go-btfs-api
.
Usage
See the godocs for details on available methods.
Example
Add a file with the contents "hello world!":
package main
import (
"fmt"
"strings"
"os"
shell "github.com/TRON-US/go-btfs-api"
)
func main() {
// Where your local node is running on localhost:5001
sh := shell.NewShell("localhost:5001")
cid, err := sh.Add(strings.NewReader("hello world!"))
if err != nil {
fmt.Fprintf(os.Stderr, "error: %s", err)
os.Exit(1)
}
fmt.Printf("added %s", cid)
}
For a more complete example, please see: https://github.com/TRON-US/go-btfs-api/blob/master/tests/main.go
Contribute
Contributions are welcome! Please check out the issues.
License
MIT @ TRON-US.
# Functions
No description provided by the author
CidVersion allows for selecting the CID version that btfs should use.
Hash allows for selecting the multihash type.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Set storage upload time.
No description provided by the author
No description provided by the author
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Logger is used to handle incoming logs from the btfs node.
No description provided by the author
No description provided by the author
Message is a pubsub message.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
PinStreamInfo is the output type for PinsStream.
No description provided by the author
PubSubSubscription allow you to receive pubsub records that where published on the network.
No description provided by the author
RequestBuilder is an IPFS commands request builder.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Type aliases
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author