c3-sdk-go-example-mattermost

module
v0.0.0-...-b0ca84f Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2019 License: AGPL-3.0, Apache-2.0

README

C3 Mattermost Example

This is a fork of the Mattermost open-source chat. You can think of it like an open-source Slack.

This fork incorporates the c3-skd-go, and incorporates some other changes in order to make the business logic deterministic.

Usage

In one terminal, spin up a C3 node. Be sure to first follow the pre-install requirements.

$ go get -u github.com/c3systems/c3-go
$ cd $GOPATH/github.com/c3systems/c3-go
$ c3-go generate key -o priv.pem
$ c3-go node start --pem=priv.pem --uri=/ip4/0.0.0.0/tcp/3330 --data-dir=~/.c3 --difficulty=5

Next, in another terminal build push this dApp to your local C3 network.

$ mkdir -p $GOPATH/src/github.com/c3systems
$ cd $GOPATH/src/github.com/c3systems
$ git clone git@github.com:c3systems/c3-sdk-go-example-mattermost.git
$ cd c3-sdk-go-example-mattermost

# build the image
$ docker build .

# push the dApp to C3
$ c3-go push $(docker images -q | grep -m1 "")

# send a genesis state
$ image=<docker image> peer=<c3 peer> genesis=true go run cmd/c3-frontend/main.go 

# run the dApp, locally
$ image=<docker image> peer=<c3 peer> genesis=false go run cmd/c3-frontend/main.go server --shouldNotListen=true

Finally navigate to http://localhost:8065/public/channels/town-square

Directories

Path Synopsis
cmd
c3-frontend command
mattermost command
platform command
The plugin package is used by Mattermost server plugins written in go.
The plugin package is used by Mattermost server plugins written in go.
plugintest
The plugintest package provides mocks that can be used to test plugins.
The plugintest package provides mocks that can be used to test plugins.
plugintest/mock
This package provides aliases for the contents of "github.com/stretchr/testify/mock".
This package provides aliases for the contents of "github.com/stretchr/testify/mock".
services
markdown
This package implements a parser for the subset of the CommonMark spec necessary for us to do server-side processing.
This package implements a parser for the subset of the CommonMark spec necessary for us to do server-side processing.

Jump to

Keyboard shortcuts

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