router

package
v0.0.0-...-f577417 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler func(stub shim.ChaincodeStubInterface, args []string) peer.Response

Handler defines a Hyperledger Fabric basic type function

type Router

type Router struct {
	// contains filtered or unexported fields
}

Router handles all Chaincode methods via Invoke

func NewRouter

func NewRouter() *Router

NewRouter creates a basic Chaincode routes

func (*Router) Handle

func (r *Router) Handle(method string, handler Handler) *Router

Handle adds a route to the Router. Routes can be overwrited in case on name conflicting

func (*Router) Invoke

func (r *Router) Invoke(method string, stub shim.ChaincodeStubInterface, args []string) peer.Response

Invoke returns a Chaincode method based on it's initial name

Jump to

Keyboard shortcuts

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