code: func (cc *EndorsementCC) Invoke(stub shim.ChaincodeStubInterface) pb.Response {
  	funcName, _ := stub.GetFunctionAndParameters()
  	if function, ok := functions[funcName]; ok {
  		return function(stub)
  	}
  	return shim.Error(fmt.Sprintf("Unknown function %s", funcName))
  }
docs: // Invoke dispatcher