cars

package
v0.4.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2019 License: MIT Imports: 6 Imported by: 5 modules, 6 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Simple CRUD chaincode for store information about cars

Simple CRUD chaincode for store information about cars

Index

Constants

View Source
const CarEntity = `CAR`
View Source
const CarRegisteredEvent = `CAR_REGISTERED`

Variables

View Source
var Payloads = []*Car{{
	Id:    `A777MP77`,
	Title: `BMW`,
	Owner: `victor-nosov`,
}, {
	Id:    `O888OO77`,
	Title: `TOYOTA`,
	Owner: `alexander`,
}, {
	Id:    `O222OO177`,
	Title: `Lambo`,
	Owner: `hodl`,
}, {
	Id:    `E333KX177`,
	Title: `Aurus`,
	Owner: `bigboss`,
}}

Functions

func New

func New() *router.Chaincode

func NewProxy added in v0.4.4

func NewProxy(carsChannel, carsChaincode string) *router.Chaincode

NewProxy created chaincode, related to cars chaincode

func NewWithoutAccessControl

func NewWithoutAccessControl() *router.Chaincode

Types

type Car

type Car struct {
	Id    string
	Title string
	Owner string

	UpdatedAt time.Time // set by chaincode method
}

Car struct for chaincode state

func (Car) Key

func (c Car) Key() ([]string, error)

Key for car entry in chaincode state

type CarPayload

type CarPayload struct {
	Id    string
	Title string
	Owner string
}

CarPayload chaincode method argument

Directories

Path Synopsis
bin

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL