Skip to content

Chaincode for managing life cycle of charity donations and spends.

Notifications You must be signed in to change notification settings

vishal3152/AIDChaincode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

AIDChaincode

Chaincode for managing life cycle of charity donations and spends.

Project structure:

package-name
├── main
|  ├── app.go               --> chaincode entry point
|  ├── init.go              --> Chaincode Interface Init implementation 
|  ├── invoke.go            --> Chaincode Interface Invoke implementation 
|  ├── interfaces.go        --> AidAssetInterface interface 
|  ├── validate.go          --> Input arguments validations
|  ├── project.go           --> Project asset implements AidAssetInterface
|  ├── project_test.go      --> Unit tests for project asset
|  ├── item.go              --> Item asset implements AidAssetInterface
|  ├── item_test.go         --> Unit tests for item asset
|  ├── donation.go          --> Donation asset implements AidAssetInterface
|  ├── donation_test.go     --> Unit tests for donation asset
|  ├── spend.go             --> Spend asset implements AidAssetInterface
|  ├── spend_test.go        --> Unit tests for spend asset         
|  ├── util.go              --> Utility functions
   └── main_test.go         --> TestMain(m *testing.M) implementaion

Prerequisites:

  • Golang - version go1.11.2
  • VSCode - Or any other text editor of your choice
  • Govendor - Dependency vendoring tool

Setting up Project:

Set GOPATH environment variables. The GOPATH environment variable specifies the location of your workspace. Create two directory under GOPATH(workspace):

  • src - contains Go source files, and
  • bin - contains executable commands.

Also, add the workspace's bin subdirectory to your PATH.

Install govendor:

$ go get -u github.com/kardianos/govendor
$ cd GOPATH/src

Clone the chaincode project:

$ git clone https://github.com/vishal3152/AIDChaincode.git
$ cd AIDChaincode/aidcc

Download dependencies:

$ govendor add +external
$ govendor sync

Unit test the chaincode:

$ go test

Building the chaincode (go files ending with *_test are excluded from build)):

$ go build

About

Chaincode for managing life cycle of charity donations and spends.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages