Name: fabric-sdk-go
Owner: Hyperledger
Description: Read-only mirror of https://gerrit.hyperledger.org/r/#/admin/projects/fabric-sdk-go
Created: 2017-03-23 18:07:56.0
Updated: 2018-05-24 05:55:55.0
Pushed: 2018-05-23 22:25:51.0
Homepage: https://hyperledger.org
Size: 10322
Language: Go
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This SDK enables Go developers to build solutions that interact with Hyperledger Fabric.
Obtain the client SDK packages for Fabric and Fabric CA.
et -u github.com/hyperledger/fabric-sdk-go
tional - populate vendor directory (if needed by your downstream vendoring solution)
$GOPATH/src/github.com/hyperledger/fabric-sdk-go/
ke populate
You're good to go, happy coding! Check out the examples for usage demonstrations.
The SDK's integration tests run against three tagged Fabric versions:
Additionally for development purposes integration tests also run against the devstable Fabric version as needed.
The SDK uses the Fabric v1.1 delivery service as the default event mechanism. When using Fabric v1.0, you must override this default by setting the event service type in the config:
nt:
er:
eventService:
type: eventhub
When the 'prev' code level is updated, the last tested fabric-sdk-go commit or tag is listed below.
the Fabric SDK Go directory
GOPATH/src/github.com/hyperledger/fabric-sdk-go/
tional - Automatically install Go tools used by test suite
ke depend-install
nning test suite
ean test suite run artifacts
clean
The following Go tags can be supplied to enable additional functionality:
If you want to contribute to the Go SDK, please run the test suite and submit patches to the Gerrit git repostory for review. For general guidelines, please refer to the Fabric project's contribution page.
You need:
To contribute patches, you will need to clone (or add a remote) from Gerrit with authentication.
the Fabric SDK Go directory
GOPATH/src/github.com/hyperledger/fabric-sdk-go/
sure dependencies are installed
depend
nning code checks (license, linting, spelling, etc)
checks
nning all unit tests
unit-test
nning all integration tests
integration-test
a package directory
est
You need:
test/fixtures/dockerenv
. It is also recommended that you use the default .env settings provided in test/fixtures/dockerenv
. See steps below.test/fixtures/config/config_test.yaml
in case your Hyperledger Fabric network is not running on localhost
or is using different ports.The test suite defaults to the latest compatible tag of fabric images at Docker Hub. The following commands starts Fabric:
the Fabric SDK Go directory
GOPATH/src/github.com/hyperledger/fabric-sdk-go/
art fabric (stable tag)
dockerenv-stable-up
more generally, start fabric at a different code level (prev, stable, prerelease, devstable)
ke dockerenv-[CODELEVEL]-up
Fabric should now be running. In a different shell, run integration tests
the Fabric SDK Go directory
GOPATH/src/github.com/hyperledger/fabric-sdk-go
e script to setup parameters for integration tests and execute them
eviously we use to have hostnames like Fabric CA server, orderer and peer pointed to localhost
w since we removed this now, We will be using a different configuration
integration-tests-local
more generally, run integration tests at a different code level (prev, stable, prerelease, devstable)
d fixture target version
BRIC_CODELEVEL_VER=[VER] FABRIC_CODELEVEL_TAG=[CODELEVEL] make integration-tests-local
ash
eviously we use to have hostnames like Fabric CA server, orderer and peer pointed to localhost
w since we removed this now, We will be using a different config file config_test_local.yaml
ich has the Fabric CA server, orderer and peers pointed to localhost
is also possible to run integration tests using go test directly. For example:
$GOPATH/src/github.com/hyperledger/fabric-sdk-go/test/integration/
-args testLocal=true test
$GOPATH/src/github.com/hyperledger/fabric-sdk-go/test/integration/orgs
-args testLocal=true test
u should review test/scripts/integration.sh for options and details.
te: you should generally prefer the scripted version to setup parameters for you.
Alternatively you can use a local build of Fabric using the following commands:
art fabric (devstable codelevel with latest docker tags)
dockerenv-latest-up
Hyperledger Fabric SDK Go software is licensed under the Apache License Version 2.0.
This document is licensed under a Creative Commons Attribution 4.0 International License.