Chaincode for managing life cycle of charity donations and spends.
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
- Golang - version go1.11.2
- VSCode - Or any other text editor of your choice
- Govendor - Dependency vendoring tool
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
$ go test
$ go build