Skip to content
Back-end of the mock application.
Go HTML Batchfile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmd
configs
docs
pkg
scripts
.gitignore
.travis.yml
Gopkg.lock
Gopkg.toml
LICENSE
README.md
doc.go

README.md

Mock App Back-end Build Status Coverage Status GoDoc Go Report Card OpenTracing Badge

Install

Go installer can be found here. The following packages are needed:

go get github.com/alexandrevicenzi/go-sse
go get github.com/golang/dep/cmd/dep
go get github.com/go-kit/kit/log
go get github.com/go-kit/kit/transport/http
go get github.com/go-kit/kit/endpoint
go get github.com/gorilla/mux
go get github.com/lib/pq
go get github.com/mattn/goveralls
go get github.com/modocache/gover
go get github.com/pkg/errors
go get github.com/rs/cors
go get github.com/spf13/pflag
go get github.com/spf13/viper
go get github.com/stretchr/testify/assert
go get golang.org/x/tools/cmd/cover

Checkout the code in $GOPATH/src/github.com/cloudtrust/mock-app-back/

CockroachDB

Install

wget -qO- https://binaries.cockroachdb.com/cockroach-v2.0.1.linux-amd64.tgz | tar  xvz
cp -i cockroach-v2.0.1.linux-amd64/cockroach /usr/local/bin
mkdir /cloudtrust/cockroach/

Run node

cd /cloudtrust/cockroach/
cockroach start --insecure --host=localhost

Cockroach can be monitored via this page.

Create DB

cockroach sql --insecure
CREATE DATABASE hospital;
CREATE DATABASE medifiles;
CREATE USER mockappuser;
GRANT ALL ON DATABASE mockappdb TO mockappuser;
GRANT ALL ON DATABASE medifiles TO mockappuser;

Build

cd cmd
go build

Run

cd cmd
./cmd

Run tests

cd pkg
go test

Bibliography

You can’t perform that action at this time.