param

package
v0.0.0-...-8fe6f98 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(name string, argPoss ...int) router.MiddlewareFunc

Bool creates middleware for converting to bool chaincode method parameter

func Bytes

func Bytes(name string, argPoss ...int) router.MiddlewareFunc

Bytes creates middleware for converting to []byte chaincode method parameter

func Int

func Int(name string, argPoss ...int) router.MiddlewareFunc

Int creates middleware for converting to integer chaincode method parameter

func Param

func Param(name string, paramType interface{}, argPoss ...int) router.MiddlewareFunc

Param create middleware function for transforming stub arg to context arg

func String

func String(name string, argPoss ...int) router.MiddlewareFunc

String creates middleware for converting to string chaincode method parameter

func Struct

func Struct(name string, target interface{}, argPoss ...int) router.MiddlewareFunc

Struct creates middleware for converting to struct chaincode method parameter

Types

type MiddlewareFuncMap

type MiddlewareFuncMap map[string]router.MiddlewareFunc

MiddlewareFuncMap named list of middleware functions

func ParameterBag

func ParameterBag() MiddlewareFuncMap

ParameterBag builder for named middleware list

func (MiddlewareFuncMap) Add

func (pbag MiddlewareFuncMap) Add(name string, paramType interface{}) MiddlewareFuncMap

Add middleware function

type Parameter

type Parameter struct {
	Name   string
	Type   interface{}
	ArgPos int
}

Parameter of chain code function

func (Parameter) ValueFromStub

func (p Parameter) ValueFromStub(stub shim.ChaincodeStubInterface) (arg interface{}, err error)

type Parameters

type Parameters []Parameter

Parameters list of chain code function parameters

Jump to

Keyboard shortcuts

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