textile-go

command module
Version: v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2018 License: MIT Imports: 20 Imported by: 0

README

textile-go

banner


MIT License Go Report Card Commitizen friendly CircleCI

Status

Throughput Graph

What is Textile?

Riding on IPFS and libp2p, Textile aims to provide a set of straightforward primitives for building decentralized mobile applications.

This repository currently contains a CLI/daemon, a desktop application, and iOS/Android mobile bindings for running a Textile Photos node. See textile-mobile for the Textile Photos iOS/Android app.

Install

$ go get github.com/textileio/textile-go

You'll need a few different tools here to get setup...

Install dep

Golang package manager:

$ brew install dep
Install gx

IPFS package manager:

$ go get -u github.com/whyrusleeping/gx
$ go get -u github.com/whyrusleeping/gx-go
Install node

NodeJS is used for git hooks and some build tooling:

$ brew install node
Install dependencies

Finally, download deps managed by gx and dep:

$ npm run setup

Usage

~ $ go run textile.go --help
Usage:
  textile [OPTIONS]

Application Options:
  -v, --version            print the version number and exit
  -r, --repo-dir=          specify a custom repository path
  -l, --log-level=         set the logging level [debug, info, notice, warning, error, critical] (default: debug)
  -n, --no-log-files       do not save logs on disk
  -d, --daemon             start in a non-interactive daemon mode
  -s, --server             start in server mode
  -g, --gateway-bind-addr= set the gateway address (default: 127.0.0.1:random)
      --swarm-ports=       set the swarm ports (tcp,ws) (default: random)
  -c, --cafe=              cafe host address
      --cafe-bind-addr=    set the cafe address
      --cafe-db-hosts=     set the cafe mongo db hosts uri
      --cafe-db-name=      set the cafe mongo db name
      --cafe-db-user=      set the cafe mongo db user
      --cafe-db-password=  set the cafe mongo db user password
      --cafe-db-tls        use TLS for the cafe mongo db connection
      --cafe-token-secret= set the cafe token secret
      --cafe-referral-key= set the cafe referral key

Help Options:
  -h, --help               Show this help message

CLI Usage

~ $ go run textile.go
Textile
version: 0.1.2
repo: /Users/sander/.textile/repo
gateway: 127.0.0.1:5446
type 'help' for available commands
>>> help

Commands:
  cafe                manage cafe session
  clear               clear the screen
  device              manage connected devices
  exit                exit the program
  fetch-messages      fetch offline messages from the DHT
  help                display help
  id                  show node id
  notification        manage notifications
  photo               manage photos
  ping                ping another peer
  profile             manage cafe profiles
  start               start the node
  stop                stop the node
  swarm               same as ipfs swarm
  thread              manage threads

Building

There are various things to build:

CLI/daemon
$ make build
iOS Framework
$ go get golang.org/x/mobile/cmd/gomobile
$ gomobile init
$ make ios_framework
Android Framework
$ go get golang.org/x/mobile/cmd/gomobile
$ gomobile init
$ make android_framework
Desktop Application

The build is made by a vendored version of go-astilectron-bundler. Due to Go's painful package management, you'll want to delete any go-astilectron-related binaries and source code you have installed from github.com/asticode in your $GOPATH. Then you can install the vendored go-astilectron-bundler:

$ go install ./vendor/github.com/asticode/go-astilectron-bundler/astilectron-bundler

Pick your OS: Linux, Darwin, or Windows:

$ cd desktop
$ astilectron-bundler -v -c bundler.linux.json
$ astilectron-bundler -v -c bundler.darwin.json
$ astilectron-bundler -v -c bundler.windows.json

Double-click the built app in desktop/output, or run it directly:

$ cd desktop && go run *.go

See go-astilectron-bundler for more build configurations.

Note: Because cgo is required, you'll need to setup a proper C toolchain for cross-OS-compilation.

Contributing

The easiest way to write a valid commit message is to use the npm script:

$ npm run cm

This will start the interactive commit prompt.

Acknowledgments

Thanks to @cpacia, @drwasho and the rest of the OpenBazaar contributors for their work on openbazaar-go.

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Source Files

Jump to

Keyboard shortcuts

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