Code Monkey home page Code Monkey logo

aidchaincode's Introduction

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

aidchaincode's People

Contributors

vishal3152 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.