route

package
v0.0.0-...-b4d7d9c Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2019 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conf

type Conf struct {
	ArgsNum   int
	Transient []string
}

ValidationConf defines the validation configuration for invocation functions

type InvocationFunc

type InvocationFunc func(shim.ChaincodeStubInterface, []string) pb.Response

InvocationFunc defines the signature of a chaincode invocation function

type Mapping

type Mapping map[string]Route

Mapping is a type for mapping function names to routes

func NewMapping

func NewMapping(routes ...Route) Mapping

NewMapping creates and returns a new route mapping

func (Mapping) Handle

func (m Mapping) Handle(stub shim.ChaincodeStubInterface) (resp pb.Response)

Handle receives a stub, calls the target function or returns an error if validation fails

type Route

type Route struct {
	FunctionName string
	Function     InvocationFunc
	Conf         Conf
}

Route defines properties for invoking a chaincode function

Jump to

Keyboard shortcuts

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