cars

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2019 License: MIT Imports: 4 Imported by: 0

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`,
}}

Functions

func New

func New() *router.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