examplecc

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DCASStubWrapperFactory added in v0.1.5

type DCASStubWrapperFactory interface {
	CreateDCASClientStubWrapper(coll string, stub shim.ChaincodeStubInterface) (dcasclient.DCAS, error)
}

DCASStubWrapperFactory creates a DCAS client wrapper around a stub

type ExampleCC

type ExampleCC struct {
	DCASStubWrapperFactory
	// contains filtered or unexported fields
}

ExampleCC example chaincode that puts and gets state and private data

func New

func New(name string, dbArtifacts map[string]*ccapi.DBArtifacts, dcasClientFactory DCASStubWrapperFactory) *ExampleCC

New returns a new example chaincode instance

func (*ExampleCC) Chaincode

func (cc *ExampleCC) Chaincode() shim.Chaincode

Chaincode returns the DocumentCC chaincode

func (*ExampleCC) GetDBArtifacts

func (cc *ExampleCC) GetDBArtifacts(collNames []string) map[string]*ccapi.DBArtifacts

GetDBArtifacts returns Couch DB indexes (if applicable)

func (*ExampleCC) Init

Init is not used

func (*ExampleCC) Invoke

func (cc *ExampleCC) Invoke(stub shim.ChaincodeStubInterface) pb.Response

Invoke invoke the chaincode with a given function

func (*ExampleCC) Name

func (cc *ExampleCC) Name() string

Name returns the name of this chaincode

func (*ExampleCC) Version added in v0.1.2

func (cc *ExampleCC) Version() string

Version returns the version of the chaincode

Jump to

Keyboard shortcuts

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