From 54400c1b4f1562d577fd9e60c3d10ca8a937800c Mon Sep 17 00:00:00 2001 From: MickMake Date: Fri, 4 Nov 2022 17:34:30 +1100 Subject: [PATCH] v2.3.6 - Rename GoStruct --- .idea/workspace.xml | 2269 ++++++++++++++++- cmd/cmd_api.go | 2 +- cmd/cmd_data.go | 21 +- cmd/cmd_info.go | 22 +- cmd/cmd_mqtt.go | 39 +- go.mod | 47 +- go.sum | 305 +-- .../msgDownwardStatusReceipt/data.go | 8 +- .../msgDownwardStatusReceipt/struct.go | 16 +- iSolarCloud/AliSmsService/struct.go | 2 +- .../AppService/acceptPsSharing/data.go | 6 +- .../AppService/acceptPsSharing/struct.go | 16 +- iSolarCloud/AppService/activateEmail/data.go | 6 +- .../AppService/activateEmail/struct.go | 16 +- iSolarCloud/AppService/addConfig/data.go | 6 +- iSolarCloud/AppService/addConfig/struct.go | 16 +- .../AppService/addDeviceRepair/data.go | 6 +- .../AppService/addDeviceRepair/struct.go | 16 +- .../addDeviceToStructureForHousehold/data.go | 6 +- .../struct.go | 16 +- .../data.go | 6 +- .../struct.go | 16 +- iSolarCloud/AppService/addFault/data.go | 6 +- iSolarCloud/AppService/addFault/struct.go | 16 +- iSolarCloud/AppService/addFaultOrder/data.go | 6 +- .../AppService/addFaultOrder/struct.go | 16 +- iSolarCloud/AppService/addFaultPlan/data.go | 6 +- iSolarCloud/AppService/addFaultPlan/struct.go | 16 +- .../AppService/addFaultRepairSteps/data.go | 6 +- .../AppService/addFaultRepairSteps/struct.go | 16 +- .../AppService/addHouseholdEvaluation/data.go | 6 +- .../addHouseholdEvaluation/struct.go | 16 +- .../addHouseholdLeaveMessage/data.go | 6 +- .../addHouseholdLeaveMessage/struct.go | 16 +- .../addHouseholdOpinionFeedback/data.go | 6 +- .../addHouseholdOpinionFeedback/struct.go | 16 +- .../AppService/addHouseholdWorkOrder/data.go | 6 +- .../addHouseholdWorkOrder/struct.go | 16 +- iSolarCloud/AppService/addOnDutyInfo/data.go | 6 +- .../AppService/addOnDutyInfo/struct.go | 16 +- iSolarCloud/AppService/addOperRule/data.go | 6 +- iSolarCloud/AppService/addOperRule/struct.go | 16 +- .../AppService/addOrDelPsStructure/data.go | 6 +- .../AppService/addOrDelPsStructure/struct.go | 16 +- iSolarCloud/AppService/addOrderStep/data.go | 6 +- iSolarCloud/AppService/addOrderStep/struct.go | 16 +- .../addPowerStationForHousehold/data.go | 6 +- .../addPowerStationForHousehold/struct.go | 16 +- .../AppService/addPowerStationInfo/data.go | 6 +- .../AppService/addPowerStationInfo/struct.go | 16 +- .../AppService/addReportConfigEmail/data.go | 6 +- .../AppService/addReportConfigEmail/struct.go | 16 +- .../AppService/addSysAdvancedParam/data.go | 6 +- .../AppService/addSysAdvancedParam/struct.go | 16 +- iSolarCloud/AppService/addSysOrgNew/data.go | 6 +- iSolarCloud/AppService/addSysOrgNew/struct.go | 16 +- iSolarCloud/AppService/aliPayAppTest/data.go | 6 +- .../AppService/aliPayAppTest/struct.go | 16 +- iSolarCloud/AppService/auditOperRule/data.go | 6 +- .../AppService/auditOperRule/struct.go | 16 +- .../AppService/batchAddStationBySn/data.go | 6 +- .../AppService/batchAddStationBySn/struct.go | 16 +- iSolarCloud/AppService/batchImportSN/data.go | 6 +- .../AppService/batchImportSN/struct.go | 16 +- .../AppService/batchInsertUserAndOrg/data.go | 6 +- .../batchInsertUserAndOrg/struct.go | 16 +- .../data.go | 6 +- .../struct.go | 16 +- .../batchProcessPlantReport/data.go | 6 +- .../batchProcessPlantReport/struct.go | 16 +- .../AppService/batchUpdateDeviceSim/data.go | 6 +- .../AppService/batchUpdateDeviceSim/struct.go | 16 +- .../batchUpdateUserIsAgreeGdpr/data.go | 6 +- .../batchUpdateUserIsAgreeGdpr/struct.go | 16 +- .../AppService/boundMobilePhone/data.go | 6 +- .../AppService/boundMobilePhone/struct.go | 16 +- iSolarCloud/AppService/boundUserMail/data.go | 6 +- .../AppService/boundUserMail/struct.go | 16 +- .../caculateDeviceInputDiscrete/data.go | 6 +- .../caculateDeviceInputDiscrete/struct.go | 16 +- .../calculateDeviceDiscrete/data.go | 6 +- .../calculateDeviceDiscrete/struct.go | 16 +- .../calculateInitialCompensationData/data.go | 6 +- .../struct.go | 16 +- .../AppService/cancelDeliverMail/data.go | 6 +- .../AppService/cancelDeliverMail/struct.go | 16 +- .../AppService/cancelOrderScan/data.go | 6 +- .../AppService/cancelOrderScan/struct.go | 16 +- .../AppService/cancelParamSetTask/data.go | 6 +- .../AppService/cancelParamSetTask/struct.go | 16 +- .../AppService/cancelPsSharing/data.go | 6 +- .../AppService/cancelPsSharing/struct.go | 16 +- .../AppService/cancelRechargeOrder/data.go | 6 +- .../AppService/cancelRechargeOrder/struct.go | 16 +- .../changRechargeOrderToCancel/data.go | 6 +- .../changRechargeOrderToCancel/struct.go | 16 +- .../changeHouseholdUser2Installer/data.go | 6 +- .../changeHouseholdUser2Installer/struct.go | 16 +- .../AppService/changeRemoteParam/data.go | 6 +- .../AppService/changeRemoteParam/struct.go | 16 +- .../AppService/checkDealerOrgCode/data.go | 6 +- .../AppService/checkDealerOrgCode/struct.go | 16 +- .../checkDevSnIsBelongsToUser/data.go | 6 +- .../checkDevSnIsBelongsToUser/struct.go | 16 +- .../AppService/checkInverterResult/data.go | 6 +- .../AppService/checkInverterResult/struct.go | 16 +- .../AppService/checkIsCanDoParamSet/data.go | 6 +- .../AppService/checkIsCanDoParamSet/struct.go | 16 +- iSolarCloud/AppService/checkIsIvScan/data.go | 6 +- .../AppService/checkIsIvScan/struct.go | 16 +- .../AppService/checkOssObjectExist/data.go | 6 +- .../AppService/checkOssObjectExist/struct.go | 16 +- .../AppService/checkServiceIsConnect/data.go | 6 +- .../checkServiceIsConnect/struct.go | 16 +- .../checkTechnicalParameters/data.go | 6 +- .../checkTechnicalParameters/struct.go | 16 +- .../AppService/checkUnitStatus/data.go | 6 +- .../AppService/checkUnitStatus/struct.go | 16 +- .../checkUpRechargeDevicePaying/data.go | 6 +- .../checkUpRechargeDevicePaying/struct.go | 16 +- .../AppService/checkUserAccountUnique/data.go | 6 +- .../checkUserAccountUnique/struct.go | 16 +- .../checkUserAccountUniqueAll/data.go | 6 +- .../checkUserAccountUniqueAll/struct.go | 16 +- .../AppService/checkUserInfoUnique/data.go | 6 +- .../AppService/checkUserInfoUnique/struct.go | 16 +- .../AppService/checkUserIsExist/data.go | 6 +- .../AppService/checkUserIsExist/struct.go | 16 +- .../AppService/checkUserListIsExist/data.go | 6 +- .../AppService/checkUserListIsExist/struct.go | 16 +- .../AppService/checkUserPassword/data.go | 6 +- .../AppService/checkUserPassword/struct.go | 16 +- .../AppService/cloudDeploymentRecord/data.go | 6 +- .../cloudDeploymentRecord/struct.go | 16 +- .../AppService/comfirmParamModel/data.go | 6 +- .../AppService/comfirmParamModel/struct.go | 16 +- .../communicationModuleDetail/data.go | 6 +- .../communicationModuleDetail/struct.go | 16 +- .../AppService/compareValidateCode/data.go | 6 +- .../AppService/compareValidateCode/struct.go | 16 +- .../AppService/componentInfo2Cloud/data.go | 6 +- .../AppService/componentInfo2Cloud/struct.go | 16 +- iSolarCloud/AppService/confirmFault/data.go | 6 +- iSolarCloud/AppService/confirmFault/struct.go | 16 +- iSolarCloud/AppService/confirmIvFault/data.go | 6 +- .../AppService/confirmIvFault/struct.go | 16 +- .../AppService/confirmReportConfig/data.go | 6 +- .../AppService/confirmReportConfig/struct.go | 16 +- .../AppService/createAppkeyInfo/data.go | 6 +- .../AppService/createAppkeyInfo/struct.go | 16 +- .../AppService/createRenewInvoice/data.go | 6 +- .../AppService/createRenewInvoice/struct.go | 16 +- .../AppService/dealCommandReply/data.go | 6 +- .../AppService/dealCommandReply/struct.go | 16 +- .../dealDeletePsFailPsDelete/data.go | 6 +- .../dealDeletePsFailPsDelete/struct.go | 16 +- .../dealFailRemoteUpgradeSubTasks/data.go | 6 +- .../dealFailRemoteUpgradeSubTasks/struct.go | 16 +- .../dealFailRemoteUpgradeTasks/data.go | 6 +- .../dealFailRemoteUpgradeTasks/struct.go | 16 +- iSolarCloud/AppService/dealFaultOrder/data.go | 6 +- .../AppService/dealFaultOrder/struct.go | 16 +- .../dealGroupStringDisableOrEnable/data.go | 6 +- .../dealGroupStringDisableOrEnable/struct.go | 16 +- .../dealNumberOfServiceCalls2Mysql/data.go | 6 +- .../dealNumberOfServiceCalls2Mysql/struct.go | 16 +- .../dealParamSettingAfterComplete/data.go | 6 +- .../dealParamSettingAfterComplete/struct.go | 16 +- .../AppService/dealPsDataSupplement/data.go | 6 +- .../AppService/dealPsDataSupplement/struct.go | 16 +- .../AppService/dealPsReportEmailSend/data.go | 6 +- .../dealPsReportEmailSend/struct.go | 16 +- .../AppService/dealRemoteUpgrade/data.go | 6 +- .../AppService/dealRemoteUpgrade/struct.go | 16 +- .../AppService/dealSnElectrifyCheck/data.go | 6 +- .../AppService/dealSnElectrifyCheck/struct.go | 16 +- .../dealSysDeviceSimFlowInfo/data.go | 6 +- .../dealSysDeviceSimFlowInfo/struct.go | 16 +- .../AppService/dealSysDeviceSimInfo/data.go | 6 +- .../AppService/dealSysDeviceSimInfo/struct.go | 16 +- .../definiteTimeDealSnExpRemind/data.go | 6 +- .../definiteTimeDealSnExpRemind/struct.go | 16 +- .../definiteTimeDealSnStatus/data.go | 6 +- .../definiteTimeDealSnStatus/struct.go | 16 +- .../AppService/delDeviceRepair/data.go | 6 +- .../AppService/delDeviceRepair/struct.go | 16 +- iSolarCloud/AppService/delOperRule/data.go | 6 +- iSolarCloud/AppService/delOperRule/struct.go | 16 +- .../delayCallApiResidueTimes/data.go | 6 +- .../delayCallApiResidueTimes/struct.go | 16 +- .../AppService/deleteComponent/data.go | 6 +- .../AppService/deleteComponent/struct.go | 16 +- .../AppService/deleteCustomerEmployee/data.go | 6 +- .../deleteCustomerEmployee/struct.go | 16 +- .../AppService/deleteDeviceAccount/data.go | 6 +- .../AppService/deleteDeviceAccount/struct.go | 16 +- .../AppService/deleteDeviceSimById/data.go | 6 +- .../AppService/deleteDeviceSimById/struct.go | 16 +- .../deleteElectricitySettlementData/data.go | 6 +- .../deleteElectricitySettlementData/struct.go | 16 +- .../AppService/deleteFaultPlan/data.go | 6 +- .../AppService/deleteFaultPlan/struct.go | 16 +- .../AppService/deleteFirmwareFiles/data.go | 6 +- .../AppService/deleteFirmwareFiles/struct.go | 16 +- .../deleteHouseholdEvaluation/data.go | 6 +- .../deleteHouseholdEvaluation/struct.go | 16 +- .../deleteHouseholdLeaveMessage/data.go | 6 +- .../deleteHouseholdLeaveMessage/struct.go | 16 +- .../deleteHouseholdWorkOrder/data.go | 6 +- .../deleteHouseholdWorkOrder/struct.go | 16 +- .../deleteInverterSnInChnnl/data.go | 6 +- .../deleteInverterSnInChnnl/struct.go | 16 +- .../AppService/deleteModuleLog/data.go | 6 +- .../AppService/deleteModuleLog/struct.go | 16 +- .../AppService/deleteOnDutyInfo/data.go | 6 +- .../AppService/deleteOnDutyInfo/struct.go | 16 +- .../AppService/deleteOperateBillFile/data.go | 6 +- .../deleteOperateBillFile/struct.go | 16 +- .../AppService/deleteOssObject/data.go | 6 +- .../AppService/deleteOssObject/struct.go | 16 +- .../deletePowerDevicePointById/data.go | 6 +- .../deletePowerDevicePointById/struct.go | 16 +- .../AppService/deletePowerPicture/data.go | 6 +- .../AppService/deletePowerPicture/struct.go | 16 +- .../deletePowerRobotInfoBySnAndPsId/data.go | 6 +- .../deletePowerRobotInfoBySnAndPsId/struct.go | 16 +- .../deletePowerRobotSweepStrategy/data.go | 6 +- .../deletePowerRobotSweepStrategy/struct.go | 16 +- .../AppService/deleteProductionData/data.go | 6 +- .../AppService/deleteProductionData/struct.go | 16 +- iSolarCloud/AppService/deletePs/data.go | 6 +- iSolarCloud/AppService/deletePs/struct.go | 16 +- .../AppService/deleteRechargeOrder/data.go | 6 +- .../AppService/deleteRechargeOrder/struct.go | 16 +- .../deleteRegularlyConnectionInfo/data.go | 6 +- .../deleteRegularlyConnectionInfo/struct.go | 16 +- .../deleteReportConfigEmailAddr/data.go | 6 +- .../deleteReportConfigEmailAddr/struct.go | 16 +- .../AppService/deleteSysAdvancedParam/data.go | 6 +- .../deleteSysAdvancedParam/struct.go | 16 +- .../AppService/deleteSysOrgNew/data.go | 6 +- .../AppService/deleteSysOrgNew/struct.go | 16 +- iSolarCloud/AppService/deleteTemplate/data.go | 6 +- .../AppService/deleteTemplate/struct.go | 16 +- .../deleteUserInfoAllByUserId/data.go | 6 +- .../deleteUserInfoAllByUserId/struct.go | 16 +- .../deviceInputDiscreteDeleteTime/data.go | 6 +- .../deviceInputDiscreteDeleteTime/struct.go | 16 +- .../deviceInputDiscreteGetTime/data.go | 6 +- .../deviceInputDiscreteGetTime/struct.go | 16 +- .../deviceInputDiscreteInsertTime/data.go | 6 +- .../deviceInputDiscreteInsertTime/struct.go | 16 +- .../deviceInputDiscreteUpdateTime/data.go | 6 +- .../deviceInputDiscreteUpdateTime/struct.go | 16 +- .../devicePointsDataFromMySql/data.go | 10 +- .../devicePointsDataFromMySql/struct.go | 16 +- iSolarCloud/AppService/deviceReplace/data.go | 6 +- .../AppService/deviceReplace/struct.go | 16 +- .../AppService/editDeviceRepair/data.go | 6 +- .../AppService/editDeviceRepair/struct.go | 16 +- iSolarCloud/AppService/editOperRule/data.go | 6 +- iSolarCloud/AppService/editOperRule/struct.go | 16 +- .../energyPovertyAlleviation/data.go | 6 +- .../energyPovertyAlleviation/struct.go | 16 +- iSolarCloud/AppService/energyTrend/data.go | 8 +- iSolarCloud/AppService/energyTrend/struct.go | 16 +- .../exportParamSettingValPDF/data.go | 6 +- .../exportParamSettingValPDF/struct.go | 16 +- .../AppService/exportPlantReportPDF/data.go | 6 +- .../AppService/exportPlantReportPDF/struct.go | 16 +- iSolarCloud/AppService/faultAutoClose/data.go | 6 +- .../AppService/faultAutoClose/struct.go | 16 +- .../faultCloseRemindOrderHandler/data.go | 6 +- .../faultCloseRemindOrderHandler/struct.go | 16 +- .../AppService/findCodeValueList/data.go | 8 +- .../AppService/findCodeValueList/struct.go | 16 +- iSolarCloud/AppService/findEmgOrgInfo/data.go | 6 +- .../AppService/findEmgOrgInfo/struct.go | 16 +- .../AppService/findEnvironmentInfo/data.go | 6 +- .../AppService/findEnvironmentInfo/struct.go | 16 +- .../AppService/findFromHbaseAndRedis/data.go | 6 +- .../findFromHbaseAndRedis/struct.go | 16 +- iSolarCloud/AppService/findInfoByuuid/data.go | 6 +- .../AppService/findInfoByuuid/struct.go | 16 +- .../AppService/findLossAnalysisList/data.go | 6 +- .../AppService/findLossAnalysisList/struct.go | 16 +- iSolarCloud/AppService/findOnDutyInfo/data.go | 6 +- .../AppService/findOnDutyInfo/struct.go | 16 +- iSolarCloud/AppService/findPsType/data.go | 10 +- iSolarCloud/AppService/findPsType/struct.go | 16 +- .../AppService/findSingleStationPR/data.go | 6 +- .../AppService/findSingleStationPR/struct.go | 16 +- .../AppService/findUserPassword/data.go | 6 +- .../AppService/findUserPassword/struct.go | 16 +- .../genTLSUserSigByUserAccount/data.go | 6 +- .../genTLSUserSigByUserAccount/struct.go | 16 +- .../AppService/generateRandomPassword/data.go | 6 +- .../generateRandomPassword/struct.go | 16 +- .../AppService/getAPIServiceInfo/data.go | 6 +- .../AppService/getAPIServiceInfo/struct.go | 16 +- .../AppService/getAccessedPermission/data.go | 6 +- .../getAccessedPermission/struct.go | 16 +- .../AppService/getAllDeviceByPsId/data.go | 10 +- .../AppService/getAllDeviceByPsId/struct.go | 16 +- .../getAllPowerDeviceSetName/data.go | 6 +- .../getAllPowerDeviceSetName/struct.go | 16 +- .../getAllPowerRobotViewInfoByPsId/data.go | 33 +- .../getAllPowerRobotViewInfoByPsId/struct.go | 16 +- .../AppService/getAllPsIdByOrgIds/data.go | 10 +- .../AppService/getAllPsIdByOrgIds/struct.go | 16 +- .../AppService/getAllUserRemindCount/data.go | 6 +- .../getAllUserRemindCount/struct.go | 16 +- .../AppService/getAndOutletsAndUnit/data.go | 6 +- .../AppService/getAndOutletsAndUnit/struct.go | 16 +- .../AppService/getApiCallsForAppkeys/data.go | 6 +- .../getApiCallsForAppkeys/struct.go | 16 +- .../getAreaInfoCodeByCounty/data.go | 6 +- .../getAreaInfoCodeByCounty/struct.go | 16 +- iSolarCloud/AppService/getAreaList/data.go | 8 +- iSolarCloud/AppService/getAreaList/struct.go | 16 +- .../getAutoCreatePowerStation/data.go | 6 +- .../getAutoCreatePowerStation/struct.go | 16 +- .../AppService/getBackReadValue/data.go | 6 +- .../AppService/getBackReadValue/struct.go | 16 +- .../getBatchNewestPointData/data.go | 6 +- .../getBatchNewestPointData/struct.go | 16 +- .../AppService/getCallApiResidueTimes/data.go | 6 +- .../getCallApiResidueTimes/struct.go | 16 +- .../AppService/getChangedPsListByTime/data.go | 6 +- .../getChangedPsListByTime/struct.go | 16 +- .../AppService/getChnnlListByPsId/data.go | 10 +- .../AppService/getChnnlListByPsId/struct.go | 16 +- iSolarCloud/AppService/getCloudList/data.go | 6 +- iSolarCloud/AppService/getCloudList/struct.go | 16 +- .../getCloudServiceMappingConfig/data.go | 6 +- .../getCloudServiceMappingConfig/struct.go | 16 +- .../getCommunicationDeviceConfigInfo/data.go | 6 +- .../struct.go | 16 +- .../getCommunicationModuleMonitorData/data.go | 6 +- .../struct.go | 16 +- .../getComponentModelFactory/data.go | 6 +- .../getComponentModelFactory/struct.go | 16 +- iSolarCloud/AppService/getConfigList/data.go | 6 +- .../AppService/getConfigList/struct.go | 16 +- .../getConnectionInfoBySnAndLocalPort/data.go | 6 +- .../struct.go | 16 +- iSolarCloud/AppService/getCountDown/data.go | 6 +- iSolarCloud/AppService/getCountDown/struct.go | 16 +- .../AppService/getCountryServiceInfo/data.go | 6 +- .../getCountryServiceInfo/struct.go | 16 +- iSolarCloud/AppService/getCounty/data.go | 6 +- iSolarCloud/AppService/getCounty/struct.go | 16 +- .../AppService/getCustomerEmployee/data.go | 6 +- .../AppService/getCustomerEmployee/struct.go | 16 +- .../AppService/getCustomerList/data.go | 6 +- .../AppService/getCustomerList/struct.go | 16 +- .../AppService/getDataFromHBase/data.go | 6 +- .../AppService/getDataFromHBase/struct.go | 16 +- .../getDataFromHbaseByRowKey/data.go | 6 +- .../getDataFromHbaseByRowKey/struct.go | 16 +- .../getDevInstalledPowerByPsId/data.go | 6 +- .../getDevInstalledPowerByPsId/struct.go | 16 +- iSolarCloud/AppService/getDevRecord/data.go | 6 +- iSolarCloud/AppService/getDevRecord/struct.go | 16 +- .../AppService/getDevRunRecordList/data.go | 6 +- .../AppService/getDevRunRecordList/struct.go | 16 +- .../AppService/getDevSimByList/data.go | 6 +- .../AppService/getDevSimByList/struct.go | 16 +- iSolarCloud/AppService/getDevSimList/data.go | 6 +- .../AppService/getDevSimList/struct.go | 16 +- .../AppService/getDeviceAccountById/data.go | 6 +- .../AppService/getDeviceAccountById/struct.go | 16 +- .../getDeviceFaultStatisticsData/data.go | 6 +- .../getDeviceFaultStatisticsData/struct.go | 16 +- iSolarCloud/AppService/getDeviceInfo/data.go | 6 +- .../AppService/getDeviceInfo/struct.go | 16 +- iSolarCloud/AppService/getDeviceList/data.go | 73 +- .../AppService/getDeviceList/struct.go | 16 +- .../AppService/getDeviceModelInfoList/data.go | 46 +- .../getDeviceModelInfoList/struct.go | 16 +- .../getDevicePointMinuteDataList/data.go | 6 +- .../getDevicePointMinuteDataList/struct.go | 16 +- .../AppService/getDevicePoints/data.go | 6 +- .../AppService/getDevicePoints/struct.go | 16 +- .../AppService/getDevicePropertys/data.go | 6 +- .../AppService/getDevicePropertys/struct.go | 16 +- .../AppService/getDeviceRepairDetail/data.go | 6 +- .../getDeviceRepairDetail/struct.go | 16 +- .../getDeviceTechBranchCount/data.go | 6 +- .../getDeviceTechBranchCount/struct.go | 16 +- .../AppService/getDeviceTypeInfoList/data.go | 6 +- .../getDeviceTypeInfoList/struct.go | 16 +- .../AppService/getDeviceTypeList/data.go | 6 +- .../AppService/getDeviceTypeList/struct.go | 16 +- iSolarCloud/AppService/getDstInfo/data.go | 6 +- iSolarCloud/AppService/getDstInfo/struct.go | 16 +- .../getElectricitySettlementData/data.go | 6 +- .../getElectricitySettlementData/struct.go | 16 +- .../data.go | 6 +- .../struct.go | 16 +- .../AppService/getEncryptPublicKey/data.go | 4 +- .../AppService/getEncryptPublicKey/struct.go | 16 +- iSolarCloud/AppService/getFaultCount/data.go | 6 +- .../AppService/getFaultCount/struct.go | 16 +- iSolarCloud/AppService/getFaultDetail/data.go | 6 +- .../AppService/getFaultDetail/struct.go | 16 +- .../AppService/getFaultMsgByFaultCode/data.go | 6 +- .../getFaultMsgByFaultCode/struct.go | 16 +- .../getFaultMsgListByPageWithYYYYMM/data.go | 6 +- .../getFaultMsgListByPageWithYYYYMM/struct.go | 16 +- .../getFaultMsgListWithYYYYMM/data.go | 6 +- .../getFaultMsgListWithYYYYMM/struct.go | 16 +- .../AppService/getFaultPlanList/data.go | 6 +- .../AppService/getFaultPlanList/struct.go | 16 +- .../getFileOperationRecordOne/data.go | 6 +- .../getFileOperationRecordOne/struct.go | 16 +- .../getFormulaFaultAnalyseList/data.go | 6 +- .../getFormulaFaultAnalyseList/struct.go | 16 +- .../getGroupStringCheckResult/data.go | 6 +- .../getGroupStringCheckResult/struct.go | 16 +- .../getGroupStringCheckRule/data.go | 6 +- .../getGroupStringCheckRule/struct.go | 16 +- iSolarCloud/AppService/getHisData/data.go | 6 +- iSolarCloud/AppService/getHisData/struct.go | 16 +- iSolarCloud/AppService/getHistoryInfo/data.go | 6 +- .../AppService/getHistoryInfo/struct.go | 16 +- .../AppService/getHouseholdEvaluation/data.go | 6 +- .../getHouseholdEvaluation/struct.go | 16 +- .../getHouseholdLeaveMessage/data.go | 6 +- .../getHouseholdLeaveMessage/struct.go | 16 +- .../getHouseholdOpinionFeedback/data.go | 6 +- .../getHouseholdOpinionFeedback/struct.go | 16 +- .../getHouseholdPsInstallerByUserId/data.go | 6 +- .../getHouseholdPsInstallerByUserId/struct.go | 16 +- .../getHouseholdStoragePsReport/data.go | 10 +- .../getHouseholdStoragePsReport/struct.go | 16 +- .../AppService/getHouseholdUserInfo/data.go | 6 +- .../AppService/getHouseholdUserInfo/struct.go | 16 +- .../getHouseholdWorkOrderInfo/data.go | 6 +- .../getHouseholdWorkOrderInfo/struct.go | 16 +- .../getHouseholdWorkOrderList/data.go | 6 +- .../getHouseholdWorkOrderList/struct.go | 16 +- .../AppService/getI18nConfigByType/data.go | 6 +- .../AppService/getI18nConfigByType/struct.go | 16 +- .../AppService/getI18nFileInfo/data.go | 6 +- .../AppService/getI18nFileInfo/struct.go | 16 +- .../AppService/getI18nInfoByKey/data.go | 6 +- .../AppService/getI18nInfoByKey/struct.go | 16 +- iSolarCloud/AppService/getI18nVersion/data.go | 6 +- .../AppService/getI18nVersion/struct.go | 16 +- .../AppService/getIncomeSettingInfos/data.go | 10 +- .../getIncomeSettingInfos/struct.go | 16 +- .../AppService/getInfoFromAMap/data.go | 6 +- .../AppService/getInfoFromAMap/struct.go | 16 +- .../AppService/getInfomationFromRedis/data.go | 6 +- .../getInfomationFromRedis/struct.go | 16 +- .../AppService/getInstallInfoList/data.go | 6 +- .../AppService/getInstallInfoList/struct.go | 16 +- .../data.go | 8 +- .../struct.go | 16 +- .../AppService/getInvertDataList/data.go | 4 +- .../AppService/getInvertDataList/struct.go | 16 +- .../AppService/getInverterDataCount/data.go | 6 +- .../AppService/getInverterDataCount/struct.go | 16 +- .../AppService/getInverterProcess/data.go | 6 +- .../AppService/getInverterProcess/struct.go | 16 +- .../getInverterUuidBytotalId/data.go | 6 +- .../getInverterUuidBytotalId/struct.go | 16 +- .../AppService/getIvEchartsData/data.go | 6 +- .../AppService/getIvEchartsData/struct.go | 16 +- .../AppService/getIvEchartsDataById/data.go | 6 +- .../AppService/getIvEchartsDataById/struct.go | 16 +- iSolarCloud/AppService/getKpiInfo/data.go | 14 +- iSolarCloud/AppService/getKpiInfo/struct.go | 16 +- .../AppService/getListMiFromHBase/data.go | 6 +- .../AppService/getListMiFromHBase/struct.go | 16 +- iSolarCloud/AppService/getMapInfo/data.go | 4 +- iSolarCloud/AppService/getMapInfo/struct.go | 16 +- .../AppService/getMapMiFromHBase/data.go | 6 +- .../AppService/getMapMiFromHBase/struct.go | 16 +- .../AppService/getMenuAndPrivileges/data.go | 6 +- .../AppService/getMenuAndPrivileges/struct.go | 16 +- .../getMicrogridEStoragePsReport/data.go | 6 +- .../getMicrogridEStoragePsReport/struct.go | 16 +- .../AppService/getModuleLogInfo/data.go | 6 +- .../AppService/getModuleLogInfo/struct.go | 16 +- .../AppService/getModuleLogTaskList/data.go | 18 +- .../AppService/getModuleLogTaskList/struct.go | 16 +- .../AppService/getNationProvJSON/data.go | 6 +- .../AppService/getNationProvJSON/struct.go | 16 +- .../getNeedOpAsynOpRecordList/data.go | 6 +- .../getNeedOpAsynOpRecordList/struct.go | 16 +- iSolarCloud/AppService/getNoticeInfo/data.go | 6 +- .../AppService/getNoticeInfo/struct.go | 16 +- .../getNumberOfServiceCalls/data.go | 6 +- .../getNumberOfServiceCalls/struct.go | 16 +- iSolarCloud/AppService/getOSSConfig/data.go | 6 +- iSolarCloud/AppService/getOSSConfig/struct.go | 16 +- .../AppService/getOperRuleDetail/data.go | 6 +- .../AppService/getOperRuleDetail/struct.go | 16 +- .../AppService/getOperateBillFileId/data.go | 6 +- .../AppService/getOperateBillFileId/struct.go | 16 +- .../getOperateTicketForDetail/data.go | 6 +- .../getOperateTicketForDetail/struct.go | 16 +- .../getOrCreateNetEaseUserToken/data.go | 6 +- .../getOrCreateNetEaseUserToken/struct.go | 16 +- .../AppService/getOrderDataList/data.go | 6 +- .../AppService/getOrderDataList/struct.go | 16 +- .../AppService/getOrderDataSql2/data.go | 6 +- .../AppService/getOrderDataSql2/struct.go | 16 +- iSolarCloud/AppService/getOrderDatas/data.go | 6 +- .../AppService/getOrderDatas/struct.go | 16 +- iSolarCloud/AppService/getOrderDetail/data.go | 6 +- .../AppService/getOrderDetail/struct.go | 16 +- .../AppService/getOrderStatistics/data.go | 6 +- .../AppService/getOrderStatistics/struct.go | 16 +- .../AppService/getOrgIdNameByUserId/data.go | 6 +- .../AppService/getOrgIdNameByUserId/struct.go | 16 +- .../getOrgInfoByDealerOrgCode/data.go | 6 +- .../getOrgInfoByDealerOrgCode/struct.go | 16 +- .../AppService/getOrgListByName/data.go | 6 +- .../AppService/getOrgListByName/struct.go | 16 +- .../AppService/getOrgListByUserId/data.go | 6 +- .../AppService/getOrgListByUserId/struct.go | 16 +- .../AppService/getOrgListForUser/data.go | 6 +- .../AppService/getOrgListForUser/struct.go | 16 +- .../AppService/getOssObjectStream/data.go | 6 +- .../AppService/getOssObjectStream/struct.go | 16 +- .../getOwnerFaultConfigList/data.go | 6 +- .../getOwnerFaultConfigList/struct.go | 16 +- .../AppService/getPListinfoFromMysql/data.go | 6 +- .../getPListinfoFromMysql/struct.go | 16 +- .../getParamSetTemplate4NewProtocol/data.go | 6 +- .../getParamSetTemplate4NewProtocol/struct.go | 16 +- .../getParamSetTemplatePointInfo/data.go | 6 +- .../getParamSetTemplatePointInfo/struct.go | 16 +- .../AppService/getParamterSettingBase/data.go | 6 +- .../getParamterSettingBase/struct.go | 16 +- iSolarCloud/AppService/getPhotoInfo/data.go | 4 +- iSolarCloud/AppService/getPhotoInfo/struct.go | 16 +- .../AppService/getPlanedOrNotPsList/data.go | 6 +- .../AppService/getPlanedOrNotPsList/struct.go | 16 +- .../AppService/getPlantReportPDFList/data.go | 6 +- .../getPlantReportPDFList/struct.go | 16 +- .../getPowerChargeSettingInfo/data.go | 10 +- .../getPowerChargeSettingInfo/struct.go | 16 +- .../getPowerDeviceModelTechList/data.go | 6 +- .../getPowerDeviceModelTechList/struct.go | 16 +- .../getPowerDeviceModelTree/data.go | 6 +- .../getPowerDeviceModelTree/struct.go | 16 +- .../getPowerDevicePointInfo/data.go | 64 +- .../getPowerDevicePointInfo/struct.go | 16 +- .../getPowerDevicePointNames/data.go | 34 +- .../getPowerDevicePointNames/struct.go | 16 +- .../getPowerDeviceSetTaskDetailList/data.go | 10 +- .../getPowerDeviceSetTaskDetailList/struct.go | 16 +- .../getPowerDeviceSetTaskList/data.go | 8 +- .../getPowerDeviceSetTaskList/struct.go | 16 +- .../getPowerFormulaFaultAnalyse/data.go | 6 +- .../getPowerFormulaFaultAnalyse/struct.go | 16 +- .../AppService/getPowerPictureList/data.go | 4 +- .../AppService/getPowerPictureList/struct.go | 16 +- .../getPowerRobotInfoByRobotSn/data.go | 6 +- .../getPowerRobotInfoByRobotSn/struct.go | 16 +- .../getPowerRobotSweepAttrByPsId/data.go | 6 +- .../getPowerRobotSweepAttrByPsId/struct.go | 16 +- .../getPowerRobotSweepStrategy/data.go | 6 +- .../getPowerRobotSweepStrategy/struct.go | 16 +- .../getPowerRobotSweepStrategyList/data.go | 6 +- .../getPowerRobotSweepStrategyList/struct.go | 16 +- .../AppService/getPowerSettingCharges/data.go | 6 +- .../getPowerSettingCharges/struct.go | 16 +- .../getPowerSettingHistoryRecords/data.go | 6 +- .../getPowerSettingHistoryRecords/struct.go | 16 +- .../getPowerStationBasicInfo/data.go | 12 +- .../getPowerStationBasicInfo/struct.go | 16 +- .../AppService/getPowerStationData/data.go | 10 +- .../AppService/getPowerStationData/struct.go | 16 +- .../getPowerStationForHousehold/data.go | 10 +- .../getPowerStationForHousehold/struct.go | 16 +- .../AppService/getPowerStationInfo/data.go | 12 +- .../AppService/getPowerStationInfo/struct.go | 16 +- .../AppService/getPowerStationPR/data.go | 6 +- .../AppService/getPowerStationPR/struct.go | 16 +- .../getPowerStationTableDataSql/data.go | 6 +- .../getPowerStationTableDataSql/struct.go | 16 +- .../getPowerStationTableDataSqlCount/data.go | 6 +- .../struct.go | 16 +- .../AppService/getPowerStatistics/data.go | 18 +- .../AppService/getPowerStatistics/struct.go | 16 +- .../AppService/getPowerTrendDayData/data.go | 6 +- .../AppService/getPowerTrendDayData/struct.go | 16 +- .../getPrivateCloudValidityPeriod/data.go | 6 +- .../getPrivateCloudValidityPeriod/struct.go | 16 +- .../getProvInfoListByNationCode/data.go | 6 +- .../getProvInfoListByNationCode/struct.go | 16 +- iSolarCloud/AppService/getPsAuthKey/data.go | 6 +- iSolarCloud/AppService/getPsAuthKey/struct.go | 16 +- iSolarCloud/AppService/getPsCurveInfo/data.go | 6 +- .../AppService/getPsCurveInfo/struct.go | 16 +- .../getPsDataSupplementTaskList/data.go | 10 +- .../getPsDataSupplementTaskList/struct.go | 16 +- iSolarCloud/AppService/getPsDetail/data.go | 12 +- iSolarCloud/AppService/getPsDetail/struct.go | 16 +- .../getPsDetailByUserTokens/data.go | 6 +- .../getPsDetailByUserTokens/struct.go | 16 +- .../getPsDetailForSinglePage/data.go | 6 +- .../getPsDetailForSinglePage/struct.go | 16 +- .../AppService/getPsDetailWithPsType/data.go | 11 +- .../getPsDetailWithPsType/struct.go | 16 +- .../AppService/getPsHealthState/data.go | 10 +- .../AppService/getPsHealthState/struct.go | 16 +- .../AppService/getPsInstallerByPsId/data.go | 6 +- .../AppService/getPsInstallerByPsId/struct.go | 16 +- .../getPsInstallerOrgInfoByPsId/data.go | 6 +- .../getPsInstallerOrgInfoByPsId/struct.go | 16 +- iSolarCloud/AppService/getPsList/data.go | 12 +- iSolarCloud/AppService/getPsList/struct.go | 16 +- .../AppService/getPsListByName/data.go | 8 +- .../AppService/getPsListByName/struct.go | 16 +- .../getPsListForPsDataByPsId/data.go | 6 +- .../getPsListForPsDataByPsId/struct.go | 16 +- .../AppService/getPsListStaticData/data.go | 10 +- .../AppService/getPsListStaticData/struct.go | 16 +- iSolarCloud/AppService/getPsReport/data.go | 10 +- iSolarCloud/AppService/getPsReport/struct.go | 16 +- iSolarCloud/AppService/getPsUser/data.go | 12 +- iSolarCloud/AppService/getPsUser/struct.go | 16 +- .../AppService/getPsWeatherList/data.go | 10 +- .../AppService/getPsWeatherList/struct.go | 16 +- .../AppService/getRechargeOrderDetail/data.go | 6 +- .../getRechargeOrderDetail/struct.go | 16 +- .../getRechargeOrderItemDeviceList/data.go | 6 +- .../getRechargeOrderItemDeviceList/struct.go | 16 +- .../AppService/getRechargeOrderList/data.go | 6 +- .../AppService/getRechargeOrderList/struct.go | 16 +- .../AppService/getRegionalTree/data.go | 14 +- .../AppService/getRegionalTree/struct.go | 16 +- .../getRemoteParamSettingList/data.go | 6 +- .../getRemoteParamSettingList/struct.go | 16 +- .../getRemoteUpgradeDeviceList/data.go | 10 +- .../getRemoteUpgradeDeviceList/struct.go | 16 +- .../getRemoteUpgradeScheduleDetails/data.go | 6 +- .../getRemoteUpgradeScheduleDetails/struct.go | 16 +- .../getRemoteUpgradeSubTasksList/data.go | 10 +- .../getRemoteUpgradeSubTasksList/struct.go | 16 +- .../getRemoteUpgradeTaskList/data.go | 8 +- .../getRemoteUpgradeTaskList/struct.go | 16 +- iSolarCloud/AppService/getReportData/data.go | 10 +- .../AppService/getReportData/struct.go | 16 +- .../getReportEmailConfigInfo/data.go | 6 +- .../getReportEmailConfigInfo/struct.go | 16 +- .../AppService/getReportExportColumns/data.go | 6 +- .../getReportExportColumns/struct.go | 16 +- .../AppService/getReportListByUserId/data.go | 6 +- .../getReportListByUserId/struct.go | 16 +- .../getRobotDynamicCleaningView/data.go | 35 +- .../getRobotDynamicCleaningView/struct.go | 16 +- .../getRobotNumAndSweepCapacity/data.go | 6 +- .../getRobotNumAndSweepCapacity/struct.go | 16 +- iSolarCloud/AppService/getRuleUnit/data.go | 6 +- iSolarCloud/AppService/getRuleUnit/struct.go | 16 +- .../getSendReportConfigCron/data.go | 6 +- .../getSendReportConfigCron/struct.go | 16 +- iSolarCloud/AppService/getSerialNum/data.go | 6 +- iSolarCloud/AppService/getSerialNum/struct.go | 16 +- .../getShieldMapConditionList/data.go | 6 +- .../getShieldMapConditionList/struct.go | 16 +- .../AppService/getSimIdBySnList/data.go | 6 +- .../AppService/getSimIdBySnList/struct.go | 16 +- .../AppService/getSingleIVData/data.go | 6 +- .../AppService/getSingleIVData/struct.go | 16 +- .../AppService/getSnChangeRecord/data.go | 6 +- .../AppService/getSnChangeRecord/struct.go | 16 +- .../AppService/getSnConnectionInfo/data.go | 6 +- .../AppService/getSnConnectionInfo/struct.go | 16 +- .../AppService/getStationInfoSql/data.go | 6 +- .../AppService/getStationInfoSql/struct.go | 16 +- .../AppService/getSungwsConfigCache/data.go | 6 +- .../AppService/getSungwsConfigCache/struct.go | 16 +- .../getSungwsGlobalConfigCache/data.go | 6 +- .../getSungwsGlobalConfigCache/struct.go | 16 +- .../getSweepDevParamSetTemplate/data.go | 6 +- .../getSweepDevParamSetTemplate/struct.go | 16 +- .../AppService/getSweepRobotDevList/data.go | 6 +- .../AppService/getSweepRobotDevList/struct.go | 16 +- iSolarCloud/AppService/getSysMsg/data.go | 6 +- iSolarCloud/AppService/getSysMsg/struct.go | 16 +- .../AppService/getSysOrgNewList/data.go | 6 +- .../AppService/getSysOrgNewList/struct.go | 16 +- .../AppService/getSysOrgNewOne/data.go | 6 +- .../AppService/getSysOrgNewOne/struct.go | 16 +- iSolarCloud/AppService/getSysUserById/data.go | 6 +- .../AppService/getSysUserById/struct.go | 16 +- .../AppService/getTableDataSql/data.go | 6 +- .../AppService/getTableDataSql/struct.go | 16 +- .../AppService/getTableDataSqlCount/data.go | 6 +- .../AppService/getTableDataSqlCount/struct.go | 16 +- .../AppService/getTemplateByInfoType/data.go | 6 +- .../getTemplateByInfoType/struct.go | 16 +- .../AppService/getTemplateList/data.go | 10 +- .../AppService/getTemplateList/struct.go | 16 +- .../AppService/getUUIDByUpuuid/data.go | 6 +- .../AppService/getUUIDByUpuuid/struct.go | 16 +- iSolarCloud/AppService/getUpTimePoint/data.go | 6 +- .../AppService/getUpTimePoint/struct.go | 16 +- iSolarCloud/AppService/getUserById/data.go | 6 +- iSolarCloud/AppService/getUserById/struct.go | 16 +- .../AppService/getUserByInstaller/data.go | 6 +- .../AppService/getUserByInstaller/struct.go | 16 +- .../getUserDevOnlineOffineCount/data.go | 6 +- .../getUserDevOnlineOffineCount/struct.go | 16 +- .../AppService/getUserGDPRAttrs/data.go | 6 +- .../AppService/getUserGDPRAttrs/struct.go | 16 +- .../getUserHavePowerStationCount/data.go | 6 +- .../getUserHavePowerStationCount/struct.go | 16 +- .../getUserInfoByUserAccounts/data.go | 6 +- .../getUserInfoByUserAccounts/struct.go | 16 +- iSolarCloud/AppService/getUserList/data.go | 6 +- iSolarCloud/AppService/getUserList/struct.go | 16 +- .../AppService/getUserPsOrderList/data.go | 18 +- .../AppService/getUserPsOrderList/struct.go | 16 +- .../AppService/getValFromHBase/data.go | 6 +- .../AppService/getValFromHBase/struct.go | 16 +- .../AppService/getValidateCode/data.go | 6 +- .../AppService/getValidateCode/struct.go | 16 +- .../getValidateCodeAtRegister/data.go | 6 +- .../getValidateCodeAtRegister/struct.go | 16 +- iSolarCloud/AppService/getWeatherInfo/data.go | 6 +- .../AppService/getWeatherInfo/struct.go | 16 +- .../AppService/getWechatPushConfig/data.go | 6 +- .../AppService/getWechatPushConfig/struct.go | 16 +- iSolarCloud/AppService/getWorkInfo/data.go | 6 +- iSolarCloud/AppService/getWorkInfo/struct.go | 16 +- .../AppService/groupStringCheck/data.go | 6 +- .../AppService/groupStringCheck/struct.go | 16 +- .../handleDevByCommunicationSN/data.go | 6 +- .../handleDevByCommunicationSN/struct.go | 16 +- .../AppService/householdResetPassBySN/data.go | 6 +- .../householdResetPassBySN/struct.go | 16 +- .../AppService/immediatePayment/data.go | 6 +- .../AppService/immediatePayment/struct.go | 16 +- .../AppService/importExcelData/data.go | 6 +- .../AppService/importExcelData/struct.go | 16 +- .../AppService/incomeStatistics/data.go | 6 +- .../AppService/incomeStatistics/struct.go | 16 +- iSolarCloud/AppService/informPush/data.go | 6 +- iSolarCloud/AppService/informPush/struct.go | 16 +- .../AppService/insertEmgOrgInfo/data.go | 6 +- .../AppService/insertEmgOrgInfo/struct.go | 16 +- .../insightSynDeviceStructure2Cloud/data.go | 6 +- .../insightSynDeviceStructure2Cloud/struct.go | 16 +- .../AppService/intoDataToHbase/data.go | 6 +- .../AppService/intoDataToHbase/struct.go | 16 +- .../AppService/ipLocationQuery/data.go | 6 +- .../AppService/ipLocationQuery/struct.go | 16 +- iSolarCloud/AppService/isHave2GSn/data.go | 6 +- iSolarCloud/AppService/isHave2GSn/struct.go | 16 +- .../judgeDevIsHasInitSetTemplate/data.go | 6 +- .../judgeDevIsHasInitSetTemplate/struct.go | 16 +- .../AppService/judgeIsSettingMan/data.go | 6 +- .../AppService/judgeIsSettingMan/struct.go | 16 +- iSolarCloud/AppService/listOssFiles/data.go | 6 +- iSolarCloud/AppService/listOssFiles/struct.go | 16 +- iSolarCloud/AppService/loadAreaInfo/data.go | 6 +- iSolarCloud/AppService/loadAreaInfo/struct.go | 16 +- .../AppService/loadPowerStation/data.go | 6 +- .../AppService/loadPowerStation/struct.go | 16 +- iSolarCloud/AppService/login/auth.go | 4 +- iSolarCloud/AppService/login/data.go | 6 +- iSolarCloud/AppService/login/struct.go | 16 +- iSolarCloud/AppService/loginByToken/data.go | 6 +- iSolarCloud/AppService/loginByToken/struct.go | 16 +- iSolarCloud/AppService/logout/data.go | 6 +- iSolarCloud/AppService/logout/struct.go | 16 +- .../AppService/mobilePhoneHasBound/data.go | 6 +- .../AppService/mobilePhoneHasBound/struct.go | 16 +- .../AppService/modifiedDeviceInfo/data.go | 6 +- .../AppService/modifiedDeviceInfo/struct.go | 16 +- .../AppService/modifyEmgOrgStruc/data.go | 6 +- .../AppService/modifyEmgOrgStruc/struct.go | 16 +- .../AppService/modifyFaultPlan/data.go | 6 +- .../AppService/modifyFaultPlan/struct.go | 16 +- .../AppService/modifyOnDutyInfo/data.go | 6 +- .../AppService/modifyOnDutyInfo/struct.go | 16 +- iSolarCloud/AppService/modifyPassword/data.go | 6 +- .../AppService/modifyPassword/struct.go | 16 +- .../AppService/modifyPersonalUnitList/data.go | 6 +- .../modifyPersonalUnitList/struct.go | 16 +- iSolarCloud/AppService/modifyPsUser/data.go | 6 +- iSolarCloud/AppService/modifyPsUser/struct.go | 16 +- .../AppService/moduleLogParamSet/data.go | 6 +- .../AppService/moduleLogParamSet/struct.go | 16 +- iSolarCloud/AppService/operateOssFile/data.go | 6 +- .../AppService/operateOssFile/struct.go | 16 +- .../operationPowerRobotSweepStrategy/data.go | 6 +- .../struct.go | 16 +- iSolarCloud/AppService/orgPowerReport/data.go | 6 +- .../AppService/orgPowerReport/struct.go | 16 +- .../AppService/paramSetTryAgain/data.go | 6 +- .../AppService/paramSetTryAgain/struct.go | 16 +- iSolarCloud/AppService/paramSetting/data.go | 6 +- iSolarCloud/AppService/paramSetting/struct.go | 16 +- iSolarCloud/AppService/planPower/data.go | 6 +- iSolarCloud/AppService/planPower/struct.go | 16 +- .../AppService/powerDevicePointList/data.go | 8 +- .../AppService/powerDevicePointList/struct.go | 16 +- .../AppService/powerTrendChartData/data.go | 6 +- .../AppService/powerTrendChartData/struct.go | 16 +- iSolarCloud/AppService/psForcastInfo/data.go | 10 +- .../AppService/psForcastInfo/struct.go | 16 +- .../AppService/psHourPointsValue/data.go | 10 +- .../AppService/psHourPointsValue/struct.go | 16 +- .../AppService/queryAllPsIdAndName/data.go | 10 +- .../AppService/queryAllPsIdAndName/struct.go | 16 +- .../queryBatchCreatePsTaskList/data.go | 4 +- .../queryBatchCreatePsTaskList/struct.go | 16 +- .../data.go | 6 +- .../struct.go | 16 +- .../AppService/queryCardStatusCTCC/data.go | 6 +- .../AppService/queryCardStatusCTCC/struct.go | 16 +- .../AppService/queryChildAccountList/data.go | 6 +- .../queryChildAccountList/struct.go | 16 +- .../queryCompensationRecordData/data.go | 6 +- .../queryCompensationRecordData/struct.go | 16 +- .../queryCompensationRecordList/data.go | 6 +- .../queryCompensationRecordList/struct.go | 16 +- iSolarCloud/AppService/queryComponent/data.go | 6 +- .../AppService/queryComponent/struct.go | 16 +- .../queryComponentTechnicalParam/data.go | 6 +- .../queryComponentTechnicalParam/struct.go | 16 +- .../queryCountryGridAndRelation/data.go | 6 +- .../queryCountryGridAndRelation/struct.go | 16 +- .../AppService/queryCountryList/data.go | 6 +- .../AppService/queryCountryList/struct.go | 16 +- .../AppService/queryCtrlTaskById/data.go | 6 +- .../AppService/queryCtrlTaskById/struct.go | 16 +- .../AppService/queryDeviceInfo/data.go | 10 +- .../AppService/queryDeviceInfo/struct.go | 16 +- .../AppService/queryDeviceInfoForApp/data.go | 10 +- .../queryDeviceInfoForApp/struct.go | 16 +- .../AppService/queryDeviceList/data.go | 21 +- .../AppService/queryDeviceList/struct.go | 16 +- .../queryDeviceListByUserId/data.go | 8 +- .../queryDeviceListByUserId/struct.go | 16 +- .../AppService/queryDeviceListForApp/data.go | 12 +- .../queryDeviceListForApp/struct.go | 16 +- .../queryDeviceModelTechnical/data.go | 6 +- .../queryDeviceModelTechnical/struct.go | 16 +- .../data.go | 10 +- .../struct.go | 16 +- .../queryDevicePointMinuteDataList/data.go | 10 +- .../queryDevicePointMinuteDataList/struct.go | 16 +- .../data.go | 6 +- .../struct.go | 16 +- .../queryDeviceRealTimeDataByPsKeys/data.go | 6 +- .../queryDeviceRealTimeDataByPsKeys/struct.go | 16 +- .../AppService/queryDeviceRepairList/data.go | 6 +- .../queryDeviceRepairList/struct.go | 16 +- .../queryDeviceTypeInfoList/data.go | 6 +- .../queryDeviceTypeInfoList/struct.go | 16 +- .../AppService/queryEnvironmentList/data.go | 6 +- .../AppService/queryEnvironmentList/struct.go | 16 +- iSolarCloud/AppService/queryFaultList/data.go | 6 +- .../AppService/queryFaultList/struct.go | 16 +- .../AppService/queryFaultPlanDetail/data.go | 6 +- .../AppService/queryFaultPlanDetail/struct.go | 16 +- .../AppService/queryFaultRepairSteps/data.go | 6 +- .../queryFaultRepairSteps/struct.go | 16 +- .../queryFaultTypeAndLevelByCode/data.go | 6 +- .../queryFaultTypeAndLevelByCode/struct.go | 16 +- .../AppService/queryFaultTypeByDevice/data.go | 6 +- .../queryFaultTypeByDevice/struct.go | 16 +- .../queryFaultTypeByDevicePage/data.go | 6 +- .../queryFaultTypeByDevicePage/struct.go | 16 +- .../AppService/queryFirmwareFilesPage/data.go | 6 +- .../queryFirmwareFilesPage/struct.go | 16 +- .../AppService/queryInfotoAlert/data.go | 6 +- .../AppService/queryInfotoAlert/struct.go | 16 +- .../AppService/queryInverterModelList/data.go | 6 +- .../queryInverterModelList/struct.go | 16 +- .../queryInverterVersionList/data.go | 6 +- .../queryInverterVersionList/struct.go | 16 +- .../AppService/queryM2MCardInfoCMCC/data.go | 6 +- .../AppService/queryM2MCardInfoCMCC/struct.go | 16 +- .../queryM2MCardTermInfoCMCC/data.go | 6 +- .../queryM2MCardTermInfoCMCC/struct.go | 16 +- .../queryModelInfoByModelId/data.go | 6 +- .../queryModelInfoByModelId/struct.go | 16 +- .../AppService/queryMutiPointDataList/data.go | 43 +- .../queryMutiPointDataList/struct.go | 16 +- .../AppService/queryNoticeList/data.go | 6 +- .../AppService/queryNoticeList/struct.go | 16 +- .../queryNumberOfRenewalReminders/data.go | 6 +- .../queryNumberOfRenewalReminders/struct.go | 16 +- iSolarCloud/AppService/queryOperRules/data.go | 6 +- .../AppService/queryOperRules/struct.go | 16 +- iSolarCloud/AppService/queryOrderList/data.go | 6 +- .../AppService/queryOrderList/struct.go | 16 +- iSolarCloud/AppService/queryOrderStep/data.go | 6 +- .../AppService/queryOrderStep/struct.go | 16 +- .../queryOrgGenerationReport/data.go | 6 +- .../queryOrgGenerationReport/struct.go | 16 +- .../AppService/queryOrgInfoList/data.go | 6 +- .../AppService/queryOrgInfoList/struct.go | 16 +- .../queryOrgPowerElecPercent/data.go | 6 +- .../queryOrgPowerElecPercent/struct.go | 16 +- .../queryOrgPsCompensationRecordList/data.go | 6 +- .../struct.go | 16 +- .../AppService/queryParamSettingTask/data.go | 6 +- .../queryParamSettingTask/struct.go | 16 +- .../AppService/queryPersonalUnitList/data.go | 6 +- .../queryPersonalUnitList/struct.go | 16 +- .../AppService/queryPointDataTopOne/data.go | 6 +- .../AppService/queryPointDataTopOne/struct.go | 16 +- .../AppService/queryPowerStationInfo/data.go | 10 +- .../queryPowerStationInfo/struct.go | 16 +- .../queryPsAreaByUserIdAndAreaCode/data.go | 6 +- .../queryPsAreaByUserIdAndAreaCode/struct.go | 16 +- .../queryPsCompensationRecordList/data.go | 6 +- .../queryPsCompensationRecordList/struct.go | 16 +- .../AppService/queryPsDataByDate/data.go | 6 +- .../AppService/queryPsDataByDate/struct.go | 16 +- iSolarCloud/AppService/queryPsIdList/data.go | 8 +- .../AppService/queryPsIdList/struct.go | 16 +- .../queryPsListByUserIdAndAreaCode/data.go | 6 +- .../queryPsListByUserIdAndAreaCode/struct.go | 16 +- .../AppService/queryPsNameByPsId/data.go | 8 +- .../AppService/queryPsNameByPsId/struct.go | 16 +- .../AppService/queryPsPrByDate/data.go | 6 +- .../AppService/queryPsPrByDate/struct.go | 16 +- iSolarCloud/AppService/queryPsProfit/data.go | 10 +- .../AppService/queryPsProfit/struct.go | 16 +- .../data.go | 6 +- .../struct.go | 16 +- .../AppService/queryPsStructureList/data.go | 6 +- .../AppService/queryPsStructureList/struct.go | 16 +- .../queryPuuidsByCommandTotalId/data.go | 6 +- .../queryPuuidsByCommandTotalId/struct.go | 16 +- .../queryPuuidsByCommandTotalId2/data.go | 6 +- .../queryPuuidsByCommandTotalId2/struct.go | 16 +- .../AppService/queryRepairRuleList/data.go | 6 +- .../AppService/queryRepairRuleList/struct.go | 16 +- .../queryReportListForManagementPage/data.go | 6 +- .../struct.go | 16 +- iSolarCloud/AppService/queryReportMsg/data.go | 6 +- .../AppService/queryReportMsg/struct.go | 16 +- iSolarCloud/AppService/querySharingPs/data.go | 6 +- .../AppService/querySharingPs/struct.go | 16 +- .../AppService/querySysAdvancedParam/data.go | 6 +- .../querySysAdvancedParam/struct.go | 16 +- iSolarCloud/AppService/queryTimeBySN/data.go | 6 +- .../AppService/queryTimeBySN/struct.go | 16 +- .../AppService/queryTrafficByDateCTCC/data.go | 6 +- .../queryTrafficByDateCTCC/struct.go | 16 +- .../AppService/queryTrafficCTCC/data.go | 6 +- .../AppService/queryTrafficCTCC/struct.go | 16 +- iSolarCloud/AppService/queryUnitList/data.go | 50 +- .../AppService/queryUnitList/struct.go | 16 +- .../AppService/queryUnitUuidBytotalId/data.go | 6 +- .../queryUnitUuidBytotalId/struct.go | 16 +- .../AppService/queryUserBtnPri/data.go | 6 +- .../AppService/queryUserBtnPri/struct.go | 16 +- .../AppService/queryUserByUserIds/data.go | 6 +- .../AppService/queryUserByUserIds/struct.go | 16 +- .../queryUserExtensionAttribute/data.go | 6 +- .../queryUserExtensionAttribute/struct.go | 16 +- .../AppService/queryUserForStep/data.go | 6 +- .../AppService/queryUserForStep/struct.go | 16 +- iSolarCloud/AppService/queryUserList/data.go | 6 +- .../AppService/queryUserList/struct.go | 16 +- .../AppService/queryUserProcessPri/data.go | 6 +- .../AppService/queryUserProcessPri/struct.go | 16 +- .../AppService/queryUserWechatBindRel/data.go | 6 +- .../queryUserWechatBindRel/struct.go | 16 +- .../queryUuidByTotalIdAndUuid/data.go | 6 +- .../queryUuidByTotalIdAndUuid/struct.go | 16 +- .../AppService/rechargeOrderSetMeal/data.go | 6 +- .../AppService/rechargeOrderSetMeal/struct.go | 16 +- .../renewSendReportConfirmEmail/data.go | 6 +- .../renewSendReportConfirmEmail/struct.go | 16 +- iSolarCloud/AppService/reportList/data.go | 10 +- iSolarCloud/AppService/reportList/struct.go | 16 +- .../AppService/saveCustomerEmployee/data.go | 6 +- .../AppService/saveCustomerEmployee/struct.go | 16 +- iSolarCloud/AppService/saveDevSimList/data.go | 6 +- .../AppService/saveDevSimList/struct.go | 16 +- .../saveDeviceAccountBatchData/data.go | 6 +- .../saveDeviceAccountBatchData/struct.go | 16 +- .../saveEnviromentIncomeInfos/data.go | 6 +- .../saveEnviromentIncomeInfos/struct.go | 16 +- .../AppService/saveEnvironmentCurve/data.go | 6 +- .../AppService/saveEnvironmentCurve/struct.go | 16 +- .../AppService/saveFirmwareFile/data.go | 6 +- .../AppService/saveFirmwareFile/struct.go | 16 +- .../AppService/saveIncomeSettingInfos/data.go | 6 +- .../saveIncomeSettingInfos/struct.go | 16 +- .../saveOrUpdateGroupStringCheckRule/data.go | 6 +- .../struct.go | 16 +- iSolarCloud/AppService/saveParamModel/data.go | 6 +- .../AppService/saveParamModel/struct.go | 16 +- .../AppService/savePowerCharges/data.go | 6 +- .../AppService/savePowerCharges/struct.go | 16 +- .../AppService/savePowerDevicePoint/data.go | 6 +- .../AppService/savePowerDevicePoint/struct.go | 16 +- .../AppService/savePowerRobotInfo/data.go | 6 +- .../AppService/savePowerRobotInfo/struct.go | 16 +- .../savePowerRobotSweepAttr/data.go | 6 +- .../savePowerRobotSweepAttr/struct.go | 16 +- .../savePowerSettingCharges/data.go | 6 +- .../savePowerSettingCharges/struct.go | 16 +- .../AppService/savePowerSettingInfo/data.go | 6 +- .../AppService/savePowerSettingInfo/struct.go | 16 +- .../saveProductionBatchData/data.go | 6 +- .../saveProductionBatchData/struct.go | 16 +- .../AppService/saveRechargeOrderObj/data.go | 6 +- .../AppService/saveRechargeOrderObj/struct.go | 16 +- .../saveRechargeOrderOtherInfo/data.go | 6 +- .../saveRechargeOrderOtherInfo/struct.go | 16 +- iSolarCloud/AppService/saveRepair/data.go | 6 +- iSolarCloud/AppService/saveRepair/struct.go | 16 +- .../saveReportExportColumns/data.go | 6 +- .../saveReportExportColumns/struct.go | 16 +- iSolarCloud/AppService/saveSetParam/data.go | 6 +- iSolarCloud/AppService/saveSetParam/struct.go | 16 +- iSolarCloud/AppService/saveSysUserMsg/data.go | 6 +- .../AppService/saveSysUserMsg/struct.go | 16 +- iSolarCloud/AppService/saveTemplate/data.go | 6 +- iSolarCloud/AppService/saveTemplate/struct.go | 16 +- .../AppService/searchM2MMonthFlowCMCC/data.go | 6 +- .../searchM2MMonthFlowCMCC/struct.go | 16 +- .../selectSysTranslationNames/data.go | 6 +- .../selectSysTranslationNames/struct.go | 16 +- .../sendPsTimeZoneInstruction/data.go | 6 +- .../sendPsTimeZoneInstruction/struct.go | 16 +- .../setUpFormulaFaultAnalyse/data.go | 6 +- .../setUpFormulaFaultAnalyse/struct.go | 16 +- .../AppService/setUserGDPRAttrs/data.go | 6 +- .../AppService/setUserGDPRAttrs/struct.go | 16 +- iSolarCloud/AppService/settingNotice/data.go | 6 +- .../AppService/settingNotice/struct.go | 16 +- iSolarCloud/AppService/shareMyPs/data.go | 6 +- iSolarCloud/AppService/shareMyPs/struct.go | 16 +- iSolarCloud/AppService/sharePsBySN/data.go | 6 +- iSolarCloud/AppService/sharePsBySN/struct.go | 16 +- .../AppService/showInverterByUnit/data.go | 38 +- .../AppService/showInverterByUnit/struct.go | 16 +- .../AppService/showOnlineUsers/data.go | 6 +- .../AppService/showOnlineUsers/struct.go | 16 +- iSolarCloud/AppService/showWarning/data.go | 6 +- iSolarCloud/AppService/showWarning/struct.go | 16 +- iSolarCloud/AppService/snIsExist/data.go | 6 +- iSolarCloud/AppService/snIsExist/struct.go | 16 +- iSolarCloud/AppService/snsIsExist/data.go | 6 +- iSolarCloud/AppService/snsIsExist/struct.go | 16 +- .../AppService/speedyAddPowerStation/data.go | 6 +- .../speedyAddPowerStation/struct.go | 16 +- .../stationDeviceHistoryDataList/data.go | 6 +- .../stationDeviceHistoryDataList/struct.go | 16 +- .../AppService/stationUnitsList/data.go | 6 +- .../AppService/stationUnitsList/struct.go | 16 +- .../AppService/stationsDiscreteData/data.go | 6 +- .../AppService/stationsDiscreteData/struct.go | 16 +- .../AppService/stationsIncomeList/data.go | 6 +- .../AppService/stationsIncomeList/struct.go | 16 +- .../AppService/stationsPointReport/data.go | 6 +- .../AppService/stationsPointReport/struct.go | 16 +- .../AppService/stationsYearPlanReport/data.go | 6 +- .../stationsYearPlanReport/struct.go | 16 +- iSolarCloud/AppService/struct.go | 2 +- .../sureAndImportSelettlementData/data.go | 6 +- .../sureAndImportSelettlementData/struct.go | 16 +- .../AppService/sweepDevParamSet/data.go | 6 +- .../AppService/sweepDevParamSet/struct.go | 16 +- .../AppService/sweepDevRunControl/data.go | 6 +- .../AppService/sweepDevRunControl/struct.go | 16 +- .../AppService/sweepDevStrategyIssue/data.go | 6 +- .../sweepDevStrategyIssue/struct.go | 16 +- .../AppService/sysTimeZoneList/data.go | 6 +- .../AppService/sysTimeZoneList/struct.go | 16 +- iSolarCloud/AppService/unLockUser/data.go | 6 +- iSolarCloud/AppService/unLockUser/struct.go | 16 +- .../AppService/unlockChildAccount/data.go | 6 +- .../AppService/unlockChildAccount/struct.go | 16 +- .../updateCommunicationModuleState/data.go | 6 +- .../updateCommunicationModuleState/struct.go | 16 +- .../updateDevInstalledPower/data.go | 6 +- .../updateDevInstalledPower/struct.go | 16 +- iSolarCloud/AppService/updateFault/data.go | 6 +- iSolarCloud/AppService/updateFault/struct.go | 16 +- .../AppService/updateFaultData/data.go | 6 +- .../AppService/updateFaultData/struct.go | 16 +- .../updateFaultMsgByFaultCode/data.go | 6 +- .../updateFaultMsgByFaultCode/struct.go | 16 +- .../AppService/updateFaultStatus/data.go | 6 +- .../AppService/updateFaultStatus/struct.go | 16 +- .../updateHouseholdWorkOrder/data.go | 6 +- .../updateHouseholdWorkOrder/struct.go | 16 +- .../updateInverterSn2ModuleSn/data.go | 6 +- .../updateInverterSn2ModuleSn/struct.go | 16 +- .../updateOperateTicketAttachmentId/data.go | 6 +- .../updateOperateTicketAttachmentId/struct.go | 16 +- .../data.go | 6 +- .../struct.go | 16 +- .../AppService/updateOwnerFaultConfig/data.go | 6 +- .../updateOwnerFaultConfig/struct.go | 16 +- .../updateParamSettingSysMsg/data.go | 6 +- .../updateParamSettingSysMsg/struct.go | 16 +- .../updatePlatformLevelFaultLevel/data.go | 6 +- .../updatePlatformLevelFaultLevel/struct.go | 16 +- .../AppService/updatePowerDevicePoint/data.go | 6 +- .../updatePowerDevicePoint/struct.go | 16 +- .../AppService/updatePowerRobotInfo/data.go | 6 +- .../AppService/updatePowerRobotInfo/struct.go | 16 +- .../updatePowerRobotSweepAttr/data.go | 6 +- .../updatePowerRobotSweepAttr/struct.go | 16 +- .../updatePowerStationForHousehold/data.go | 6 +- .../updatePowerStationForHousehold/struct.go | 16 +- .../AppService/updatePowerStationInfo/data.go | 6 +- .../updatePowerStationInfo/struct.go | 16 +- .../AppService/updatePowerUserInfo/data.go | 6 +- .../AppService/updatePowerUserInfo/struct.go | 16 +- .../updateReportConfigByEmailAddr/data.go | 6 +- .../updateReportConfigByEmailAddr/struct.go | 16 +- .../AppService/updateShareAttr/data.go | 6 +- .../AppService/updateShareAttr/struct.go | 16 +- .../AppService/updateSnIsSureFlag/data.go | 6 +- .../AppService/updateSnIsSureFlag/struct.go | 16 +- .../AppService/updateStationPics/data.go | 6 +- .../AppService/updateStationPics/struct.go | 16 +- .../AppService/updateSysAdvancedParam/data.go | 6 +- .../updateSysAdvancedParam/struct.go | 16 +- .../AppService/updateSysOrgNew/data.go | 6 +- .../AppService/updateSysOrgNew/struct.go | 16 +- iSolarCloud/AppService/updateTemplate/data.go | 6 +- .../AppService/updateTemplate/struct.go | 16 +- .../AppService/updateUinfoNetEaseUser/data.go | 6 +- .../updateUinfoNetEaseUser/struct.go | 16 +- .../updateUserExtensionAttribute/data.go | 6 +- .../updateUserExtensionAttribute/struct.go | 16 +- .../AppService/updateUserLanguage/data.go | 6 +- .../AppService/updateUserLanguage/struct.go | 16 +- .../AppService/updateUserPosition/data.go | 6 +- .../AppService/updateUserPosition/struct.go | 16 +- .../AppService/updateUserUpOrg/data.go | 6 +- .../AppService/updateUserUpOrg/struct.go | 16 +- iSolarCloud/AppService/upgrade/data.go | 6 +- iSolarCloud/AppService/upgrade/struct.go | 16 +- iSolarCloud/AppService/upgrate/data.go | 6 +- iSolarCloud/AppService/upgrate/struct.go | 16 +- .../AppService/uploadFileToOss/data.go | 6 +- .../AppService/uploadFileToOss/struct.go | 16 +- .../AppService/userAgreeGdprProtocol/data.go | 6 +- .../userAgreeGdprProtocol/struct.go | 16 +- .../AppService/userInfoUniqueCheck/data.go | 6 +- .../AppService/userInfoUniqueCheck/struct.go | 16 +- .../AppService/userMailHasBound/data.go | 6 +- .../AppService/userMailHasBound/struct.go | 16 +- iSolarCloud/AppService/userRegister/data.go | 6 +- iSolarCloud/AppService/userRegister/struct.go | 16 +- .../accumEnergyPsKpiData/data.go | 6 +- .../accumEnergyPsKpiData/struct.go | 16 +- .../addBuildProgressing/data.go | 6 +- .../addBuildProgressing/struct.go | 16 +- .../deleteBuildProgressing/data.go | 6 +- .../deleteBuildProgressing/struct.go | 16 +- .../energyEquivalentHoursRanking/data.go | 6 +- .../energyEquivalentHoursRanking/struct.go | 16 +- .../energyGetRankBySortName/data.go | 6 +- .../energyGetRankBySortName/struct.go | 16 +- .../energyPovertyAlleviation/data.go | 6 +- .../energyPovertyAlleviation/struct.go | 16 +- .../energyPowerGenerationTrends/data.go | 6 +- .../energyPowerGenerationTrends/struct.go | 16 +- .../findSingleStationPR/data.go | 6 +- .../findSingleStationPR/struct.go | 16 +- .../getCapabilityTrend/data.go | 6 +- .../getCapabilityTrend/struct.go | 16 +- .../getKpiByUserIdAndAreaCode/data.go | 6 +- .../getKpiByUserIdAndAreaCode/struct.go | 16 +- .../MttvScreenService/getMapByUser/data.go | 6 +- .../MttvScreenService/getMapByUser/struct.go | 16 +- .../getOrgProByUserId/data.go | 6 +- .../getOrgProByUserId/struct.go | 16 +- .../getPlanAndActualPower/data.go | 6 +- .../getPlanAndActualPower/struct.go | 16 +- .../getPsDeviceListValue/data.go | 6 +- .../getPsDeviceListValue/struct.go | 16 +- .../getPsInfoWithJoinGridByPsId/data.go | 6 +- .../getPsInfoWithJoinGridByPsId/struct.go | 16 +- .../getPsKpiForHoursByPsId/data.go | 6 +- .../getPsKpiForHoursByPsId/struct.go | 16 +- .../getPsListByMapId/data.go | 6 +- .../getPsListByMapId/struct.go | 16 +- .../getPsListByUserIdAndAreaCode/data.go | 6 +- .../getPsListByUserIdAndAreaCode/struct.go | 16 +- .../getTheoryAndActualPower/data.go | 6 +- .../getTheoryAndActualPower/struct.go | 16 +- .../nextLevelOrgList/data.go | 6 +- .../nextLevelOrgList/struct.go | 16 +- .../nextLevelOrgStatisticalDataList/data.go | 6 +- .../nextLevelOrgStatisticalDataList/struct.go | 16 +- .../MttvScreenService/orgPowerReport/data.go | 6 +- .../orgPowerReport/struct.go | 16 +- .../queryBuildProgressing/data.go | 6 +- .../queryBuildProgressing/struct.go | 16 +- .../queryBuildProgressingNew/data.go | 6 +- .../queryBuildProgressingNew/struct.go | 16 +- .../queryBuildProgressingOne/data.go | 6 +- .../queryBuildProgressingOne/struct.go | 16 +- .../queryNearlyTwoYearsGenAndPrft/data.go | 6 +- .../queryNearlyTwoYearsGenAndPrft/struct.go | 16 +- .../querySaveEnergyPsSOH/data.go | 6 +- .../querySaveEnergyPsSOH/struct.go | 16 +- .../queryScreenUserMdIfo/data.go | 6 +- .../queryScreenUserMdIfo/struct.go | 16 +- .../saveOrUpdatePosition/data.go | 6 +- .../saveOrUpdatePosition/struct.go | 16 +- iSolarCloud/MttvScreenService/struct.go | 4 +- .../updateBuildProgressing/data.go | 6 +- .../updateBuildProgressing/struct.go | 16 +- iSolarCloud/NullArea/NullEndpoint/data.go | 6 +- iSolarCloud/NullArea/NullEndpoint/struct.go | 16 +- iSolarCloud/NullArea/struct.go | 2 +- .../queryPointDataTopOne/data.go | 6 +- .../queryPointDataTopOne/struct.go | 16 +- iSolarCloud/PowerPointService/struct.go | 4 +- iSolarCloud/WebAppService/addMaterial/data.go | 6 +- .../WebAppService/addMaterial/struct.go | 16 +- .../WebAppService/addOptTicketInfo/data.go | 6 +- .../WebAppService/addOptTicketInfo/struct.go | 16 +- .../WebAppService/addSpareParts/data.go | 6 +- .../WebAppService/addSpareParts/struct.go | 16 +- .../associateQueryFaultNames/data.go | 6 +- .../associateQueryFaultNames/struct.go | 16 +- .../WebAppService/auditPsDeviceCheck/data.go | 6 +- .../auditPsDeviceCheck/struct.go | 16 +- .../WebAppService/calcOutputRankByDay/data.go | 6 +- .../calcOutputRankByDay/struct.go | 16 +- .../WebAppService/changeReadStatus/data.go | 6 +- .../WebAppService/changeReadStatus/struct.go | 16 +- .../WebAppService/checkMaterialName/data.go | 6 +- .../WebAppService/checkMaterialName/struct.go | 16 +- .../WebAppService/confirmFault/data.go | 6 +- .../WebAppService/confirmFault/struct.go | 16 +- .../WebAppService/copeOperateTicket/data.go | 6 +- .../WebAppService/copeOperateTicket/struct.go | 16 +- .../copySecondTypeTicket/data.go | 6 +- .../copySecondTypeTicket/struct.go | 16 +- .../WebAppService/copyWorkTicket/data.go | 6 +- .../WebAppService/copyWorkTicket/struct.go | 16 +- .../WebAppService/delOptTicketInfo/data.go | 6 +- .../WebAppService/delOptTicketInfo/struct.go | 16 +- iSolarCloud/WebAppService/deleteDuty/data.go | 6 +- .../WebAppService/deleteDuty/struct.go | 16 +- .../WebAppService/deleteDutyMid/data.go | 6 +- .../WebAppService/deleteDutyMid/struct.go | 16 +- .../WebAppService/deleteMaterial/data.go | 6 +- .../WebAppService/deleteMaterial/struct.go | 16 +- .../deleteOrSharedSelfReport/data.go | 6 +- .../deleteOrSharedSelfReport/struct.go | 16 +- .../deleteSecondTypeTicket/data.go | 6 +- .../deleteSecondTypeTicket/struct.go | 16 +- .../deleteSparePartsById/data.go | 6 +- .../deleteSparePartsById/struct.go | 16 +- .../WebAppService/deleteWorkTicket/data.go | 6 +- .../WebAppService/deleteWorkTicket/struct.go | 16 +- .../WebAppService/deviceFactoryList/data.go | 6 +- .../WebAppService/deviceFactoryList/struct.go | 16 +- .../WebAppService/dispartDataPageList/data.go | 6 +- .../dispartDataPageList/struct.go | 16 +- iSolarCloud/WebAppService/executeTask/data.go | 6 +- .../WebAppService/executeTask/struct.go | 16 +- .../WebAppService/findCurrentTask/data.go | 6 +- .../WebAppService/findCurrentTask/struct.go | 16 +- .../findDeviceMessageByPskey/data.go | 6 +- .../findDeviceMessageByPskey/struct.go | 16 +- .../WebAppService/findFactoryMessage/data.go | 6 +- .../findFactoryMessage/struct.go | 16 +- .../WebAppService/findImgResources/data.go | 6 +- .../WebAppService/findImgResources/struct.go | 16 +- .../WebAppService/findMateiralSubType/data.go | 6 +- .../findMateiralSubType/struct.go | 16 +- .../WebAppService/findMaterialById/data.go | 6 +- .../WebAppService/findMaterialById/struct.go | 16 +- .../findMyDealedCurrentTask/data.go | 6 +- .../findMyDealedCurrentTask/struct.go | 16 +- .../findMyDealedImgResources/data.go | 6 +- .../findMyDealedImgResources/struct.go | 16 +- .../findSeriesInverterData/data.go | 6 +- .../findSeriesInverterData/struct.go | 16 +- iSolarCloud/WebAppService/findWebRole/data.go | 6 +- .../WebAppService/findWebRole/struct.go | 16 +- .../WebAppService/getAllPsFaultCount/data.go | 6 +- .../getAllPsFaultCount/struct.go | 16 +- .../getAllPsFaultCountByUserId/data.go | 6 +- .../getAllPsFaultCountByUserId/struct.go | 16 +- .../WebAppService/getAllPsList/data.go | 6 +- .../WebAppService/getAllPsList/struct.go | 16 +- iSolarCloud/WebAppService/getAllStore/data.go | 6 +- .../WebAppService/getAllStore/struct.go | 16 +- .../WebAppService/getBaseDeviceInfo/data.go | 6 +- .../WebAppService/getBaseDeviceInfo/struct.go | 16 +- iSolarCloud/WebAppService/getBoxData/data.go | 6 +- .../WebAppService/getBoxData/struct.go | 16 +- iSolarCloud/WebAppService/getCBoxTree/data.go | 6 +- .../WebAppService/getCBoxTree/struct.go | 16 +- .../WebAppService/getCheckDevTypeList/data.go | 6 +- .../getCheckDevTypeList/struct.go | 16 +- .../WebAppService/getCheckUserList/data.go | 6 +- .../WebAppService/getCheckUserList/struct.go | 16 +- iSolarCloud/WebAppService/getChildOrg/data.go | 6 +- .../WebAppService/getChildOrg/struct.go | 16 +- iSolarCloud/WebAppService/getCo/data.go | 6 +- iSolarCloud/WebAppService/getCo/struct.go | 16 +- .../WebAppService/getCodeTreeMap/data.go | 6 +- .../WebAppService/getCodeTreeMap/struct.go | 16 +- iSolarCloud/WebAppService/getDST/data.go | 6 +- iSolarCloud/WebAppService/getDST/struct.go | 16 +- .../WebAppService/getDataCounts/data.go | 6 +- .../WebAppService/getDataCounts/struct.go | 16 +- iSolarCloud/WebAppService/getDataInfo/data.go | 6 +- .../WebAppService/getDataInfo/struct.go | 16 +- iSolarCloud/WebAppService/getDevList/data.go | 6 +- .../WebAppService/getDevList/struct.go | 16 +- iSolarCloud/WebAppService/getDevName/data.go | 6 +- .../WebAppService/getDevName/struct.go | 16 +- .../WebAppService/getDevTypeList/data.go | 6 +- .../WebAppService/getDevTypeList/struct.go | 16 +- .../WebAppService/getDeviceDataList/data.go | 6 +- .../WebAppService/getDeviceDataList/struct.go | 16 +- .../WebAppService/getDeviceFactory/data.go | 6 +- .../WebAppService/getDeviceFactory/struct.go | 16 +- .../getDeviceInfoForCheck/data.go | 6 +- .../getDeviceInfoForCheck/struct.go | 16 +- .../WebAppService/getDevicePointAttrs/data.go | 6 +- .../getDevicePointAttrs/struct.go | 16 +- .../WebAppService/getDeviceTreeChild/data.go | 6 +- .../getDeviceTreeChild/struct.go | 16 +- .../WebAppService/getDeviceUuid/data.go | 6 +- .../WebAppService/getDeviceUuid/struct.go | 16 +- .../WebAppService/getDutyInfoById/data.go | 6 +- .../WebAppService/getDutyInfoById/struct.go | 16 +- .../WebAppService/getDutyOrgZtree/data.go | 6 +- .../WebAppService/getDutyOrgZtree/struct.go | 16 +- .../WebAppService/getElecEffectList/data.go | 6 +- .../WebAppService/getElecEffectList/struct.go | 16 +- .../WebAppService/getEnvironmentInfo/data.go | 6 +- .../getEnvironmentInfo/struct.go | 16 +- .../WebAppService/getFaultList/data.go | 6 +- .../WebAppService/getFaultList/struct.go | 16 +- .../WebAppService/getFaultName/data.go | 6 +- .../WebAppService/getFaultName/struct.go | 16 +- .../WebAppService/getFaultOrder/data.go | 6 +- .../WebAppService/getFaultOrder/struct.go | 16 +- .../getFaultOrderByOrderId/data.go | 6 +- .../getFaultOrderByOrderId/struct.go | 16 +- .../WebAppService/getFaultOrderList/data.go | 6 +- .../WebAppService/getFaultOrderList/struct.go | 16 +- .../getFaultOrderStepList/data.go | 6 +- .../getFaultOrderStepList/struct.go | 16 +- .../WebAppService/getHTRoleList/data.go | 6 +- .../WebAppService/getHTRoleList/struct.go | 16 +- .../WebAppService/getHistoryComments/data.go | 6 +- .../getHistoryComments/struct.go | 16 +- iSolarCloud/WebAppService/getInfo/data.go | 6 +- iSolarCloud/WebAppService/getInfo/struct.go | 16 +- .../getInverteTableListCount/data.go | 6 +- .../getInverteTableListCount/struct.go | 16 +- .../data.go | 6 +- .../struct.go | 16 +- .../getInverterDiscreteList/data.go | 6 +- .../getInverterDiscreteList/struct.go | 16 +- .../getInverterFactoryList/data.go | 6 +- .../getInverterFactoryList/struct.go | 16 +- .../WebAppService/getInverterInfo/data.go | 6 +- .../WebAppService/getInverterInfo/struct.go | 16 +- .../WebAppService/getLoadCurveList/data.go | 6 +- .../WebAppService/getLoadCurveList/struct.go | 16 +- .../getMqttConfigInfoByAppkey/data.go | 8 +- .../getMqttConfigInfoByAppkey/struct.go | 16 +- .../WebAppService/getMultiPowers/data.go | 6 +- .../WebAppService/getMultiPowers/struct.go | 16 +- .../WebAppService/getOndutyQuery/data.go | 6 +- .../WebAppService/getOndutyQuery/struct.go | 16 +- .../getOperateTicketUserList/data.go | 6 +- .../getOperateTicketUserList/struct.go | 16 +- .../getOptTicketsAttachments/data.go | 6 +- .../getOptTicketsAttachments/struct.go | 16 +- .../WebAppService/getOrderCount/data.go | 6 +- .../WebAppService/getOrderCount/struct.go | 16 +- .../WebAppService/getOrderData/data.go | 6 +- .../WebAppService/getOrderData/struct.go | 16 +- .../WebAppService/getOrderDataSize/data.go | 6 +- .../WebAppService/getOrderDataSize/struct.go | 16 +- .../getOrgPsEquipmentList/data.go | 6 +- .../getOrgPsEquipmentList/struct.go | 16 +- .../data.go | 6 +- .../struct.go | 16 +- .../WebAppService/getParentUidChain/data.go | 6 +- .../WebAppService/getParentUidChain/struct.go | 16 +- .../WebAppService/getPowerKwhkwpList/data.go | 6 +- .../getPowerKwhkwpList/struct.go | 16 +- .../WebAppService/getPowerPrList/data.go | 6 +- .../WebAppService/getPowerPrList/struct.go | 16 +- .../getPowerPredictionInfo/data.go | 6 +- .../getPowerPredictionInfo/struct.go | 16 +- .../getPowerTrendDayData/data.go | 6 +- .../getPowerTrendDayData/struct.go | 16 +- .../getPowerTrendMonthData/data.go | 6 +- .../getPowerTrendMonthData/struct.go | 16 +- .../getPowerTrendYearData/data.go | 6 +- .../getPowerTrendYearData/struct.go | 16 +- .../WebAppService/getPowerValue/data.go | 6 +- .../WebAppService/getPowerValue/struct.go | 16 +- iSolarCloud/WebAppService/getPsBlock/data.go | 6 +- .../WebAppService/getPsBlock/struct.go | 16 +- .../WebAppService/getPsBlockData/data.go | 6 +- .../WebAppService/getPsBlockData/struct.go | 16 +- .../WebAppService/getPsBlockTree/data.go | 6 +- .../WebAppService/getPsBlockTree/struct.go | 16 +- .../WebAppService/getPsBoxListCount/data.go | 6 +- .../WebAppService/getPsBoxListCount/struct.go | 16 +- .../WebAppService/getPsCBoxDetail/data.go | 6 +- .../WebAppService/getPsCBoxDetail/struct.go | 16 +- .../WebAppService/getPsContact/data.go | 6 +- .../WebAppService/getPsContact/struct.go | 16 +- .../WebAppService/getPsDataVal/data.go | 6 +- .../WebAppService/getPsDataVal/struct.go | 16 +- .../getPsDeviceCheckList/data.go | 6 +- .../getPsDeviceCheckList/struct.go | 16 +- .../getPsDeviceFaultList/data.go | 6 +- .../getPsDeviceFaultList/struct.go | 16 +- .../WebAppService/getPsFaultList/data.go | 6 +- .../WebAppService/getPsFaultList/struct.go | 16 +- .../WebAppService/getPsIdByUserId/data.go | 6 +- .../WebAppService/getPsIdByUserId/struct.go | 16 +- .../WebAppService/getPsIdState/data.go | 10 +- .../WebAppService/getPsIdState/struct.go | 16 +- iSolarCloud/WebAppService/getPsList/data.go | 6 +- iSolarCloud/WebAppService/getPsList/struct.go | 16 +- .../getPsListForWorkTicket/data.go | 6 +- .../getPsListForWorkTicket/struct.go | 16 +- .../WebAppService/getPsPictureMessage/data.go | 6 +- .../getPsPictureMessage/struct.go | 16 +- .../getPsTicketSizeAndClockNum/data.go | 6 +- .../getPsTicketSizeAndClockNum/struct.go | 16 +- iSolarCloud/WebAppService/getPsTree/data.go | 29 +- iSolarCloud/WebAppService/getPsTree/struct.go | 16 +- .../WebAppService/getPsTreeChild/data.go | 6 +- .../WebAppService/getPsTreeChild/struct.go | 16 +- .../WebAppService/getPsUserList/data.go | 6 +- .../WebAppService/getPsUserList/struct.go | 16 +- iSolarCloud/WebAppService/getPsValue/data.go | 6 +- .../WebAppService/getPsValue/struct.go | 16 +- .../WebAppService/getPscSeriseData/data.go | 6 +- .../WebAppService/getPscSeriseData/struct.go | 16 +- .../getReportInfoByReportId/data.go | 10 +- .../getReportInfoByReportId/struct.go | 16 +- .../WebAppService/getReportListByType/data.go | 8 +- .../getReportListByType/struct.go | 16 +- .../WebAppService/getReportPsTree/data.go | 8 +- .../WebAppService/getReportPsTree/struct.go | 16 +- iSolarCloud/WebAppService/getRoleList/data.go | 6 +- .../WebAppService/getRoleList/struct.go | 16 +- .../WebAppService/getSafeEffectList/data.go | 6 +- .../WebAppService/getSafeEffectList/struct.go | 16 +- .../getSecondTypeTicketList/data.go | 6 +- .../getSecondTypeTicketList/struct.go | 16 +- .../data.go | 6 +- .../struct.go | 16 +- .../WebAppService/getSelfReportPoint/data.go | 6 +- .../getSelfReportPoint/struct.go | 16 +- .../WebAppService/getSparePartsDetail/data.go | 6 +- .../getSparePartsDetail/struct.go | 16 +- .../WebAppService/getStatementList/data.go | 6 +- .../WebAppService/getStatementList/struct.go | 16 +- .../WebAppService/getStoreByStationId/data.go | 6 +- .../getStoreByStationId/struct.go | 16 +- .../WebAppService/getSysUserList/data.go | 6 +- .../WebAppService/getSysUserList/struct.go | 16 +- .../WebAppService/getTableList/data.go | 6 +- .../WebAppService/getTableList/struct.go | 16 +- iSolarCloud/WebAppService/getUserList/data.go | 6 +- .../WebAppService/getUserList/struct.go | 16 +- iSolarCloud/WebAppService/getWeather/data.go | 6 +- .../WebAppService/getWeather/struct.go | 16 +- .../WebAppService/getWorkTicketList/data.go | 6 +- .../WebAppService/getWorkTicketList/struct.go | 16 +- .../getWorkTicketListForTicketDetail/data.go | 6 +- .../struct.go | 16 +- .../getWorkTicketRunningCount/data.go | 6 +- .../getWorkTicketRunningCount/struct.go | 16 +- .../getWorkTicketUserList/data.go | 6 +- .../getWorkTicketUserList/struct.go | 16 +- .../WebAppService/getinverterType/data.go | 6 +- .../WebAppService/getinverterType/struct.go | 16 +- .../getreportPermissionByUser/data.go | 6 +- .../getreportPermissionByUser/struct.go | 16 +- iSolarCloud/WebAppService/handleValue/data.go | 6 +- .../WebAppService/handleValue/struct.go | 16 +- .../WebAppService/modifyDeviceInfo/data.go | 6 +- .../WebAppService/modifyDeviceInfo/struct.go | 16 +- .../operaStoreSpareParts/data.go | 6 +- .../operaStoreSpareParts/struct.go | 16 +- .../operateBillTransferToUser/data.go | 6 +- .../operateBillTransferToUser/struct.go | 16 +- .../queryAllStockInventory/data.go | 6 +- .../queryAllStockInventory/struct.go | 16 +- .../queryBatteryBoardsList/data.go | 10 +- .../queryBatteryBoardsList/struct.go | 16 +- .../queryBatteryBoardsPointsData/data.go | 6 +- .../queryBatteryBoardsPointsData/struct.go | 16 +- .../WebAppService/queryCodeByType/data.go | 6 +- .../WebAppService/queryCodeByType/struct.go | 16 +- .../WebAppService/queryDeviceInfoList/data.go | 6 +- .../queryDeviceInfoList/struct.go | 16 +- .../queryElectricityCalendarData/data.go | 6 +- .../queryElectricityCalendarData/struct.go | 16 +- .../WebAppService/queryFaultCodes/data.go | 8 +- .../WebAppService/queryFaultCodes/struct.go | 16 +- .../queryFaultLevelAndType/data.go | 6 +- .../queryFaultLevelAndType/struct.go | 16 +- .../WebAppService/queryFaultNames/data.go | 6 +- .../WebAppService/queryFaultNames/struct.go | 16 +- .../WebAppService/queryMaterialType/data.go | 6 +- .../WebAppService/queryMaterialType/struct.go | 16 +- .../WebAppService/queryNounAndKlgList/data.go | 6 +- .../queryNounAndKlgList/struct.go | 16 +- .../WebAppService/queryNounList/data.go | 8 +- .../WebAppService/queryNounList/struct.go | 16 +- .../WebAppService/queryOptTickctInfo/data.go | 6 +- .../queryOptTickctInfo/struct.go | 16 +- .../WebAppService/queryOrgIdByUser/data.go | 6 +- .../WebAppService/queryOrgIdByUser/struct.go | 16 +- .../WebAppService/queryPsCountryList/data.go | 6 +- .../queryPsCountryList/struct.go | 16 +- .../WebAppService/queryPsProvcnList/data.go | 6 +- .../WebAppService/queryPsProvcnList/struct.go | 16 +- .../WebAppService/queryPsTypeByPsId/data.go | 6 +- .../WebAppService/queryPsTypeByPsId/struct.go | 16 +- .../WebAppService/querySparePartsList/data.go | 6 +- .../querySparePartsList/struct.go | 16 +- .../WebAppService/queryStoreList/data.go | 6 +- .../WebAppService/queryStoreList/struct.go | 16 +- .../WebAppService/querySysTimezone/data.go | 6 +- .../WebAppService/querySysTimezone/struct.go | 16 +- .../queryUnInventorySpareList/data.go | 6 +- .../queryUnInventorySpareList/struct.go | 16 +- .../queryUserCurveTemplateData/data.go | 10 +- .../queryUserCurveTemplateData/struct.go | 16 +- .../WebAppService/renewOperation/data.go | 6 +- .../WebAppService/renewOperation/struct.go | 16 +- .../WebAppService/saveCustomReport/data.go | 6 +- .../WebAppService/saveCustomReport/struct.go | 16 +- .../WebAppService/saveDutyInfo/data.go | 6 +- .../WebAppService/saveDutyInfo/struct.go | 16 +- .../WebAppService/saveInventory/data.go | 6 +- .../WebAppService/saveInventory/struct.go | 16 +- .../WebAppService/saveMaterial/data.go | 6 +- .../WebAppService/saveMaterial/struct.go | 16 +- .../saveSecondTypeTicket/data.go | 6 +- .../saveSecondTypeTicket/struct.go | 16 +- .../WebAppService/saveSelfReportPoint/data.go | 6 +- .../saveSelfReportPoint/struct.go | 16 +- .../WebAppService/saveWorkTicket/data.go | 6 +- .../WebAppService/saveWorkTicket/struct.go | 16 +- .../secondTypeTicketFlowImplementStep/data.go | 6 +- .../struct.go | 16 +- .../secondTypeTicketFlowTransferStep/data.go | 6 +- .../struct.go | 16 +- .../secondTypeUpdateSign/data.go | 6 +- .../secondTypeUpdateSign/struct.go | 16 +- .../WebAppService/selectPowerPageList/data.go | 6 +- .../selectPowerPageList/struct.go | 16 +- .../WebAppService/showAnalyzefxDetail/data.go | 6 +- .../showAnalyzefxDetail/struct.go | 16 +- .../WebAppService/showFxReport/data.go | 6 +- .../WebAppService/showFxReport/struct.go | 16 +- .../WebAppService/showMaterNameList/data.go | 6 +- .../WebAppService/showMaterNameList/struct.go | 16 +- .../showMaterSubTypeList/data.go | 6 +- .../showMaterSubTypeList/struct.go | 16 +- iSolarCloud/WebAppService/showPSView/data.go | 10 +- .../WebAppService/showPSView/struct.go | 16 +- .../WebAppService/showTjReport/data.go | 6 +- .../WebAppService/showTjReport/struct.go | 16 +- iSolarCloud/WebAppService/struct.go | 4 +- .../WebAppService/templateLikesInfo/data.go | 6 +- .../WebAppService/templateLikesInfo/struct.go | 16 +- .../WebAppService/updOptTicketInfo/data.go | 6 +- .../WebAppService/updOptTicketInfo/struct.go | 16 +- .../updataWorkTicketAfterStartProcess/data.go | 6 +- .../struct.go | 16 +- .../updateBillTicketForTask/data.go | 6 +- .../updateBillTicketForTask/struct.go | 16 +- .../WebAppService/updateDutyInfo/data.go | 6 +- .../WebAppService/updateDutyInfo/struct.go | 16 +- .../updateKnowledgeBaseUseNumber/data.go | 6 +- .../updateKnowledgeBaseUseNumber/struct.go | 16 +- .../WebAppService/updateMaterial/data.go | 6 +- .../WebAppService/updateMaterial/struct.go | 16 +- .../WebAppService/updateSpareParts/data.go | 6 +- .../WebAppService/updateSpareParts/struct.go | 16 +- .../WebAppService/updateStopReason/data.go | 6 +- .../WebAppService/updateStopReason/struct.go | 16 +- .../WebAppService/updateTemplate/data.go | 6 +- .../WebAppService/updateTemplate/struct.go | 16 +- .../addPowerDeviceModel/data.go | 6 +- .../addPowerDeviceModel/struct.go | 16 +- .../addPowerPointManage/data.go | 6 +- .../addPowerPointManage/struct.go | 16 +- .../addSubTypeDevice/data.go | 6 +- .../addSubTypeDevice/struct.go | 16 +- .../batchAddDevicesPropertis/data.go | 6 +- .../batchAddDevicesPropertis/struct.go | 16 +- .../WebIscmAppService/batchDelDevice/data.go | 6 +- .../batchDelDevice/struct.go | 16 +- .../batchSavePowerDeviceTechnical/data.go | 6 +- .../batchSavePowerDeviceTechnical/struct.go | 16 +- .../checkDeviceModel/data.go | 6 +- .../checkDeviceModel/struct.go | 16 +- .../contactMessageOpera/data.go | 6 +- .../contactMessageOpera/struct.go | 16 +- .../WebIscmAppService/delDevice/data.go | 6 +- .../WebIscmAppService/delDevice/struct.go | 16 +- .../deleteDeviceFactory/data.go | 6 +- .../deleteDeviceFactory/struct.go | 16 +- .../deleteDeviceType/data.go | 6 +- .../deleteDeviceType/struct.go | 16 +- .../WebIscmAppService/deleteMenu/data.go | 6 +- .../WebIscmAppService/deleteMenu/struct.go | 16 +- .../WebIscmAppService/deleteOneNotice/data.go | 6 +- .../deleteOneNotice/struct.go | 16 +- .../deleteOrgNodeInfo/data.go | 6 +- .../deleteOrgNodeInfo/struct.go | 16 +- .../WebIscmAppService/deletePicture/data.go | 6 +- .../WebIscmAppService/deletePicture/struct.go | 16 +- .../WebIscmAppService/deletePointInfo/data.go | 6 +- .../deletePointInfo/struct.go | 16 +- .../deletePowerDeviceChannl/data.go | 6 +- .../deletePowerDeviceChannl/struct.go | 16 +- .../deletePowerDeviceModel/data.go | 6 +- .../deletePowerDeviceModel/struct.go | 16 +- .../deletePowerDeviceParameterPage/data.go | 6 +- .../deletePowerDeviceParameterPage/struct.go | 16 +- .../deletePowerDeviceSubType/data.go | 6 +- .../deletePowerDeviceSubType/struct.go | 16 +- .../deletePowerDeviceTechnical/data.go | 6 +- .../deletePowerDeviceTechnical/struct.go | 16 +- .../deletePowerStore/data.go | 6 +- .../deletePowerStore/struct.go | 16 +- .../deleteProcessDefinition/data.go | 6 +- .../deleteProcessDefinition/struct.go | 16 +- .../WebIscmAppService/deleteReport/data.go | 6 +- .../WebIscmAppService/deleteReport/struct.go | 16 +- .../WebIscmAppService/deleteUserNode/data.go | 6 +- .../deleteUserNode/struct.go | 16 +- .../WebIscmAppService/deployProcess/data.go | 6 +- .../WebIscmAppService/deployProcess/struct.go | 16 +- .../editProcessManageAction/data.go | 6 +- .../editProcessManageAction/struct.go | 16 +- .../findImageInputStreamString/data.go | 6 +- .../findImageInputStreamString/struct.go | 16 +- .../getAllDevTypeList/data.go | 6 +- .../getAllDevTypeList/struct.go | 16 +- .../getAllNodeByType/data.go | 6 +- .../getAllNodeByType/struct.go | 16 +- .../WebIscmAppService/getAuthKey/data.go | 6 +- .../WebIscmAppService/getAuthKey/struct.go | 16 +- .../WebIscmAppService/getAuthKeyList/data.go | 6 +- .../getAuthKeyList/struct.go | 16 +- .../WebIscmAppService/getCodeByType/data.go | 6 +- .../WebIscmAppService/getCodeByType/struct.go | 16 +- .../getContactMessage/data.go | 6 +- .../getContactMessage/struct.go | 16 +- .../WebIscmAppService/getCountryNew/data.go | 6 +- .../WebIscmAppService/getCountryNew/struct.go | 16 +- .../getDefinitionIdByKey/data.go | 6 +- .../getDefinitionIdByKey/struct.go | 16 +- .../getDeploymentList/data.go | 6 +- .../getDeploymentList/struct.go | 16 +- .../getDeviceFactoryListByIds/data.go | 6 +- .../getDeviceFactoryListByIds/struct.go | 16 +- .../WebIscmAppService/getDeviceModel/data.go | 6 +- .../getDeviceModel/struct.go | 16 +- .../WebIscmAppService/getDevicePro/data.go | 6 +- .../WebIscmAppService/getDevicePro/struct.go | 16 +- .../getDeviceSubType/data.go | 6 +- .../getDeviceSubType/struct.go | 16 +- .../getDeviceTechnical/data.go | 6 +- .../getDeviceTechnical/struct.go | 16 +- .../WebIscmAppService/getDeviceType/data.go | 6 +- .../WebIscmAppService/getDeviceType/struct.go | 16 +- .../getDeviceTypeInfoById/data.go | 6 +- .../getDeviceTypeInfoById/struct.go | 16 +- .../WebIscmAppService/getDutyUserList/data.go | 6 +- .../getDutyUserList/struct.go | 16 +- .../getFatherPrivileges/data.go | 6 +- .../getFatherPrivileges/struct.go | 16 +- .../getGroupManSettings/data.go | 6 +- .../getGroupManSettings/struct.go | 16 +- .../getGroupManSettingsMembers/data.go | 6 +- .../getGroupManSettingsMembers/struct.go | 16 +- .../getMaterialByListId/data.go | 6 +- .../getMaterialByListId/struct.go | 16 +- .../getMaterialByType/data.go | 6 +- .../getMaterialByType/struct.go | 16 +- .../WebIscmAppService/getMaterialList/data.go | 6 +- .../getMaterialList/struct.go | 16 +- .../getMaxDeviceIdByPsId/data.go | 10 +- .../getMaxDeviceIdByPsId/struct.go | 16 +- .../WebIscmAppService/getModelPoints/data.go | 6 +- .../getModelPoints/struct.go | 16 +- .../getMoneyUnitList/data.go | 6 +- .../getMoneyUnitList/struct.go | 16 +- .../WebIscmAppService/getNamecnNew/data.go | 6 +- .../WebIscmAppService/getNamecnNew/struct.go | 16 +- .../WebIscmAppService/getNationList/data.go | 6 +- .../WebIscmAppService/getNationList/struct.go | 16 +- .../getOperationRecord/data.go | 6 +- .../getOperationRecord/struct.go | 16 +- .../getOrgAndChildBasicInfoOptions/data.go | 6 +- .../getOrgAndChildBasicInfoOptions/struct.go | 16 +- .../getOrgAndStateAndCode/data.go | 6 +- .../getOrgAndStateAndCode/struct.go | 16 +- .../WebIscmAppService/getOrgForPs/data.go | 6 +- .../WebIscmAppService/getOrgForPs/struct.go | 16 +- .../WebIscmAppService/getOrgList/data.go | 6 +- .../WebIscmAppService/getOrgList/struct.go | 16 +- .../getOrgListForUser/data.go | 6 +- .../getOrgListForUser/struct.go | 16 +- .../WebIscmAppService/getOrgNodeInfo/data.go | 6 +- .../getOrgNodeInfo/struct.go | 16 +- .../getOrgStationList/data.go | 6 +- .../getOrgStationList/struct.go | 16 +- .../getOrgStationListByPage/data.go | 6 +- .../getOrgStationListByPage/struct.go | 16 +- .../WebIscmAppService/getOrgUserList/data.go | 6 +- .../getOrgUserList/struct.go | 16 +- .../getOrgUserMapData/data.go | 18 +- .../getOrgUserMapData/struct.go | 16 +- .../WebIscmAppService/getOrgZtree/data.go | 6 +- .../WebIscmAppService/getOrgZtree/struct.go | 16 +- .../getOrgZtree4User/data.go | 6 +- .../getOrgZtree4User/struct.go | 16 +- .../getOrgZtreeAsync/data.go | 6 +- .../getOrgZtreeAsync/struct.go | 16 +- .../getOrgZtreeForUser/data.go | 6 +- .../getOrgZtreeForUser/struct.go | 16 +- .../WebIscmAppService/getPictureList/data.go | 6 +- .../getPictureList/struct.go | 16 +- .../WebIscmAppService/getPointInfo/data.go | 8 +- .../WebIscmAppService/getPointInfo/struct.go | 16 +- .../getPointInfoPage/data.go | 6 +- .../getPointInfoPage/struct.go | 16 +- .../WebIscmAppService/getPowerDevice/data.go | 6 +- .../getPowerDevice/struct.go | 16 +- .../getPowerDeviceChannl/data.go | 6 +- .../getPowerDeviceChannl/struct.go | 16 +- .../getPowerDeviceFactory/data.go | 6 +- .../getPowerDeviceFactory/struct.go | 16 +- .../getPowerDeviceFactoryListCount/data.go | 6 +- .../getPowerDeviceFactoryListCount/struct.go | 16 +- .../getPowerDeviceInfo/data.go | 6 +- .../getPowerDeviceInfo/struct.go | 16 +- .../getPowerDeviceModelList/data.go | 6 +- .../getPowerDeviceModelList/struct.go | 16 +- .../getPowerDeviceModelTechList/data.go | 6 +- .../getPowerDeviceModelTechList/struct.go | 16 +- .../getPowerDeviceTypeList/data.go | 6 +- .../getPowerDeviceTypeList/struct.go | 16 +- .../getPowerPlanList/data.go | 6 +- .../getPowerPlanList/struct.go | 16 +- .../WebIscmAppService/getPowerStation/data.go | 6 +- .../getPowerStation/struct.go | 16 +- .../getPowerStationInfo/data.go | 18 +- .../getPowerStationInfo/struct.go | 16 +- .../getPowerStationList/data.go | 6 +- .../getPowerStationList/struct.go | 16 +- .../WebIscmAppService/getPowerStore/data.go | 6 +- .../WebIscmAppService/getPowerStore/struct.go | 16 +- .../WebIscmAppService/getProvcnNew/data.go | 6 +- .../WebIscmAppService/getProvcnNew/struct.go | 16 +- .../WebIscmAppService/getPsTreeMenu/data.go | 6 +- .../WebIscmAppService/getPsTreeMenu/struct.go | 16 +- .../getRoleByUserIds/data.go | 6 +- .../getRoleByUserIds/struct.go | 16 +- .../getRootOrgInfoByUserId/data.go | 6 +- .../getRootOrgInfoByUserId/struct.go | 16 +- .../getSettingUserMapData/data.go | 6 +- .../getSettingUserMapData/struct.go | 16 +- .../WebIscmAppService/getStateNew/data.go | 6 +- .../WebIscmAppService/getStateNew/struct.go | 16 +- .../getSubTypeDevice/data.go | 6 +- .../getSubTypeDevice/struct.go | 16 +- .../WebIscmAppService/getSysHomeList2/data.go | 6 +- .../getSysHomeList2/struct.go | 16 +- .../WebIscmAppService/getSysMenu/data.go | 6 +- .../WebIscmAppService/getSysMenu/struct.go | 16 +- .../WebIscmAppService/getSysOrgPro/data.go | 6 +- .../WebIscmAppService/getSysOrgPro/struct.go | 16 +- .../WebIscmAppService/getSysUser/data.go | 6 +- .../WebIscmAppService/getSysUser/struct.go | 16 +- .../getSystemOrgInfo/data.go | 6 +- .../getSystemOrgInfo/struct.go | 16 +- .../getSystemRoleInfo/data.go | 6 +- .../getSystemRoleInfo/struct.go | 16 +- .../getSystemRoleList2/data.go | 6 +- .../getSystemRoleList2/struct.go | 16 +- .../WebIscmAppService/getTownValueNew/data.go | 6 +- .../getTownValueNew/struct.go | 16 +- .../WebIscmAppService/getUserMenuLs/data.go | 6 +- .../WebIscmAppService/getUserMenuLs/struct.go | 16 +- .../WebIscmAppService/getUserOrgPage/data.go | 6 +- .../getUserOrgPage/struct.go | 16 +- .../WebIscmAppService/getVillageList/data.go | 4 +- .../getVillageList/struct.go | 16 +- .../getVillageListNew/data.go | 6 +- .../getVillageListNew/struct.go | 16 +- .../getZtreeAsyncSysMenu/data.go | 6 +- .../getZtreeAsyncSysMenu/struct.go | 16 +- .../getZtreeChildMenu/data.go | 6 +- .../getZtreeChildMenu/struct.go | 16 +- .../WebIscmAppService/getZtreeMenu/data.go | 6 +- .../WebIscmAppService/getZtreeMenu/struct.go | 16 +- .../WebIscmAppService/getZtreeSysMenu/data.go | 6 +- .../getZtreeSysMenu/struct.go | 16 +- .../getZtreeSysMenu2/data.go | 6 +- .../getZtreeSysMenu2/struct.go | 16 +- .../goToDevicePropertyPage/data.go | 6 +- .../goToDevicePropertyPage/struct.go | 16 +- .../WebIscmAppService/isCanAddUser/data.go | 6 +- .../WebIscmAppService/isCanAddUser/struct.go | 16 +- .../isHasIrradiationData/data.go | 6 +- .../isHasIrradiationData/struct.go | 16 +- .../WebIscmAppService/isHasPlan/data.go | 6 +- .../WebIscmAppService/isHasPlan/struct.go | 16 +- .../WebIscmAppService/loadDevice/data.go | 6 +- .../WebIscmAppService/loadDevice/struct.go | 16 +- .../WebIscmAppService/modelPointsPage/data.go | 12 +- .../modelPointsPage/struct.go | 16 +- .../WebIscmAppService/modifyDevice/data.go | 6 +- .../WebIscmAppService/modifyDevice/struct.go | 16 +- .../modifyPowerDeviceChannl/data.go | 6 +- .../modifyPowerDeviceChannl/struct.go | 16 +- .../WebIscmAppService/modifySysOrg/data.go | 6 +- .../WebIscmAppService/modifySysOrg/struct.go | 16 +- .../modifySystemMenu/data.go | 6 +- .../modifySystemMenu/struct.go | 16 +- .../modifySystemOrgNode/data.go | 6 +- .../modifySystemOrgNode/struct.go | 16 +- .../modifySystemRole/data.go | 6 +- .../modifySystemRole/struct.go | 16 +- .../modifySystemUser/data.go | 6 +- .../modifySystemUser/struct.go | 16 +- .../WebIscmAppService/publishNotice/data.go | 6 +- .../WebIscmAppService/publishNotice/struct.go | 16 +- .../WebIscmAppService/queryDeviceList/data.go | 8 +- .../queryDeviceList/struct.go | 16 +- .../WebIscmAppService/queryDutyType/data.go | 6 +- .../WebIscmAppService/queryDutyType/struct.go | 16 +- .../queryReportDataById/data.go | 6 +- .../queryReportDataById/struct.go | 16 +- .../WebIscmAppService/resetPasW/data.go | 6 +- .../WebIscmAppService/resetPasW/struct.go | 16 +- .../WebIscmAppService/saveAuthKey/data.go | 6 +- .../WebIscmAppService/saveAuthKey/struct.go | 16 +- .../WebIscmAppService/saveDevice/data.go | 6 +- .../WebIscmAppService/saveDevice/struct.go | 16 +- .../saveDeviceFactory/data.go | 6 +- .../saveDeviceFactory/struct.go | 16 +- .../WebIscmAppService/saveDeviceType/data.go | 6 +- .../saveDeviceType/struct.go | 16 +- .../saveIrradiationData/data.go | 6 +- .../saveIrradiationData/struct.go | 16 +- .../WebIscmAppService/saveModelPoints/data.go | 6 +- .../saveModelPoints/struct.go | 16 +- .../WebIscmAppService/saveNewNotice/data.go | 6 +- .../WebIscmAppService/saveNewNotice/struct.go | 16 +- .../saveOrUpdateReport/data.go | 6 +- .../saveOrUpdateReport/struct.go | 16 +- .../WebIscmAppService/saveOrgNode/data.go | 6 +- .../WebIscmAppService/saveOrgNode/struct.go | 16 +- .../WebIscmAppService/saveOrgUsers/data.go | 6 +- .../WebIscmAppService/saveOrgUsers/struct.go | 16 +- .../WebIscmAppService/savePicture/data.go | 6 +- .../WebIscmAppService/savePicture/struct.go | 16 +- .../WebIscmAppService/savePointManage/data.go | 6 +- .../savePointManage/struct.go | 16 +- .../savePowerDeviceChannl/data.go | 6 +- .../savePowerDeviceChannl/struct.go | 16 +- .../savePowerDeviceModel/data.go | 6 +- .../savePowerDeviceModel/struct.go | 16 +- .../savePowerDeviceParameterPage/data.go | 6 +- .../savePowerDeviceParameterPage/struct.go | 16 +- .../savePowerDeviceSubType/data.go | 6 +- .../savePowerDeviceSubType/struct.go | 16 +- .../savePowerDeviceTechnical/data.go | 6 +- .../savePowerDeviceTechnical/struct.go | 16 +- .../WebIscmAppService/savePowerPlan/data.go | 6 +- .../WebIscmAppService/savePowerPlan/struct.go | 16 +- .../savePowerStationByPowerStore/data.go | 6 +- .../savePowerStationByPowerStore/struct.go | 16 +- .../WebIscmAppService/savePowerStore/data.go | 6 +- .../savePowerStore/struct.go | 16 +- .../WebIscmAppService/savePsOrg/data.go | 6 +- .../WebIscmAppService/savePsOrg/struct.go | 16 +- .../WebIscmAppService/saveRelDevice/data.go | 6 +- .../WebIscmAppService/saveRelDevice/struct.go | 16 +- .../WebIscmAppService/saveRoleAssign/data.go | 6 +- .../saveRoleAssign/struct.go | 16 +- .../WebIscmAppService/saveSysMenu/data.go | 6 +- .../WebIscmAppService/saveSysMenu/struct.go | 16 +- .../WebIscmAppService/saveSysOrg/data.go | 6 +- .../WebIscmAppService/saveSysOrg/struct.go | 16 +- .../WebIscmAppService/saveSysRole/data.go | 6 +- .../WebIscmAppService/saveSysRole/struct.go | 16 +- .../WebIscmAppService/saveSysUser/data.go | 6 +- .../WebIscmAppService/saveSysUser/struct.go | 16 +- .../WebIscmAppService/saveUserNode/data.go | 6 +- .../WebIscmAppService/saveUserNode/struct.go | 16 +- .../WebIscmAppService/saveUserRole/data.go | 6 +- .../WebIscmAppService/saveUserRole/struct.go | 16 +- .../searchIrradiationData/data.go | 6 +- .../searchIrradiationData/struct.go | 16 +- .../searchTechnicalNums/data.go | 6 +- .../searchTechnicalNums/struct.go | 16 +- .../selectDeviceTypeByPsId/data.go | 6 +- .../selectDeviceTypeByPsId/struct.go | 16 +- .../selectPowerDeviceTechnicals/data.go | 6 +- .../selectPowerDeviceTechnicals/struct.go | 16 +- .../selectPowerDeviceType/data.go | 6 +- .../selectPowerDeviceType/struct.go | 16 +- .../setupUserRole4AddUser/data.go | 6 +- .../setupUserRole4AddUser/struct.go | 16 +- .../WebIscmAppService/startWorkFlow/data.go | 6 +- .../WebIscmAppService/startWorkFlow/struct.go | 16 +- iSolarCloud/WebIscmAppService/struct.go | 4 +- .../WebIscmAppService/updateDevice/data.go | 6 +- .../WebIscmAppService/updateDevice/struct.go | 16 +- .../updateDeviceType/data.go | 6 +- .../updateDeviceType/struct.go | 16 +- .../updateFaultLevel/data.go | 6 +- .../updateFaultLevel/struct.go | 16 +- .../WebIscmAppService/updateNotice/data.go | 6 +- .../WebIscmAppService/updateNotice/struct.go | 16 +- .../WebIscmAppService/updatePointInfo/data.go | 6 +- .../updatePointInfo/struct.go | 16 +- .../updatePowerDeviceModel/data.go | 6 +- .../updatePowerDeviceModel/struct.go | 16 +- .../updatePowerDeviceParameterPage/data.go | 6 +- .../updatePowerDeviceParameterPage/struct.go | 16 +- .../updatePowerDeviceSubType/data.go | 6 +- .../updatePowerDeviceSubType/struct.go | 16 +- .../updatePowerDeviceTechnical/data.go | 6 +- .../updatePowerDeviceTechnical/struct.go | 16 +- .../updateProcessManage/data.go | 6 +- .../updateProcessManage/struct.go | 16 +- .../WebIscmAppService/updateSysOrgPro/data.go | 6 +- .../updateSysOrgPro/struct.go | 16 +- .../updateSysRoleValidFlag/data.go | 6 +- .../updateSysRoleValidFlag/struct.go | 16 +- .../updateUserValidFlag/data.go | 6 +- .../updateUserValidFlag/struct.go | 16 +- .../WebIscmAppService/updateValidFlag/data.go | 6 +- .../updateValidFlag/struct.go | 16 +- .../WebIscmAppService/viewDeviceModel/data.go | 8 +- .../viewDeviceModel/struct.go | 16 +- .../viewDeviceParameter/data.go | 33 +- .../viewDeviceParameter/struct.go | 16 +- .../workFlowImplementStep/data.go | 6 +- .../workFlowImplementStep/struct.go | 16 +- .../WebIscmAppService/workFlowIsStart/data.go | 6 +- .../workFlowIsStart/struct.go | 16 +- .../workFlowTransferStep/data.go | 6 +- .../workFlowTransferStep/struct.go | 16 +- iSolarCloud/z | 8 - mmHa/sensors.go | 4 + mmHa/struct.go | 8 +- 1980 files changed, 13382 insertions(+), 11671 deletions(-) delete mode 100755 iSolarCloud/z diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 5ae98dcd7..c3a9eb803 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -5,74 +5,2037 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + - { + "keyToString": { + "DefaultGoTemplateProperty": "Go File", + "RunOnceActivity.go.format.on.save.advertiser.fired": "true", + "RunOnceActivity.go.formatter.settings.were.checked": "true", + "RunOnceActivity.go.migrated.go.modules.settings": "true", + "RunOnceActivity.go.modules.go.list.on.any.changes.was.set": "true", + "RunOnceActivity.go.watchers.conflict.with.on.save.actions.check.performed": "true", + "WebServerToolWindowFactoryState": "false", + "configurable..is.expanded": "false", + "configurable.GoLibrariesConfigurable.is.expanded": "true", + "go.import.settings.migrated": "true", + "last_opened_file_path": "/Users/mick", + "node.js.detected.package.eslint": "true", + "node.js.selected.package.eslint": "(autodetect)", + "nodejs_package_manager_path": "npm", + "settings.editor.selected.configurable": "editor.preferences.gutterIcons" } -}]]> +} + - - + @@ -169,73 +2132,73 @@ - file://$PROJECT_DIR$/iSolarCloud/api/output/struct_csv.go + file://$PROJECT_DIR$/iSolarCloud/api/GoStruct/output/struct_csv.go 217 - file://$PROJECT_DIR$/iSolarCloud/api/output/struct_csv.go + file://$PROJECT_DIR$/iSolarCloud/api/GoStruct/output/struct_csv.go 165 file://$PROJECT_DIR$/iSolarCloud/api/file.go - 41 + 42 file://$PROJECT_DIR$/iSolarCloud/api/file.go - 55 + 56 file://$PROJECT_DIR$/iSolarCloud/api/file.go - 120 + 121 file://$PROJECT_DIR$/iSolarCloud/AppService/queryDeviceList/data.go - 184 + 185 - file://$PROJECT_DIR$/iSolarCloud/api/output/struct_graph.go - 257 + file://$PROJECT_DIR$/iSolarCloud/api/GoStruct/output/struct_graph.go + 265 - file://$PROJECT_DIR$/iSolarCloud/api/output/struct_graph.go - 652 + file://$PROJECT_DIR$/iSolarCloud/api/GoStruct/output/struct_graph.go + 660 - file://$PROJECT_DIR$/iSolarCloud/api/output/struct_graph.go - 481 + file://$PROJECT_DIR$/iSolarCloud/api/GoStruct/output/struct_graph.go + 489 file://$PROJECT_DIR$/cmd/cmd_mqtt.go - 313 + 312 file://$PROJECT_DIR$/cmd/cmd_mqtt.go - 312 + 311 file://$PROJECT_DIR$/iSolarCloud/highlevel.go - 357 + 359 file://$PROJECT_DIR$/iSolarCloud/highlevel.go - 348 + 350 file://$PROJECT_DIR$/iSolarCloud/highlevel.go - 601 + 595 @@ -245,7 +2208,7 @@ file://$PROJECT_DIR$/iSolarCloud/highlevel.go - 201 + 203 @@ -255,102 +2218,92 @@ file://$PROJECT_DIR$/iSolarCloud/highlevel.go - 154 + 158 file://$PROJECT_DIR$/iSolarCloud/highlevel.go - 681 - - - file://$PROJECT_DIR$/iSolarCloud/highlevel.go - 670 + 671 file://$PROJECT_DIR$/iSolarCloud/highlevel.go - 702 + 703 file://$PROJECT_DIR$/iSolarCloud/highlevel.go - 463 + 465 file://$PROJECT_DIR$/iSolarCloud/highlevel.go - 468 + 470 file://$PROJECT_DIR$/iSolarCloud/highlevel.go - 406 + 408 file://$PROJECT_DIR$/iSolarCloud/highlevel.go - 938 + 939 file://$PROJECT_DIR$/iSolarCloud/highlevel.go - 935 + 936 file://$PROJECT_DIR$/iSolarCloud/highlevel.go - 903 + 904 file://$PROJECT_DIR$/iSolarCloud/highlevel.go - 884 + 885 file://$PROJECT_DIR$/iSolarCloud/highlevel.go - 325 + 327 file://$PROJECT_DIR$/cmd/cmd_mqtt.go - 369 + 382 - file://$PROJECT_DIR$/cmd/cmd_mqtt.go - 355 - - - file://$PROJECT_DIR$/iSolarCloud/api/valueTypes/types.go + file://$PROJECT_DIR$/iSolarCloud/api/GoStruct/valueTypes/types.go 364 file://$PROJECT_DIR$/iSolarCloud/AppService/getPsDetailWithPsType/data.go - 218 + 219 file://$PROJECT_DIR$/iSolarCloud/AppService/getPsDetailWithPsType/data.go - 174 + 175 file://$PROJECT_DIR$/iSolarCloud/AppService/getPsDetailWithPsType/data.go - 180 + 181 file://$PROJECT_DIR$/iSolarCloud/api/file.go - 18 + 19 file://$PROJECT_DIR$/iSolarCloud/api/file.go - 16 + 17 @@ -360,32 +2313,32 @@ file://$PROJECT_DIR$/iSolarCloud/struct.go - 151 + 155 file://$PROJECT_DIR$/iSolarCloud/struct.go - 140 + 144 file://$PROJECT_DIR$/iSolarCloud/struct.go - 106 + 110 file://$PROJECT_DIR$/iSolarCloud/AppService/queryDeviceList/data.go - 242 + 243 file://$PROJECT_DIR$/iSolarCloud/AppService/queryDeviceList/data.go - 331 + 332 file://$PROJECT_DIR$/iSolarCloud/AppService/queryMutiPointDataList/data.go - 230 + 235 @@ -400,7 +2353,7 @@ file://$PROJECT_DIR$/iSolarCloud/AppService/queryMutiPointDataList/data.go - 239 + 244 @@ -423,11 +2376,6 @@ 35 - - file://$PROJECT_DIR$/iSolarCloud/WebAppService/queryUserCurveTemplateData/data.go - 208 - file://$PROJECT_DIR$/iSolarCloud/highlevel.go 50 @@ -445,83 +2393,148 @@ file://$PROJECT_DIR$/iSolarCloud/AppService/getDeviceList/data.go - 268 + 283 - file://$PROJECT_DIR$/iSolarCloud/api/output/struct_table.go - 182 - - file://$PROJECT_DIR$/iSolarCloud/api/output/struct_table.go - 185 - + + file://$PROJECT_DIR$/iSolarCloud/api/GoStruct/output/struct_table.go + 50 + file://$PROJECT_DIR$/iSolarCloud/api/struct_data.go - 149 - - - file://$PROJECT_DIR$/iSolarCloud/api/struct_data.go - 247 - - - file://$PROJECT_DIR$/iSolarCloud/api/struct_data.go - 179 - file://$PROJECT_DIR$/iSolarCloud/data.go - 269 - file://$PROJECT_DIR$/iSolarCloud/data.go - 89 - - file://$PROJECT_DIR$/iSolarCloud/api/apiReflect/struct_data.go - 768 - - file://$PROJECT_DIR$/iSolarCloud/api/apiReflect/struct_data.go - 723 - - file://$PROJECT_DIR$/iSolarCloud/api/apiReflect/struct_data.go - 774 - - file://$PROJECT_DIR$/iSolarCloud/api/apiReflect/struct_data.go - 800 - - file://$PROJECT_DIR$/iSolarCloud/api/apiReflect/struct_data.go - 329 - + + file://$PROJECT_DIR$/iSolarCloud/AppService/getAllPowerRobotViewInfoByPsId/data.go + 40 + + + file://$PROJECT_DIR$/iSolarCloud/api/GoStruct/struct_table.go + 162 + + + file://$PROJECT_DIR$/iSolarCloud/api/GoStruct/struct_table.go + 106 + file://$PROJECT_DIR$/iSolarCloud/api/struct_data.go - 240 - - file://$PROJECT_DIR$/iSolarCloud/api/apiReflect/struct_data.go - 837 - - file://$PROJECT_DIR$/iSolarCloud/data.go - 49 - + + file://$PROJECT_DIR$/iSolarCloud/api/GoStruct/struct_data.go + 299 + + + file://$PROJECT_DIR$/iSolarCloud/api/GoStruct/struct_data.go + 270 + + + file://$PROJECT_DIR$/iSolarCloud/api/GoStruct/struct_data.go + 302 + + + file://$PROJECT_DIR$/iSolarCloud/api/GoStruct/struct_data.go + 305 + + + file://$PROJECT_DIR$/iSolarCloud/api/GoStruct/struct_data.go + 308 + + + file://$PROJECT_DIR$/iSolarCloud/api/GoStruct/struct_data.go + 311 + + + file://$PROJECT_DIR$/iSolarCloud/api/GoStruct/struct_reflect.go + 345 + + + file://$PROJECT_DIR$/iSolarCloud/api/GoStruct/struct_reflect.go + 392 + + + file://$PROJECT_DIR$/iSolarCloud/api/GoStruct/struct_reflect.go + 377 + + + file://$PROJECT_DIR$/iSolarCloud/api/GoStruct/struct_reflect.go + 360 + + + file://$PROJECT_DIR$/iSolarCloud/api/struct_data.go + 128 + diff --git a/cmd/cmd_api.go b/cmd/cmd_api.go index 3de2b3a57..e99c038b4 100644 --- a/cmd/cmd_api.go +++ b/cmd/cmd_api.go @@ -4,7 +4,7 @@ import ( "GoSungrow/Only" "GoSungrow/iSolarCloud" "GoSungrow/iSolarCloud/AppService/login" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" "fmt" "github.com/MickMake/GoUnify/cmdConfig" "github.com/MickMake/GoUnify/cmdHelp" diff --git a/cmd/cmd_data.go b/cmd/cmd_data.go index d0b740785..21438e7f6 100644 --- a/cmd/cmd_data.go +++ b/cmd/cmd_data.go @@ -2,7 +2,8 @@ package cmd import ( "GoSungrow/Only" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud" + "GoSungrow/iSolarCloud/api/GoStruct/output" "fmt" "github.com/MickMake/GoUnify/cmdConfig" "github.com/MickMake/GoUnify/cmdHelp" @@ -227,7 +228,23 @@ func (c *CmdData) GetEndpoints(cmd *cobra.Command, args []string) error { for range Only.Once { cmds.Api.SunGrow.SetOutputType(cmd.Name()) args = cmdConfig.FillArray(2, args) - c.Error = cmds.Api.SunGrow.GetEndpoints(args[0], args[1:]...) + eps := iSolarCloud.SplitArg(args[0]) + + data := cmds.Api.SunGrow.NewSunGrowData() + data.SetOutput(cmd.Name()) + data.SetSaveAsFile(cmds.Api.SaveFile) + data.SetEndpoints(eps...) + data.SetArgs(args[1:]...) + + c.Error = data.GetData() + if c.Error != nil { + break + } + + c.Error = data.GetOutput() + if c.Error != nil { + break + } } return c.Error diff --git a/cmd/cmd_info.go b/cmd/cmd_info.go index 9487bbe07..c04cae258 100644 --- a/cmd/cmd_info.go +++ b/cmd/cmd_info.go @@ -2,7 +2,7 @@ package cmd import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" "fmt" "github.com/MickMake/GoUnify/Only" "github.com/MickMake/GoUnify/cmdConfig" @@ -368,11 +368,11 @@ func (c *CmdInfo) AttachCmdInfoDevices(cmd *cobra.Command) *cobra.Command { }, RunE: func(cmd *cobra.Command, args []string) error { _ = cmds.SetOutputType(cmd) - pids, err := cmds.Api.SunGrow.StringToPids(args...) - if err != nil { - return err - } - return cmds.Api.SunGrow.GetDeviceList(pids...) + // pids, err := cmds.Api.SunGrow.StringToPids(args...) + // if err != nil { + // return err + // } + return cmds.Api.SunGrow.GetDeviceList(args...) }, Args: cobra.MinimumNArgs(0), } @@ -677,11 +677,11 @@ func (c *CmdInfo) AttachCmdInfoPsDetails(cmd *cobra.Command) *cobra.Command { }, RunE: func(cmd *cobra.Command, args []string) error { _ = cmds.SetOutputType(cmd) - pids, err := cmds.Api.SunGrow.StringToPids(args...) - if err != nil { - return err - } - return cmds.Api.SunGrow.CmdDataPsDetail(pids...) + // pids, err := cmds.Api.SunGrow.StringToPids(args...) + // if err != nil { + // return err + // } + return cmds.Api.SunGrow.CmdDataPsDetail(args...) }, Args: cobra.MinimumNArgs(0), } diff --git a/cmd/cmd_mqtt.go b/cmd/cmd_mqtt.go index 50eb3a2ea..7acba54cf 100644 --- a/cmd/cmd_mqtt.go +++ b/cmd/cmd_mqtt.go @@ -2,7 +2,6 @@ package cmd import ( "GoSungrow/Only" - "GoSungrow/iSolarCloud" "GoSungrow/iSolarCloud/api" "GoSungrow/mmHa" "errors" @@ -342,25 +341,39 @@ func (ca *Cmds) MqttCron() error { newDay = true } - var data iSolarCloud.SunGrowData - data.New(ca.Api.SunGrow) + data := ca.Api.SunGrow.NewSunGrowData() + data.SetPsIds() // All := []string{ "queryDeviceList", "getPsList", "getPsDetailWithPsType", "getPsDetail" } All := []string{ "getPsDetail" } - for psId, ok := range ca.Mqtt.Mqtt.SungrowPsIds { - if !ok { - continue - } + data.SetEndpoints(All...) + ca.Error = data.GetData() + if ca.Error != nil { + break + } + data.GetData() - for _, endpoint := range All { - response := data.GetByEndPointName(endpoint, iSolarCloud.SunGrowDataRequest{ PsId: &psId }) - ca.Error = ca.Update(endpoint, response.Data, newDay) - if ca.Error != nil { - break - } + for _, result := range data.GetResults() { + ca.Error = ca.Update(string(result.EndPointName), result.Response.Data, newDay) + if ca.Error != nil { + break } } + // for psId, ok := range ca.Mqtt.Mqtt.SungrowPsIds { + // if !ok { + // continue + // } + // + // for _, endpoint := range All { + // response := data.GetByEndPointName(endpoint, iSolarCloud.SunGrowDataRequest{ PsId: &psId }) + // ca.Error = ca.Update(endpoint, response.Data, newDay) + // if ca.Error != nil { + // break + // } + // } + // } + ca.Mqtt.Mqtt.LastRefresh = time.Now() } diff --git a/go.mod b/go.mod index 7fc517517..9bb527b00 100644 --- a/go.mod +++ b/go.mod @@ -37,86 +37,64 @@ replace github.com/MickMake/GoUnify/cmdExec => ../../GoUnify/cmdExec replace github.com/MickMake/GoUnify/cmdPath => ../../GoUnify/cmdPath require ( + github.com/MickMake/GoUnify/Only v0.0.0-00010101000000-000000000000 github.com/MickMake/GoUnify/Unify v0.0.0-00010101000000-000000000000 github.com/MickMake/GoUnify/cmdConfig v0.0.0-00010101000000-000000000000 github.com/MickMake/GoUnify/cmdHelp v0.0.0-00010101000000-000000000000 github.com/MickMake/GoUnify/cmdLog v0.0.0-00010101000000-000000000000 - github.com/acarl005/textcol v0.0.0 - github.com/davecgh/go-spew v1.1.1 + github.com/MickMake/GoUnify/cmdPath v0.0.0-00010101000000-000000000000 + github.com/agrison/go-tablib v0.0.0-20160310143025-4930582c22ee github.com/eclipse/paho.mqtt.golang v1.4.1 github.com/go-co-op/gocron v1.17.0 - github.com/go-git/go-billy/v5 v5.3.1 - github.com/go-git/go-git/v5 v5.4.2 - github.com/mattn/go-colorable v0.1.13 github.com/olekukonko/tablewriter v0.0.5 github.com/spf13/cobra v1.5.0 github.com/spf13/viper v1.13.0 github.com/wcharczuk/go-chart/v2 v2.1.0 - github.com/willf/pad v0.0.0-20200313202418-172aa767f2a4 go.pennock.tech/tabular v1.1.3 - golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 - golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec - google.golang.org/api v0.98.0 - gopkg.in/alecthomas/kingpin.v2 v2.2.6 ) require ( - cloud.google.com/go/compute v1.7.0 // indirect github.com/MichaelMure/go-term-markdown v0.1.4 // indirect github.com/MichaelMure/go-term-text v0.3.1 // indirect - github.com/MickMake/GoUnify/Only v0.0.0-00010101000000-000000000000 // indirect github.com/MickMake/GoUnify/cmdCron v0.0.0-00010101000000-000000000000 // indirect github.com/MickMake/GoUnify/cmdDaemon v0.0.0-00010101000000-000000000000 // indirect github.com/MickMake/GoUnify/cmdExec v0.0.0-00010101000000-000000000000 // indirect - github.com/MickMake/GoUnify/cmdPath v0.0.0-00010101000000-000000000000 // indirect github.com/MickMake/GoUnify/cmdShell v0.0.0-00010101000000-000000000000 // indirect github.com/MickMake/GoUnify/cmdVersion v0.0.0-00010101000000-000000000000 // indirect - github.com/Microsoft/go-winio v0.4.16 // indirect - github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 // indirect github.com/abiosoft/ishell/v2 v2.0.2 // indirect github.com/abiosoft/readline v0.0.0-20180607040430-155bce2042db // indirect - github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d // indirect - github.com/acomagu/bufpipe v1.0.3 // indirect + github.com/agrison/mxj v0.0.0-20160310142625-1269f8afb3b4 // indirect github.com/alecthomas/chroma v0.7.1 // indirect - github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect - github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect github.com/blang/semver v3.5.1+incompatible // indirect + github.com/bndr/gotabulate v1.1.2 // indirect github.com/briandowns/spinner v1.19.0 // indirect - github.com/d4l3k/go-pcre v0.0.0-20160928060324-cf2c5e16ca45 // indirect + github.com/clbanning/mxj v1.8.4 // indirect github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 // indirect github.com/disintegration/imaging v1.6.2 // indirect github.com/dlclark/regexp2 v1.1.6 // indirect github.com/eliukblau/pixterm/pkg/ansimage v0.0.0-20191210081756-9fb6cf8c2f75 // indirect - github.com/emirpasic/gods v1.12.0 // indirect github.com/fatih/color v1.13.0 // indirect + github.com/fatih/structs v1.1.0 // indirect github.com/flynn-archive/go-shlex v0.0.0-20150515145356-3f9db97f8568 // indirect github.com/fsnotify/fsnotify v1.5.4 // indirect - github.com/go-git/gcfg v1.5.0 // indirect github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect - github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/gomarkdown/markdown v0.0.0-20191123064959-2c17d62f5098 // indirect github.com/google/go-github/v30 v30.1.0 // indirect github.com/google/go-querystring v1.0.0 // indirect - github.com/google/uuid v1.3.0 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect - github.com/googleapis/gax-go/v2 v2.4.0 // indirect github.com/gorilla/websocket v1.4.2 // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/imdario/mergo v0.3.12 // indirect github.com/inconshreveable/go-update v0.0.0-20160112193335-8152e7eb6ccf // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect github.com/ivanpirog/coloredcobra v1.0.1 // indirect - github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 // indirect - github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 // indirect github.com/kyokomi/emoji/v2 v2.2.8 // indirect github.com/logrusorgru/aurora v2.0.3+incompatible // indirect github.com/lucasb-eyer/go-colorful v1.0.3 // indirect github.com/magiconair/properties v1.8.6 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.16 // indirect github.com/mattn/go-runewidth v0.0.13 // indirect - github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/pelletier/go-toml v1.9.5 // indirect github.com/pelletier/go-toml/v2 v2.0.5 // indirect @@ -131,20 +109,19 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/subosito/gotenv v1.4.1 // indirect github.com/tcnksm/go-gitconfig v0.1.2 // indirect + github.com/tealeg/xlsx v1.0.5 // indirect github.com/ulikunitz/xz v0.5.9 // indirect - github.com/xanzy/ssh-agent v0.3.0 // indirect - go.opencensus.io v0.23.0 // indirect golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect golang.org/x/image v0.0.0-20200927104501-e162460cd6b5 // indirect golang.org/x/net v0.0.0-20220909164309-bea034e7d591 // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f // indirect + golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec // indirect golang.org/x/text v0.3.7 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f // indirect - google.golang.org/grpc v1.47.0 // indirect google.golang.org/protobuf v1.28.0 // indirect + gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 69a9577d5..660add6e9 100644 --- a/go.sum +++ b/go.sum @@ -17,35 +17,14 @@ cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHOb cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= -cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= -cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= -cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= -cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= -cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= -cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= -cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= -cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= -cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= -cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= -cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= -cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= -cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= -cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= -cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= -cloud.google.com/go/compute v1.7.0 h1:v/k9Eueb8aAJ0vZuxKMrgm6kPhCLZU9HxFU+AFDs9Uk= -cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -56,7 +35,6 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= @@ -64,23 +42,15 @@ github.com/MichaelMure/go-term-markdown v0.1.4 h1:Ir3kBXDUtOX7dEv0EaQV8CNPpH+T7A github.com/MichaelMure/go-term-markdown v0.1.4/go.mod h1:EhcA3+pKYnlUsxYKBJ5Sn1cTQmmBMjeNlpV8nRb+JxA= github.com/MichaelMure/go-term-text v0.3.1 h1:Kw9kZanyZWiCHOYu9v/8pWEgDQ6UVN9/ix2Vd2zzWf0= github.com/MichaelMure/go-term-text v0.3.1/go.mod h1:QgVjAEDUnRMlzpS6ky5CGblux7ebeiLnuy9dAaFZu8o= -github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= -github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk= -github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 h1:YoJbenK9C67SkzkDfmQuVln04ygHj3vjZfd9FL+GmQQ= -github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= github.com/abiosoft/ishell v2.0.0+incompatible h1:zpwIuEHc37EzrsIYah3cpevrIc8Oma7oZPxr03tlmmw= github.com/abiosoft/ishell/v2 v2.0.2 h1:5qVfGiQISaYM8TkbBl7RFO6MddABoXpATrsFbVI+SNo= github.com/abiosoft/ishell/v2 v2.0.2/go.mod h1:E4oTCXfo6QjoCart0QYa5m9w4S+deXs/P/9jA77A9Bs= github.com/abiosoft/readline v0.0.0-20180607040430-155bce2042db h1:CjPUSXOiYptLbTdr1RceuZgSFDQ7U15ITERUGrUORx8= github.com/abiosoft/readline v0.0.0-20180607040430-155bce2042db/go.mod h1:rB3B4rKii8V21ydCbIzH5hZiCQE7f5E9SzUb/ZZx530= -github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d h1:licZJFw2RwpHMqeKTCYkitsPqHNxTmd4SNR5r94FGM8= -github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat636LX7Bqt5lYEZ27JNDcqxfjdBQuJ/MM4CN/Lzo= -github.com/acarl005/textcol v0.0.0 h1:39UH8Ojpl8SMMKho1HgoQ8mQ7no4281u6SN/MyT5EU4= -github.com/acarl005/textcol v0.0.0/go.mod h1:o8VbpDKrBLFfZtTo/AXk03Zn3dQHYOLJ8v//eaDtl78= -github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk= -github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= +github.com/agrison/go-tablib v0.0.0-20160310143025-4930582c22ee h1:0RklYSvekYaIFI9JUx7TFPQvo++TdILmZiV17QI4nXk= +github.com/agrison/go-tablib v0.0.0-20160310143025-4930582c22ee/go.mod h1:M9nmO4lBRWR/bBv7UCOmDJ1MB2DVoqz19B4JchDA+K0= +github.com/agrison/mxj v0.0.0-20160310142625-1269f8afb3b4 h1:XBNSe5eibe5Fh131ah+xnO6s4A97U1T3tKZKLQQvqu0= +github.com/agrison/mxj v0.0.0-20160310142625-1269f8afb3b4/go.mod h1:n7qJAqL9BKqGqiJyjPbWtxpdswTL5wX0IVP2Uw4vVhQ= github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38 h1:smF2tmSOzy2Mm+0dGI2AIUHY+w0BUc+4tn40djz7+6U= github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38/go.mod h1:r7bzyVFMNntcxPZXK3/+KdruV1H5KSlyVY0gc+NgInI= github.com/alecthomas/chroma v0.7.1 h1:G1i02OhUbRi2nJxcNkwJaY/J1gHXj9tt72qN6ZouLFQ= @@ -90,42 +60,26 @@ github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721/go.mod h1:QO9JBo github.com/alecthomas/kong v0.2.1-0.20190708041108-0548c6b1afae/go.mod h1:+inYUSluD+p4L8KdviBSgzcqEjUQOfC5fQDRFuc36lI= github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897 h1:p9Sln00KOTlrYkxI1zYWl1QLnEqAqEARBEYa8FQnQcY= github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= -github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= -github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA= -github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/bndr/gotabulate v1.1.2 h1:yC9izuZEphojb9r+KYL4W9IJKO/ceIO8HDwxMA24U4c= +github.com/bndr/gotabulate v1.1.2/go.mod h1:0+8yUgaPTtLRTjf49E8oju7ojpU11YmXyvq1LbPAb3U= github.com/briandowns/spinner v1.19.0 h1:s8aq38H+Qju89yhp89b4iIiMzMm8YN3p6vGpwyh/a8E= github.com/briandowns/spinner v1.19.0/go.mod h1:mQak9GHqbspjC/5iUx3qMlIho8xBS/ppAL/hX5SmPJU= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 h1:q763qf9huN11kDQavWsoZXJNW3xEE4JJyHa5Q25/sd8= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/clbanning/mxj v1.8.4 h1:HuhwZtbyvyOw+3Z1AowPkU87JkJUSv751ELWaiTpj8I= +github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5PVGJng= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/d4l3k/go-pcre v0.0.0-20160928060324-cf2c5e16ca45 h1:bN4YWd1Be6EX+4U+L6r8v3T6i4SKMfLldQdkQWNAcqo= -github.com/d4l3k/go-pcre v0.0.0-20160928060324-cf2c5e16ca45/go.mod h1:zemDNZ5ZZrOsQkCwAKE69X/F3lMeAKOcgNTHsYC2riY= github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 h1:y5HC9v93H5EPKqaS1UYVg1uYah5Xf51mBfIoWehClUQ= github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964/go.mod h1:Xd9hchkHSWYkEqJwUGisez3G1QY8Ryz0sdWrLPMGjLk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -139,44 +93,27 @@ github.com/eclipse/paho.mqtt.golang v1.4.1 h1:tUSpviiL5G3P9SZZJPC4ZULZJsxQKXxfEN github.com/eclipse/paho.mqtt.golang v1.4.1/go.mod h1:JGt0RsEwEX+Xa/agj90YJ9d9DH2b7upDZMK9HRbFvCA= github.com/eliukblau/pixterm/pkg/ansimage v0.0.0-20191210081756-9fb6cf8c2f75 h1:vbix8DDQ/rfatfFr/8cf/sJfIL69i4BcZfjrVOxsMqk= github.com/eliukblau/pixterm/pkg/ansimage v0.0.0-20191210081756-9fb6cf8c2f75/go.mod h1:0gZuvTO1ikSA5LtTI6E13LEOdWQNjIo5MTQOvrV0eFg= -github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= -github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= -github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= +github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/flynn-archive/go-shlex v0.0.0-20150515145356-3f9db97f8568 h1:BMXYYRWTLOJKlh+lOBt6nUQgXAfB7oVIQt5cNreqSLI= github.com/flynn-archive/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:rZfgFAXFS/z/lEd6LJmf9HVZ1LkgYiHx5pHhV5DR16M= -github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gliderlabs/ssh v0.2.2 h1:6zsha5zo/TWhRhwqCD3+EarCAgZ2yN28ipRnGPnwkI0= -github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/go-co-op/gocron v1.17.0 h1:IixLXsti+Qo0wMvmn6Kmjp2csk2ykpkcL+EmHmST18w= github.com/go-co-op/gocron v1.17.0/go.mod h1:IpDBSaJOVfFw7hXZuTag3SCSkqazXBBUkbQ1m1aesBs= -github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= -github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= -github.com/go-git/go-billy/v5 v5.2.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= -github.com/go-git/go-billy/v5 v5.3.1 h1:CPiOUAzKtMRvolEKw+bG1PLRpT7D3LIs3/3ey4Aiu34= -github.com/go-git/go-billy/v5 v5.3.1/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= -github.com/go-git/go-git-fixtures/v4 v4.2.1 h1:n9gGL1Ct/yIw+nfsfr8s4+sbhT+Ncu2SubfXjIWgci8= -github.com/go-git/go-git-fixtures/v4 v4.2.1/go.mod h1:K8zd3kDUAykwTdDCr+I0per6Y6vMiRR/nnVTBtavnB0= -github.com/go-git/go-git/v5 v5.4.2 h1:BXyZu9t0VkbiHtqrsvdq39UDhGJTl1h55VW6CSC4aY4= -github.com/go-git/go-git/v5 v5.4.2/go.mod h1:gQ1kArt6d+n+BGd+/B/I74HwRTLhth2+zti4ihgckDc= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -186,8 +123,6 @@ github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfU github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= @@ -195,8 +130,6 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -212,10 +145,8 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/gomarkdown/markdown v0.0.0-20191123064959-2c17d62f5098 h1:Qxs3bNRWe8GTcKMxYOSXm0jx6j0de8XUtb/fsP3GZ0I= github.com/gomarkdown/markdown v0.0.0-20191123064959-2c17d62f5098/go.mod h1:aii0r/K0ZnHv7G0KF7xy1v0A7s2Ljrb5byB7MO5p6TU= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -228,13 +159,9 @@ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-github/v30 v30.1.0 h1:VLDx+UolQICEOKu2m4uAoMti1SxuEBAl7RSEG16L+Oo= github.com/google/go-github/v30 v30.1.0/go.mod h1:n8jBpHl45a/rlBUtRJMOG4GhNADUQFEufcolZ95JfU8= github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= @@ -242,7 +169,6 @@ github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -253,31 +179,13 @@ github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= -github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= -github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= -github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= -github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= -github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= -github.com/googleapis/gax-go/v2 v2.4.0 h1:dS9eYAjhrE2RjmzYw2XAPvcXfmcQLtFEQWn0CR82awk= -github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= -github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= @@ -285,25 +193,17 @@ github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= -github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/go-update v0.0.0-20160112193335-8152e7eb6ccf h1:WfD7VjIE6z8dIvMsI4/s+1qr5EL+zoIGev1BQj1eoJ8= github.com/inconshreveable/go-update v0.0.0-20160112193335-8152e7eb6ccf/go.mod h1:hyb9oH7vZsitZCiBt0ZvifOrB+qc8PS5IiilCIb87rg= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/ivanpirog/coloredcobra v1.0.1 h1:aURSdEmlR90/tSiWS0dMjdwOvCVUeYLfltLfbgNxrN4= github.com/ivanpirog/coloredcobra v1.0.1/go.mod h1:iho4nEKcnwZFiniGSdcgdvRgZNjxm+h20acv8vqmN6Q= -github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= -github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= -github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 h1:iQTw/8FWTuc7uiaSepXwyf3o52HaUYcV+Tu66S3F5GA= github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= -github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 h1:DowS9hvgyYSX4TO5NpyC606/Z4SxnNYbT+WX27or6Ck= -github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -311,7 +211,6 @@ github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kyokomi/emoji/v2 v2.2.8 h1:jcofPxjHWEkJtkIbcLHvZhxKgCPl6C7MyjTrD4KDqUE= github.com/kyokomi/emoji/v2 v2.2.8/go.mod h1:JUcn42DTdsXJo1SWanHh4HKDEyPaR5CqkmoirZZP9qE= github.com/liquidgecka/testlib v0.0.0-20180123051607-561e6b271c63 h1:E1gsAMD4TysLS1Vt2CGR1EK/RtNPIT7YkiVOy9PS1IM= @@ -322,8 +221,6 @@ github.com/lucasb-eyer/go-colorful v1.0.3 h1:QIbQXiugsb+q10B+MI+7DI1oQLdmnep86tW github.com/lucasb-eyer/go-colorful v1.0.3/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/matryer/is v1.2.0 h1:92UTHpy8CDwaJ08GqLDzhhuixiBUUD1p3AU6PHddz4A= -github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= @@ -342,12 +239,9 @@ github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -358,7 +252,6 @@ github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCko github.com/pelletier/go-toml/v2 v2.0.5 h1:ipoSadvV8oGUjnUbMub59IDPPwfxF694nG/jwbMiyQg= github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -371,7 +264,6 @@ github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -380,8 +272,6 @@ github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sevlyar/go-daemon v0.1.6 h1:EUh1MDjEM4BI109Jign0EaknA2izkOyi0LV3ro3QQGs= github.com/sevlyar/go-daemon v0.1.6/go.mod h1:6dJpPatBT9eUwM5VCw9Bt6CdX9Tk6UWvhW3MebLDRKE= -github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= @@ -396,13 +286,11 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/spf13/viper v1.13.0 h1:BWSJ/M+f+3nmdz9bxB+bWX28kkALN2ok11D0rSo8EJU= github.com/spf13/viper v1.13.0/go.mod h1:Icm2xNL3/8uyh/wFuB1jI7TiTNKp8632Nwegu+zgdYw= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= @@ -411,39 +299,31 @@ github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/tcnksm/go-gitconfig v0.1.2 h1:iiDhRitByXAEyjgBqsKi9QU4o2TNtv9kPP3RgPgXBPw= github.com/tcnksm/go-gitconfig v0.1.2/go.mod h1:/8EhP4H7oJZdIPyT+/UIsG87kTzrzM4UsLGSItWYCpE= +github.com/tealeg/xlsx v1.0.5 h1:+f8oFmvY8Gw1iUXzPk+kz+4GpbDZPK1FhPiQRd+ypgE= +github.com/tealeg/xlsx v1.0.5/go.mod h1:btRS8dz54TDnvKNosuAqxrM1QgN1udgk9O34bDCnORM= github.com/ulikunitz/xz v0.5.9 h1:RsKRIA2MO8x56wkkcd3LbtcE/uMszhb6DpRf+3uwa3I= github.com/ulikunitz/xz v0.5.9/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/wcharczuk/go-chart/v2 v2.1.0 h1:tY2slqVQ6bN+yHSnDYwZebLQFkphK4WNrVwnt7CJZ2I= github.com/wcharczuk/go-chart/v2 v2.1.0/go.mod h1:yx7MvAVNcP/kN9lKXM/NTce4au4DFN99j6i1OwDclNA= -github.com/willf/pad v0.0.0-20200313202418-172aa767f2a4 h1:Y+IMUhhlO9FLTZpNrUAMWOr7Lh0tHDKu0nrDVhp6A7o= -github.com/willf/pad v0.0.0-20200313202418-172aa767f2a4/go.mod h1:+pVHwmjc9CH7ugBFxESIwQkXkVj0gUj4cFp63TLwP1Y= -github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI= -github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.pennock.tech/tabular v1.1.3 h1:JYN3TdVkTjOWdZz2FwKcW7f69vRhPl4NAQqJ8RZAsmY= go.pennock.tech/tabular v1.1.3/go.mod h1:UzyxF5itNqTCS1ZGXfwDwbFgYj/lS+e67Fid68QOYZ0= golang.org/dl v0.0.0-20190829154251-82a15e2f2ead/go.mod h1:IUMfjQLJQd4UTqG1Z90tenwKoCX93Gn3MAQJMOSBsDQ= -golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 h1:kUhD7nTDoI3fVd9G4ORWrbV5NY0liEs/Jg2pv5f+bBA= @@ -475,7 +355,6 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -486,7 +365,6 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -518,22 +396,9 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= -golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220909164309-bea034e7d591 h1:D0B/7al0LLrVC8aWF4+oxpv/m8bc7ViFfVS8/gXGdqI= golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -546,18 +411,6 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= -golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -574,7 +427,6 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f h1:Ax0t5p6N38Ga0dThY21weqDEyz2oklo4IvDkpigvkD8= golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181128092732-4ed8d59d0b35/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -586,7 +438,6 @@ golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -611,45 +462,16 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210502180810-71e4cd670f79/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec h1:BkDtF2Ih9xZ7le9ndzTA7KJow28VbQW3odyk/8drmuI= golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -657,7 +479,6 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -710,19 +531,10 @@ golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f h1:uF6paiQQebLeSXkrTqHqz0MXhXXS1KgF41eUdBNvxK0= -golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -742,28 +554,6 @@ google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz513 google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= -google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= -google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= -google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= -google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= -google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= -google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= -google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= -google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= -google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= -google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= -google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= -google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= -google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= -google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= -google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= -google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.98.0 h1:yxZrcxXESimy6r6mdL5Q6EnZwmewDJK2dVg3g75s5Dg= -google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -796,7 +586,6 @@ google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= @@ -809,52 +598,7 @@ google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= -google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= -google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f h1:hJ/Y5SqPXbarffmAsApliUlcvMU+wScNGfyop4bZm8o= -google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -868,26 +612,9 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= -google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -900,15 +627,11 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= @@ -916,13 +639,9 @@ gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMy gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= -gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/iSolarCloud/AliSmsService/msgDownwardStatusReceipt/data.go b/iSolarCloud/AliSmsService/msgDownwardStatusReceipt/data.go index 266f51cb8..e7b8bc546 100644 --- a/iSolarCloud/AliSmsService/msgDownwardStatusReceipt/data.go +++ b/iSolarCloud/AliSmsService/msgDownwardStatusReceipt/data.go @@ -2,10 +2,10 @@ package msgDownwardStatusReceipt import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" - "github.com/MickMake/GoUnify/Only" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" + "github.com/MickMake/GoUnify/Only" ) const Url = "/v1/messageService/msgDownwardStatusReceipt" @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AliSmsService/msgDownwardStatusReceipt/struct.go b/iSolarCloud/AliSmsService/msgDownwardStatusReceipt/struct.go index 490e26e08..4685fb70e 100644 --- a/iSolarCloud/AliSmsService/msgDownwardStatusReceipt/struct.go +++ b/iSolarCloud/AliSmsService/msgDownwardStatusReceipt/struct.go @@ -6,8 +6,8 @@ package msgDownwardStatusReceipt import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AliSmsService/struct.go b/iSolarCloud/AliSmsService/struct.go index 6702cd048..1f3b2b7f6 100644 --- a/iSolarCloud/AliSmsService/struct.go +++ b/iSolarCloud/AliSmsService/struct.go @@ -5,7 +5,7 @@ package AliSmsService import ( "GoSungrow/iSolarCloud/AliSmsService/msgDownwardStatusReceipt" "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" "fmt" ) diff --git a/iSolarCloud/AppService/acceptPsSharing/data.go b/iSolarCloud/AppService/acceptPsSharing/data.go index 970ac8864..3f5f6d32a 100644 --- a/iSolarCloud/AppService/acceptPsSharing/data.go +++ b/iSolarCloud/AppService/acceptPsSharing/data.go @@ -2,8 +2,8 @@ package acceptPsSharing import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/acceptPsSharing/struct.go b/iSolarCloud/AppService/acceptPsSharing/struct.go index e9d0a25e4..75491b952 100644 --- a/iSolarCloud/AppService/acceptPsSharing/struct.go +++ b/iSolarCloud/AppService/acceptPsSharing/struct.go @@ -6,8 +6,8 @@ package acceptPsSharing import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/activateEmail/data.go b/iSolarCloud/AppService/activateEmail/data.go index f09ab30e1..42833c65b 100644 --- a/iSolarCloud/AppService/activateEmail/data.go +++ b/iSolarCloud/AppService/activateEmail/data.go @@ -2,8 +2,8 @@ package activateEmail import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/activateEmail/struct.go b/iSolarCloud/AppService/activateEmail/struct.go index f71b7602f..fb4d177b5 100644 --- a/iSolarCloud/AppService/activateEmail/struct.go +++ b/iSolarCloud/AppService/activateEmail/struct.go @@ -6,8 +6,8 @@ package activateEmail import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/addConfig/data.go b/iSolarCloud/AppService/addConfig/data.go index 3c90b7628..37524611f 100644 --- a/iSolarCloud/AppService/addConfig/data.go +++ b/iSolarCloud/AppService/addConfig/data.go @@ -2,8 +2,8 @@ package addConfig import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/addConfig/struct.go b/iSolarCloud/AppService/addConfig/struct.go index 92a0d38a4..b5cc5e806 100644 --- a/iSolarCloud/AppService/addConfig/struct.go +++ b/iSolarCloud/AppService/addConfig/struct.go @@ -6,8 +6,8 @@ package addConfig import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/addDeviceRepair/data.go b/iSolarCloud/AppService/addDeviceRepair/data.go index 4f8521292..e5b473d2c 100644 --- a/iSolarCloud/AppService/addDeviceRepair/data.go +++ b/iSolarCloud/AppService/addDeviceRepair/data.go @@ -2,8 +2,8 @@ package addDeviceRepair import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/addDeviceRepair/struct.go b/iSolarCloud/AppService/addDeviceRepair/struct.go index 8996d7080..c86bc6c85 100644 --- a/iSolarCloud/AppService/addDeviceRepair/struct.go +++ b/iSolarCloud/AppService/addDeviceRepair/struct.go @@ -6,8 +6,8 @@ package addDeviceRepair import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/addDeviceToStructureForHousehold/data.go b/iSolarCloud/AppService/addDeviceToStructureForHousehold/data.go index 5869f08ee..92b3dd098 100644 --- a/iSolarCloud/AppService/addDeviceToStructureForHousehold/data.go +++ b/iSolarCloud/AppService/addDeviceToStructureForHousehold/data.go @@ -2,8 +2,8 @@ package addDeviceToStructureForHousehold import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/addDeviceToStructureForHousehold/struct.go b/iSolarCloud/AppService/addDeviceToStructureForHousehold/struct.go index 062d8d044..992c391d4 100644 --- a/iSolarCloud/AppService/addDeviceToStructureForHousehold/struct.go +++ b/iSolarCloud/AppService/addDeviceToStructureForHousehold/struct.go @@ -6,8 +6,8 @@ package addDeviceToStructureForHousehold import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/addDeviceToStructureForHouseholdByPsIdS/data.go b/iSolarCloud/AppService/addDeviceToStructureForHouseholdByPsIdS/data.go index 03c82770c..ca553f31d 100644 --- a/iSolarCloud/AppService/addDeviceToStructureForHouseholdByPsIdS/data.go +++ b/iSolarCloud/AppService/addDeviceToStructureForHouseholdByPsIdS/data.go @@ -2,8 +2,8 @@ package addDeviceToStructureForHouseholdByPsIdS import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/addDeviceToStructureForHouseholdByPsIdS/struct.go b/iSolarCloud/AppService/addDeviceToStructureForHouseholdByPsIdS/struct.go index ec5f69087..ba2e26753 100644 --- a/iSolarCloud/AppService/addDeviceToStructureForHouseholdByPsIdS/struct.go +++ b/iSolarCloud/AppService/addDeviceToStructureForHouseholdByPsIdS/struct.go @@ -6,8 +6,8 @@ package addDeviceToStructureForHouseholdByPsIdS import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/addFault/data.go b/iSolarCloud/AppService/addFault/data.go index 6bccefeda..2acfa062d 100644 --- a/iSolarCloud/AppService/addFault/data.go +++ b/iSolarCloud/AppService/addFault/data.go @@ -2,8 +2,8 @@ package addFault import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/addFault/struct.go b/iSolarCloud/AppService/addFault/struct.go index 6890bcdc2..aad6de2af 100644 --- a/iSolarCloud/AppService/addFault/struct.go +++ b/iSolarCloud/AppService/addFault/struct.go @@ -6,8 +6,8 @@ package addFault import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/addFaultOrder/data.go b/iSolarCloud/AppService/addFaultOrder/data.go index c27db796a..157eec5a5 100644 --- a/iSolarCloud/AppService/addFaultOrder/data.go +++ b/iSolarCloud/AppService/addFaultOrder/data.go @@ -2,8 +2,8 @@ package addFaultOrder import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/addFaultOrder/struct.go b/iSolarCloud/AppService/addFaultOrder/struct.go index 92da8953f..2d73a1f0d 100644 --- a/iSolarCloud/AppService/addFaultOrder/struct.go +++ b/iSolarCloud/AppService/addFaultOrder/struct.go @@ -6,8 +6,8 @@ package addFaultOrder import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/addFaultPlan/data.go b/iSolarCloud/AppService/addFaultPlan/data.go index 2cbb887da..5df0b1f46 100644 --- a/iSolarCloud/AppService/addFaultPlan/data.go +++ b/iSolarCloud/AppService/addFaultPlan/data.go @@ -2,8 +2,8 @@ package addFaultPlan import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/addFaultPlan/struct.go b/iSolarCloud/AppService/addFaultPlan/struct.go index e0c5d8d8e..ed04b5896 100644 --- a/iSolarCloud/AppService/addFaultPlan/struct.go +++ b/iSolarCloud/AppService/addFaultPlan/struct.go @@ -6,8 +6,8 @@ package addFaultPlan import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/addFaultRepairSteps/data.go b/iSolarCloud/AppService/addFaultRepairSteps/data.go index 31e50d248..2d43ef2ca 100644 --- a/iSolarCloud/AppService/addFaultRepairSteps/data.go +++ b/iSolarCloud/AppService/addFaultRepairSteps/data.go @@ -2,8 +2,8 @@ package addFaultRepairSteps import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/addFaultRepairSteps/struct.go b/iSolarCloud/AppService/addFaultRepairSteps/struct.go index 8d8d93ef9..2cc90c53b 100644 --- a/iSolarCloud/AppService/addFaultRepairSteps/struct.go +++ b/iSolarCloud/AppService/addFaultRepairSteps/struct.go @@ -6,8 +6,8 @@ package addFaultRepairSteps import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/addHouseholdEvaluation/data.go b/iSolarCloud/AppService/addHouseholdEvaluation/data.go index 8f32158a4..8d824c262 100644 --- a/iSolarCloud/AppService/addHouseholdEvaluation/data.go +++ b/iSolarCloud/AppService/addHouseholdEvaluation/data.go @@ -2,8 +2,8 @@ package addHouseholdEvaluation import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/addHouseholdEvaluation/struct.go b/iSolarCloud/AppService/addHouseholdEvaluation/struct.go index 181a517a2..9eaf2e452 100644 --- a/iSolarCloud/AppService/addHouseholdEvaluation/struct.go +++ b/iSolarCloud/AppService/addHouseholdEvaluation/struct.go @@ -6,8 +6,8 @@ package addHouseholdEvaluation import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/addHouseholdLeaveMessage/data.go b/iSolarCloud/AppService/addHouseholdLeaveMessage/data.go index 0441d49cd..78397430d 100644 --- a/iSolarCloud/AppService/addHouseholdLeaveMessage/data.go +++ b/iSolarCloud/AppService/addHouseholdLeaveMessage/data.go @@ -2,8 +2,8 @@ package addHouseholdLeaveMessage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/addHouseholdLeaveMessage/struct.go b/iSolarCloud/AppService/addHouseholdLeaveMessage/struct.go index 7ef8c0f74..61f35de4a 100644 --- a/iSolarCloud/AppService/addHouseholdLeaveMessage/struct.go +++ b/iSolarCloud/AppService/addHouseholdLeaveMessage/struct.go @@ -6,8 +6,8 @@ package addHouseholdLeaveMessage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/addHouseholdOpinionFeedback/data.go b/iSolarCloud/AppService/addHouseholdOpinionFeedback/data.go index f5d168cb9..87a41875c 100644 --- a/iSolarCloud/AppService/addHouseholdOpinionFeedback/data.go +++ b/iSolarCloud/AppService/addHouseholdOpinionFeedback/data.go @@ -2,8 +2,8 @@ package addHouseholdOpinionFeedback import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/addHouseholdOpinionFeedback/struct.go b/iSolarCloud/AppService/addHouseholdOpinionFeedback/struct.go index fc128f582..19d411c9a 100644 --- a/iSolarCloud/AppService/addHouseholdOpinionFeedback/struct.go +++ b/iSolarCloud/AppService/addHouseholdOpinionFeedback/struct.go @@ -6,8 +6,8 @@ package addHouseholdOpinionFeedback import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/addHouseholdWorkOrder/data.go b/iSolarCloud/AppService/addHouseholdWorkOrder/data.go index b282cd494..6b2e8e534 100644 --- a/iSolarCloud/AppService/addHouseholdWorkOrder/data.go +++ b/iSolarCloud/AppService/addHouseholdWorkOrder/data.go @@ -2,8 +2,8 @@ package addHouseholdWorkOrder import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/addHouseholdWorkOrder/struct.go b/iSolarCloud/AppService/addHouseholdWorkOrder/struct.go index cd07d5862..b707ebfc1 100644 --- a/iSolarCloud/AppService/addHouseholdWorkOrder/struct.go +++ b/iSolarCloud/AppService/addHouseholdWorkOrder/struct.go @@ -6,8 +6,8 @@ package addHouseholdWorkOrder import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/addOnDutyInfo/data.go b/iSolarCloud/AppService/addOnDutyInfo/data.go index 2381eaf30..38bd144d8 100644 --- a/iSolarCloud/AppService/addOnDutyInfo/data.go +++ b/iSolarCloud/AppService/addOnDutyInfo/data.go @@ -2,8 +2,8 @@ package addOnDutyInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/addOnDutyInfo/struct.go b/iSolarCloud/AppService/addOnDutyInfo/struct.go index 2523de8b2..619e56423 100644 --- a/iSolarCloud/AppService/addOnDutyInfo/struct.go +++ b/iSolarCloud/AppService/addOnDutyInfo/struct.go @@ -6,8 +6,8 @@ package addOnDutyInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/addOperRule/data.go b/iSolarCloud/AppService/addOperRule/data.go index db9f42691..3eeba581a 100644 --- a/iSolarCloud/AppService/addOperRule/data.go +++ b/iSolarCloud/AppService/addOperRule/data.go @@ -2,8 +2,8 @@ package addOperRule import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/addOperRule/struct.go b/iSolarCloud/AppService/addOperRule/struct.go index ee121f76b..af69fb27b 100644 --- a/iSolarCloud/AppService/addOperRule/struct.go +++ b/iSolarCloud/AppService/addOperRule/struct.go @@ -6,8 +6,8 @@ package addOperRule import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/addOrDelPsStructure/data.go b/iSolarCloud/AppService/addOrDelPsStructure/data.go index 34c757a5e..d9fc6c7bc 100644 --- a/iSolarCloud/AppService/addOrDelPsStructure/data.go +++ b/iSolarCloud/AppService/addOrDelPsStructure/data.go @@ -2,8 +2,8 @@ package addOrDelPsStructure import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/addOrDelPsStructure/struct.go b/iSolarCloud/AppService/addOrDelPsStructure/struct.go index ea8560151..b69af2f21 100644 --- a/iSolarCloud/AppService/addOrDelPsStructure/struct.go +++ b/iSolarCloud/AppService/addOrDelPsStructure/struct.go @@ -6,8 +6,8 @@ package addOrDelPsStructure import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/addOrderStep/data.go b/iSolarCloud/AppService/addOrderStep/data.go index 63b34581c..a2b3dad89 100644 --- a/iSolarCloud/AppService/addOrderStep/data.go +++ b/iSolarCloud/AppService/addOrderStep/data.go @@ -2,8 +2,8 @@ package addOrderStep import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/addOrderStep/struct.go b/iSolarCloud/AppService/addOrderStep/struct.go index cb6c1df72..d551db1de 100644 --- a/iSolarCloud/AppService/addOrderStep/struct.go +++ b/iSolarCloud/AppService/addOrderStep/struct.go @@ -6,8 +6,8 @@ package addOrderStep import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/addPowerStationForHousehold/data.go b/iSolarCloud/AppService/addPowerStationForHousehold/data.go index 0aaa37a9e..aecb29ae0 100644 --- a/iSolarCloud/AppService/addPowerStationForHousehold/data.go +++ b/iSolarCloud/AppService/addPowerStationForHousehold/data.go @@ -2,8 +2,8 @@ package addPowerStationForHousehold import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/addPowerStationForHousehold/struct.go b/iSolarCloud/AppService/addPowerStationForHousehold/struct.go index aed10685d..b496dfc0c 100644 --- a/iSolarCloud/AppService/addPowerStationForHousehold/struct.go +++ b/iSolarCloud/AppService/addPowerStationForHousehold/struct.go @@ -6,8 +6,8 @@ package addPowerStationForHousehold import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/addPowerStationInfo/data.go b/iSolarCloud/AppService/addPowerStationInfo/data.go index 1022aef97..92fb4a6da 100644 --- a/iSolarCloud/AppService/addPowerStationInfo/data.go +++ b/iSolarCloud/AppService/addPowerStationInfo/data.go @@ -2,8 +2,8 @@ package addPowerStationInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/addPowerStationInfo/struct.go b/iSolarCloud/AppService/addPowerStationInfo/struct.go index fb92633f2..2149aeb6d 100644 --- a/iSolarCloud/AppService/addPowerStationInfo/struct.go +++ b/iSolarCloud/AppService/addPowerStationInfo/struct.go @@ -6,8 +6,8 @@ package addPowerStationInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/addReportConfigEmail/data.go b/iSolarCloud/AppService/addReportConfigEmail/data.go index c6e8b67de..117a29f26 100644 --- a/iSolarCloud/AppService/addReportConfigEmail/data.go +++ b/iSolarCloud/AppService/addReportConfigEmail/data.go @@ -2,8 +2,8 @@ package addReportConfigEmail import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/addReportConfigEmail/struct.go b/iSolarCloud/AppService/addReportConfigEmail/struct.go index de00e82ef..5a1a42c32 100644 --- a/iSolarCloud/AppService/addReportConfigEmail/struct.go +++ b/iSolarCloud/AppService/addReportConfigEmail/struct.go @@ -6,8 +6,8 @@ package addReportConfigEmail import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/addSysAdvancedParam/data.go b/iSolarCloud/AppService/addSysAdvancedParam/data.go index f1d1d662a..4f3a89aff 100644 --- a/iSolarCloud/AppService/addSysAdvancedParam/data.go +++ b/iSolarCloud/AppService/addSysAdvancedParam/data.go @@ -2,8 +2,8 @@ package addSysAdvancedParam import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/addSysAdvancedParam/struct.go b/iSolarCloud/AppService/addSysAdvancedParam/struct.go index f3c0aff12..4760094c5 100644 --- a/iSolarCloud/AppService/addSysAdvancedParam/struct.go +++ b/iSolarCloud/AppService/addSysAdvancedParam/struct.go @@ -6,8 +6,8 @@ package addSysAdvancedParam import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/addSysOrgNew/data.go b/iSolarCloud/AppService/addSysOrgNew/data.go index 091203c0d..4c7a79178 100644 --- a/iSolarCloud/AppService/addSysOrgNew/data.go +++ b/iSolarCloud/AppService/addSysOrgNew/data.go @@ -2,8 +2,8 @@ package addSysOrgNew import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/addSysOrgNew/struct.go b/iSolarCloud/AppService/addSysOrgNew/struct.go index 36ab16380..3fd5620a0 100644 --- a/iSolarCloud/AppService/addSysOrgNew/struct.go +++ b/iSolarCloud/AppService/addSysOrgNew/struct.go @@ -6,8 +6,8 @@ package addSysOrgNew import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/aliPayAppTest/data.go b/iSolarCloud/AppService/aliPayAppTest/data.go index e76d8d804..17e3c6c61 100644 --- a/iSolarCloud/AppService/aliPayAppTest/data.go +++ b/iSolarCloud/AppService/aliPayAppTest/data.go @@ -2,8 +2,8 @@ package aliPayAppTest import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/aliPayAppTest/struct.go b/iSolarCloud/AppService/aliPayAppTest/struct.go index b8e711ab2..adaf76ab3 100644 --- a/iSolarCloud/AppService/aliPayAppTest/struct.go +++ b/iSolarCloud/AppService/aliPayAppTest/struct.go @@ -6,8 +6,8 @@ package aliPayAppTest import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/auditOperRule/data.go b/iSolarCloud/AppService/auditOperRule/data.go index bb9a01d03..7938812a9 100644 --- a/iSolarCloud/AppService/auditOperRule/data.go +++ b/iSolarCloud/AppService/auditOperRule/data.go @@ -2,8 +2,8 @@ package auditOperRule import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/auditOperRule/struct.go b/iSolarCloud/AppService/auditOperRule/struct.go index 2abd1bdb0..b8e0d5cf8 100644 --- a/iSolarCloud/AppService/auditOperRule/struct.go +++ b/iSolarCloud/AppService/auditOperRule/struct.go @@ -6,8 +6,8 @@ package auditOperRule import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/batchAddStationBySn/data.go b/iSolarCloud/AppService/batchAddStationBySn/data.go index 8a4ec24ed..f3f328fd0 100644 --- a/iSolarCloud/AppService/batchAddStationBySn/data.go +++ b/iSolarCloud/AppService/batchAddStationBySn/data.go @@ -2,8 +2,8 @@ package batchAddStationBySn import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/batchAddStationBySn/struct.go b/iSolarCloud/AppService/batchAddStationBySn/struct.go index b0c3a7c50..19de00cb3 100644 --- a/iSolarCloud/AppService/batchAddStationBySn/struct.go +++ b/iSolarCloud/AppService/batchAddStationBySn/struct.go @@ -6,8 +6,8 @@ package batchAddStationBySn import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/batchImportSN/data.go b/iSolarCloud/AppService/batchImportSN/data.go index 114149a0f..2ff457faf 100644 --- a/iSolarCloud/AppService/batchImportSN/data.go +++ b/iSolarCloud/AppService/batchImportSN/data.go @@ -2,8 +2,8 @@ package batchImportSN import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/batchImportSN/struct.go b/iSolarCloud/AppService/batchImportSN/struct.go index 01148dc10..3679607c0 100644 --- a/iSolarCloud/AppService/batchImportSN/struct.go +++ b/iSolarCloud/AppService/batchImportSN/struct.go @@ -6,8 +6,8 @@ package batchImportSN import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/batchInsertUserAndOrg/data.go b/iSolarCloud/AppService/batchInsertUserAndOrg/data.go index 9bb9083bb..43fc53e2f 100644 --- a/iSolarCloud/AppService/batchInsertUserAndOrg/data.go +++ b/iSolarCloud/AppService/batchInsertUserAndOrg/data.go @@ -2,8 +2,8 @@ package batchInsertUserAndOrg import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/batchInsertUserAndOrg/struct.go b/iSolarCloud/AppService/batchInsertUserAndOrg/struct.go index 4952279fd..9208dbe1e 100644 --- a/iSolarCloud/AppService/batchInsertUserAndOrg/struct.go +++ b/iSolarCloud/AppService/batchInsertUserAndOrg/struct.go @@ -6,8 +6,8 @@ package batchInsertUserAndOrg import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/batchModifyDevicesInfoAndPropertis/data.go b/iSolarCloud/AppService/batchModifyDevicesInfoAndPropertis/data.go index 3161eb450..70635d903 100644 --- a/iSolarCloud/AppService/batchModifyDevicesInfoAndPropertis/data.go +++ b/iSolarCloud/AppService/batchModifyDevicesInfoAndPropertis/data.go @@ -2,8 +2,8 @@ package batchModifyDevicesInfoAndPropertis import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/batchModifyDevicesInfoAndPropertis/struct.go b/iSolarCloud/AppService/batchModifyDevicesInfoAndPropertis/struct.go index 7a6bdeef8..b7fcc9642 100644 --- a/iSolarCloud/AppService/batchModifyDevicesInfoAndPropertis/struct.go +++ b/iSolarCloud/AppService/batchModifyDevicesInfoAndPropertis/struct.go @@ -6,8 +6,8 @@ package batchModifyDevicesInfoAndPropertis import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/batchProcessPlantReport/data.go b/iSolarCloud/AppService/batchProcessPlantReport/data.go index fd4908d0a..7da0ccfa2 100644 --- a/iSolarCloud/AppService/batchProcessPlantReport/data.go +++ b/iSolarCloud/AppService/batchProcessPlantReport/data.go @@ -2,8 +2,8 @@ package batchProcessPlantReport import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/batchProcessPlantReport/struct.go b/iSolarCloud/AppService/batchProcessPlantReport/struct.go index 0350f5c5b..c40b19f6a 100644 --- a/iSolarCloud/AppService/batchProcessPlantReport/struct.go +++ b/iSolarCloud/AppService/batchProcessPlantReport/struct.go @@ -6,8 +6,8 @@ package batchProcessPlantReport import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/batchUpdateDeviceSim/data.go b/iSolarCloud/AppService/batchUpdateDeviceSim/data.go index c5853d50e..71edcbe14 100644 --- a/iSolarCloud/AppService/batchUpdateDeviceSim/data.go +++ b/iSolarCloud/AppService/batchUpdateDeviceSim/data.go @@ -2,8 +2,8 @@ package batchUpdateDeviceSim import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/batchUpdateDeviceSim/struct.go b/iSolarCloud/AppService/batchUpdateDeviceSim/struct.go index 2231ccba7..6a4365566 100644 --- a/iSolarCloud/AppService/batchUpdateDeviceSim/struct.go +++ b/iSolarCloud/AppService/batchUpdateDeviceSim/struct.go @@ -6,8 +6,8 @@ package batchUpdateDeviceSim import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/batchUpdateUserIsAgreeGdpr/data.go b/iSolarCloud/AppService/batchUpdateUserIsAgreeGdpr/data.go index b6859d906..424c57210 100644 --- a/iSolarCloud/AppService/batchUpdateUserIsAgreeGdpr/data.go +++ b/iSolarCloud/AppService/batchUpdateUserIsAgreeGdpr/data.go @@ -2,8 +2,8 @@ package batchUpdateUserIsAgreeGdpr import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/batchUpdateUserIsAgreeGdpr/struct.go b/iSolarCloud/AppService/batchUpdateUserIsAgreeGdpr/struct.go index 988bac0ef..466b21801 100644 --- a/iSolarCloud/AppService/batchUpdateUserIsAgreeGdpr/struct.go +++ b/iSolarCloud/AppService/batchUpdateUserIsAgreeGdpr/struct.go @@ -6,8 +6,8 @@ package batchUpdateUserIsAgreeGdpr import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/boundMobilePhone/data.go b/iSolarCloud/AppService/boundMobilePhone/data.go index 7712358ef..1b1c60baf 100644 --- a/iSolarCloud/AppService/boundMobilePhone/data.go +++ b/iSolarCloud/AppService/boundMobilePhone/data.go @@ -2,8 +2,8 @@ package boundMobilePhone import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/boundMobilePhone/struct.go b/iSolarCloud/AppService/boundMobilePhone/struct.go index 4bd9d7121..86af97fb3 100644 --- a/iSolarCloud/AppService/boundMobilePhone/struct.go +++ b/iSolarCloud/AppService/boundMobilePhone/struct.go @@ -6,8 +6,8 @@ package boundMobilePhone import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/boundUserMail/data.go b/iSolarCloud/AppService/boundUserMail/data.go index f2864eb71..ef1ef03f7 100644 --- a/iSolarCloud/AppService/boundUserMail/data.go +++ b/iSolarCloud/AppService/boundUserMail/data.go @@ -2,8 +2,8 @@ package boundUserMail import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/boundUserMail/struct.go b/iSolarCloud/AppService/boundUserMail/struct.go index f816589e0..ad2e8a3e9 100644 --- a/iSolarCloud/AppService/boundUserMail/struct.go +++ b/iSolarCloud/AppService/boundUserMail/struct.go @@ -6,8 +6,8 @@ package boundUserMail import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/caculateDeviceInputDiscrete/data.go b/iSolarCloud/AppService/caculateDeviceInputDiscrete/data.go index 2269e92cd..60f8a8602 100644 --- a/iSolarCloud/AppService/caculateDeviceInputDiscrete/data.go +++ b/iSolarCloud/AppService/caculateDeviceInputDiscrete/data.go @@ -2,8 +2,8 @@ package caculateDeviceInputDiscrete import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/caculateDeviceInputDiscrete/struct.go b/iSolarCloud/AppService/caculateDeviceInputDiscrete/struct.go index 6735fd45c..e2875628a 100644 --- a/iSolarCloud/AppService/caculateDeviceInputDiscrete/struct.go +++ b/iSolarCloud/AppService/caculateDeviceInputDiscrete/struct.go @@ -6,8 +6,8 @@ package caculateDeviceInputDiscrete import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/calculateDeviceDiscrete/data.go b/iSolarCloud/AppService/calculateDeviceDiscrete/data.go index 62cf5466b..5aa3dac6d 100644 --- a/iSolarCloud/AppService/calculateDeviceDiscrete/data.go +++ b/iSolarCloud/AppService/calculateDeviceDiscrete/data.go @@ -2,8 +2,8 @@ package calculateDeviceDiscrete import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/calculateDeviceDiscrete/struct.go b/iSolarCloud/AppService/calculateDeviceDiscrete/struct.go index 6ac7dcdcd..2592ab63b 100644 --- a/iSolarCloud/AppService/calculateDeviceDiscrete/struct.go +++ b/iSolarCloud/AppService/calculateDeviceDiscrete/struct.go @@ -6,8 +6,8 @@ package calculateDeviceDiscrete import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/calculateInitialCompensationData/data.go b/iSolarCloud/AppService/calculateInitialCompensationData/data.go index f4ddc994e..a4ff0fec9 100644 --- a/iSolarCloud/AppService/calculateInitialCompensationData/data.go +++ b/iSolarCloud/AppService/calculateInitialCompensationData/data.go @@ -2,8 +2,8 @@ package calculateInitialCompensationData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/calculateInitialCompensationData/struct.go b/iSolarCloud/AppService/calculateInitialCompensationData/struct.go index 8bd9f8cb7..07bb4398c 100644 --- a/iSolarCloud/AppService/calculateInitialCompensationData/struct.go +++ b/iSolarCloud/AppService/calculateInitialCompensationData/struct.go @@ -6,8 +6,8 @@ package calculateInitialCompensationData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/cancelDeliverMail/data.go b/iSolarCloud/AppService/cancelDeliverMail/data.go index e3450a7b3..37dc1565f 100644 --- a/iSolarCloud/AppService/cancelDeliverMail/data.go +++ b/iSolarCloud/AppService/cancelDeliverMail/data.go @@ -2,8 +2,8 @@ package cancelDeliverMail import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/cancelDeliverMail/struct.go b/iSolarCloud/AppService/cancelDeliverMail/struct.go index 8e665ee1a..189ec1a45 100644 --- a/iSolarCloud/AppService/cancelDeliverMail/struct.go +++ b/iSolarCloud/AppService/cancelDeliverMail/struct.go @@ -6,8 +6,8 @@ package cancelDeliverMail import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/cancelOrderScan/data.go b/iSolarCloud/AppService/cancelOrderScan/data.go index e027780c5..4e8e52fcc 100644 --- a/iSolarCloud/AppService/cancelOrderScan/data.go +++ b/iSolarCloud/AppService/cancelOrderScan/data.go @@ -2,8 +2,8 @@ package cancelOrderScan import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/cancelOrderScan/struct.go b/iSolarCloud/AppService/cancelOrderScan/struct.go index 2211db8fc..40f7527d5 100644 --- a/iSolarCloud/AppService/cancelOrderScan/struct.go +++ b/iSolarCloud/AppService/cancelOrderScan/struct.go @@ -6,8 +6,8 @@ package cancelOrderScan import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/cancelParamSetTask/data.go b/iSolarCloud/AppService/cancelParamSetTask/data.go index 77a36cdfc..c3abd3553 100644 --- a/iSolarCloud/AppService/cancelParamSetTask/data.go +++ b/iSolarCloud/AppService/cancelParamSetTask/data.go @@ -2,8 +2,8 @@ package cancelParamSetTask import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/cancelParamSetTask/struct.go b/iSolarCloud/AppService/cancelParamSetTask/struct.go index 45f0f31c9..1a9ca7285 100644 --- a/iSolarCloud/AppService/cancelParamSetTask/struct.go +++ b/iSolarCloud/AppService/cancelParamSetTask/struct.go @@ -6,8 +6,8 @@ package cancelParamSetTask import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/cancelPsSharing/data.go b/iSolarCloud/AppService/cancelPsSharing/data.go index e1570cd52..305641675 100644 --- a/iSolarCloud/AppService/cancelPsSharing/data.go +++ b/iSolarCloud/AppService/cancelPsSharing/data.go @@ -2,8 +2,8 @@ package cancelPsSharing import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/cancelPsSharing/struct.go b/iSolarCloud/AppService/cancelPsSharing/struct.go index 11d9e1c13..1aee422fb 100644 --- a/iSolarCloud/AppService/cancelPsSharing/struct.go +++ b/iSolarCloud/AppService/cancelPsSharing/struct.go @@ -6,8 +6,8 @@ package cancelPsSharing import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/cancelRechargeOrder/data.go b/iSolarCloud/AppService/cancelRechargeOrder/data.go index 1736fb808..9b3a4a247 100644 --- a/iSolarCloud/AppService/cancelRechargeOrder/data.go +++ b/iSolarCloud/AppService/cancelRechargeOrder/data.go @@ -2,8 +2,8 @@ package cancelRechargeOrder import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/cancelRechargeOrder/struct.go b/iSolarCloud/AppService/cancelRechargeOrder/struct.go index 82cca2d9b..48d2c16f8 100644 --- a/iSolarCloud/AppService/cancelRechargeOrder/struct.go +++ b/iSolarCloud/AppService/cancelRechargeOrder/struct.go @@ -6,8 +6,8 @@ package cancelRechargeOrder import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/changRechargeOrderToCancel/data.go b/iSolarCloud/AppService/changRechargeOrderToCancel/data.go index a00e0593c..8951dc4b5 100644 --- a/iSolarCloud/AppService/changRechargeOrderToCancel/data.go +++ b/iSolarCloud/AppService/changRechargeOrderToCancel/data.go @@ -2,8 +2,8 @@ package changRechargeOrderToCancel import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/changRechargeOrderToCancel/struct.go b/iSolarCloud/AppService/changRechargeOrderToCancel/struct.go index cf9813863..d1c8db39a 100644 --- a/iSolarCloud/AppService/changRechargeOrderToCancel/struct.go +++ b/iSolarCloud/AppService/changRechargeOrderToCancel/struct.go @@ -6,8 +6,8 @@ package changRechargeOrderToCancel import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/changeHouseholdUser2Installer/data.go b/iSolarCloud/AppService/changeHouseholdUser2Installer/data.go index d73bf0b20..031d39959 100644 --- a/iSolarCloud/AppService/changeHouseholdUser2Installer/data.go +++ b/iSolarCloud/AppService/changeHouseholdUser2Installer/data.go @@ -2,8 +2,8 @@ package changeHouseholdUser2Installer import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/changeHouseholdUser2Installer/struct.go b/iSolarCloud/AppService/changeHouseholdUser2Installer/struct.go index 2bb3d05af..88080f886 100644 --- a/iSolarCloud/AppService/changeHouseholdUser2Installer/struct.go +++ b/iSolarCloud/AppService/changeHouseholdUser2Installer/struct.go @@ -6,8 +6,8 @@ package changeHouseholdUser2Installer import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/changeRemoteParam/data.go b/iSolarCloud/AppService/changeRemoteParam/data.go index 62b6933ff..e72257138 100644 --- a/iSolarCloud/AppService/changeRemoteParam/data.go +++ b/iSolarCloud/AppService/changeRemoteParam/data.go @@ -2,8 +2,8 @@ package changeRemoteParam import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/changeRemoteParam/struct.go b/iSolarCloud/AppService/changeRemoteParam/struct.go index 85d489b8f..71e26c0c2 100644 --- a/iSolarCloud/AppService/changeRemoteParam/struct.go +++ b/iSolarCloud/AppService/changeRemoteParam/struct.go @@ -6,8 +6,8 @@ package changeRemoteParam import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/checkDealerOrgCode/data.go b/iSolarCloud/AppService/checkDealerOrgCode/data.go index aeb03e93b..86fa008da 100644 --- a/iSolarCloud/AppService/checkDealerOrgCode/data.go +++ b/iSolarCloud/AppService/checkDealerOrgCode/data.go @@ -2,8 +2,8 @@ package checkDealerOrgCode import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/checkDealerOrgCode/struct.go b/iSolarCloud/AppService/checkDealerOrgCode/struct.go index 44772f0e1..43b1bdde9 100644 --- a/iSolarCloud/AppService/checkDealerOrgCode/struct.go +++ b/iSolarCloud/AppService/checkDealerOrgCode/struct.go @@ -6,8 +6,8 @@ package checkDealerOrgCode import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/checkDevSnIsBelongsToUser/data.go b/iSolarCloud/AppService/checkDevSnIsBelongsToUser/data.go index 7cdfc9b41..021532696 100644 --- a/iSolarCloud/AppService/checkDevSnIsBelongsToUser/data.go +++ b/iSolarCloud/AppService/checkDevSnIsBelongsToUser/data.go @@ -2,8 +2,8 @@ package checkDevSnIsBelongsToUser import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/checkDevSnIsBelongsToUser/struct.go b/iSolarCloud/AppService/checkDevSnIsBelongsToUser/struct.go index d39f422ad..56a47ad7b 100644 --- a/iSolarCloud/AppService/checkDevSnIsBelongsToUser/struct.go +++ b/iSolarCloud/AppService/checkDevSnIsBelongsToUser/struct.go @@ -6,8 +6,8 @@ package checkDevSnIsBelongsToUser import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/checkInverterResult/data.go b/iSolarCloud/AppService/checkInverterResult/data.go index 50fdc88b3..f3e553005 100644 --- a/iSolarCloud/AppService/checkInverterResult/data.go +++ b/iSolarCloud/AppService/checkInverterResult/data.go @@ -2,8 +2,8 @@ package checkInverterResult import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/checkInverterResult/struct.go b/iSolarCloud/AppService/checkInverterResult/struct.go index 7a47b1022..24e4652b7 100644 --- a/iSolarCloud/AppService/checkInverterResult/struct.go +++ b/iSolarCloud/AppService/checkInverterResult/struct.go @@ -6,8 +6,8 @@ package checkInverterResult import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/checkIsCanDoParamSet/data.go b/iSolarCloud/AppService/checkIsCanDoParamSet/data.go index 84bb181ff..ea5d6dbde 100644 --- a/iSolarCloud/AppService/checkIsCanDoParamSet/data.go +++ b/iSolarCloud/AppService/checkIsCanDoParamSet/data.go @@ -2,8 +2,8 @@ package checkIsCanDoParamSet import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/checkIsCanDoParamSet/struct.go b/iSolarCloud/AppService/checkIsCanDoParamSet/struct.go index cc978a684..02cee5f49 100644 --- a/iSolarCloud/AppService/checkIsCanDoParamSet/struct.go +++ b/iSolarCloud/AppService/checkIsCanDoParamSet/struct.go @@ -6,8 +6,8 @@ package checkIsCanDoParamSet import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/checkIsIvScan/data.go b/iSolarCloud/AppService/checkIsIvScan/data.go index 069acef77..030fc9453 100644 --- a/iSolarCloud/AppService/checkIsIvScan/data.go +++ b/iSolarCloud/AppService/checkIsIvScan/data.go @@ -2,8 +2,8 @@ package checkIsIvScan import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/checkIsIvScan/struct.go b/iSolarCloud/AppService/checkIsIvScan/struct.go index f86ea16be..5d9c18d46 100644 --- a/iSolarCloud/AppService/checkIsIvScan/struct.go +++ b/iSolarCloud/AppService/checkIsIvScan/struct.go @@ -6,8 +6,8 @@ package checkIsIvScan import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/checkOssObjectExist/data.go b/iSolarCloud/AppService/checkOssObjectExist/data.go index 49a11842d..ad8c720a5 100644 --- a/iSolarCloud/AppService/checkOssObjectExist/data.go +++ b/iSolarCloud/AppService/checkOssObjectExist/data.go @@ -2,8 +2,8 @@ package checkOssObjectExist import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/checkOssObjectExist/struct.go b/iSolarCloud/AppService/checkOssObjectExist/struct.go index 49e2cb92a..361fad178 100644 --- a/iSolarCloud/AppService/checkOssObjectExist/struct.go +++ b/iSolarCloud/AppService/checkOssObjectExist/struct.go @@ -6,8 +6,8 @@ package checkOssObjectExist import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/checkServiceIsConnect/data.go b/iSolarCloud/AppService/checkServiceIsConnect/data.go index c4003232d..34d08902f 100644 --- a/iSolarCloud/AppService/checkServiceIsConnect/data.go +++ b/iSolarCloud/AppService/checkServiceIsConnect/data.go @@ -2,8 +2,8 @@ package checkServiceIsConnect import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/checkServiceIsConnect/struct.go b/iSolarCloud/AppService/checkServiceIsConnect/struct.go index f6b1f46df..af6aa856e 100644 --- a/iSolarCloud/AppService/checkServiceIsConnect/struct.go +++ b/iSolarCloud/AppService/checkServiceIsConnect/struct.go @@ -6,8 +6,8 @@ package checkServiceIsConnect import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/checkTechnicalParameters/data.go b/iSolarCloud/AppService/checkTechnicalParameters/data.go index aeb801698..87b3f4c68 100644 --- a/iSolarCloud/AppService/checkTechnicalParameters/data.go +++ b/iSolarCloud/AppService/checkTechnicalParameters/data.go @@ -2,8 +2,8 @@ package checkTechnicalParameters import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/checkTechnicalParameters/struct.go b/iSolarCloud/AppService/checkTechnicalParameters/struct.go index e67dfd8cf..359a88a41 100644 --- a/iSolarCloud/AppService/checkTechnicalParameters/struct.go +++ b/iSolarCloud/AppService/checkTechnicalParameters/struct.go @@ -6,8 +6,8 @@ package checkTechnicalParameters import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/checkUnitStatus/data.go b/iSolarCloud/AppService/checkUnitStatus/data.go index 74cb60946..e0a4f93c7 100644 --- a/iSolarCloud/AppService/checkUnitStatus/data.go +++ b/iSolarCloud/AppService/checkUnitStatus/data.go @@ -2,8 +2,8 @@ package checkUnitStatus import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/checkUnitStatus/struct.go b/iSolarCloud/AppService/checkUnitStatus/struct.go index 16ea4c811..e74f8a30f 100644 --- a/iSolarCloud/AppService/checkUnitStatus/struct.go +++ b/iSolarCloud/AppService/checkUnitStatus/struct.go @@ -6,8 +6,8 @@ package checkUnitStatus import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/checkUpRechargeDevicePaying/data.go b/iSolarCloud/AppService/checkUpRechargeDevicePaying/data.go index be5a21ba9..db8360b02 100644 --- a/iSolarCloud/AppService/checkUpRechargeDevicePaying/data.go +++ b/iSolarCloud/AppService/checkUpRechargeDevicePaying/data.go @@ -2,8 +2,8 @@ package checkUpRechargeDevicePaying import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/checkUpRechargeDevicePaying/struct.go b/iSolarCloud/AppService/checkUpRechargeDevicePaying/struct.go index d0644273a..1bd6234b7 100644 --- a/iSolarCloud/AppService/checkUpRechargeDevicePaying/struct.go +++ b/iSolarCloud/AppService/checkUpRechargeDevicePaying/struct.go @@ -6,8 +6,8 @@ package checkUpRechargeDevicePaying import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/checkUserAccountUnique/data.go b/iSolarCloud/AppService/checkUserAccountUnique/data.go index 6f52c8167..0592b9ef8 100644 --- a/iSolarCloud/AppService/checkUserAccountUnique/data.go +++ b/iSolarCloud/AppService/checkUserAccountUnique/data.go @@ -2,8 +2,8 @@ package checkUserAccountUnique import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/checkUserAccountUnique/struct.go b/iSolarCloud/AppService/checkUserAccountUnique/struct.go index 8d7f781f5..6fe009fbf 100644 --- a/iSolarCloud/AppService/checkUserAccountUnique/struct.go +++ b/iSolarCloud/AppService/checkUserAccountUnique/struct.go @@ -6,8 +6,8 @@ package checkUserAccountUnique import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/checkUserAccountUniqueAll/data.go b/iSolarCloud/AppService/checkUserAccountUniqueAll/data.go index c6f6f3b94..db6ea6b86 100644 --- a/iSolarCloud/AppService/checkUserAccountUniqueAll/data.go +++ b/iSolarCloud/AppService/checkUserAccountUniqueAll/data.go @@ -2,8 +2,8 @@ package checkUserAccountUniqueAll import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/checkUserAccountUniqueAll/struct.go b/iSolarCloud/AppService/checkUserAccountUniqueAll/struct.go index b832ad905..dbd1de733 100644 --- a/iSolarCloud/AppService/checkUserAccountUniqueAll/struct.go +++ b/iSolarCloud/AppService/checkUserAccountUniqueAll/struct.go @@ -6,8 +6,8 @@ package checkUserAccountUniqueAll import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/checkUserInfoUnique/data.go b/iSolarCloud/AppService/checkUserInfoUnique/data.go index c69a43e87..debe85fa4 100644 --- a/iSolarCloud/AppService/checkUserInfoUnique/data.go +++ b/iSolarCloud/AppService/checkUserInfoUnique/data.go @@ -2,8 +2,8 @@ package checkUserInfoUnique import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/checkUserInfoUnique/struct.go b/iSolarCloud/AppService/checkUserInfoUnique/struct.go index 6be69e88d..b25416bf1 100644 --- a/iSolarCloud/AppService/checkUserInfoUnique/struct.go +++ b/iSolarCloud/AppService/checkUserInfoUnique/struct.go @@ -6,8 +6,8 @@ package checkUserInfoUnique import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/checkUserIsExist/data.go b/iSolarCloud/AppService/checkUserIsExist/data.go index f5ddd2417..9d05fd1bc 100644 --- a/iSolarCloud/AppService/checkUserIsExist/data.go +++ b/iSolarCloud/AppService/checkUserIsExist/data.go @@ -2,8 +2,8 @@ package checkUserIsExist import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/checkUserIsExist/struct.go b/iSolarCloud/AppService/checkUserIsExist/struct.go index c032e1f46..ab2819e67 100644 --- a/iSolarCloud/AppService/checkUserIsExist/struct.go +++ b/iSolarCloud/AppService/checkUserIsExist/struct.go @@ -6,8 +6,8 @@ package checkUserIsExist import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/checkUserListIsExist/data.go b/iSolarCloud/AppService/checkUserListIsExist/data.go index 3b8f14d3e..ecf3892c7 100644 --- a/iSolarCloud/AppService/checkUserListIsExist/data.go +++ b/iSolarCloud/AppService/checkUserListIsExist/data.go @@ -2,8 +2,8 @@ package checkUserListIsExist import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/checkUserListIsExist/struct.go b/iSolarCloud/AppService/checkUserListIsExist/struct.go index a8bfe277f..298c058f4 100644 --- a/iSolarCloud/AppService/checkUserListIsExist/struct.go +++ b/iSolarCloud/AppService/checkUserListIsExist/struct.go @@ -6,8 +6,8 @@ package checkUserListIsExist import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/checkUserPassword/data.go b/iSolarCloud/AppService/checkUserPassword/data.go index e983cc9c2..240ef714d 100644 --- a/iSolarCloud/AppService/checkUserPassword/data.go +++ b/iSolarCloud/AppService/checkUserPassword/data.go @@ -2,8 +2,8 @@ package checkUserPassword import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/checkUserPassword/struct.go b/iSolarCloud/AppService/checkUserPassword/struct.go index 83fce4428..16c1d3b3b 100644 --- a/iSolarCloud/AppService/checkUserPassword/struct.go +++ b/iSolarCloud/AppService/checkUserPassword/struct.go @@ -6,8 +6,8 @@ package checkUserPassword import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/cloudDeploymentRecord/data.go b/iSolarCloud/AppService/cloudDeploymentRecord/data.go index 6cdaa5746..b210c2492 100644 --- a/iSolarCloud/AppService/cloudDeploymentRecord/data.go +++ b/iSolarCloud/AppService/cloudDeploymentRecord/data.go @@ -2,8 +2,8 @@ package cloudDeploymentRecord import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/cloudDeploymentRecord/struct.go b/iSolarCloud/AppService/cloudDeploymentRecord/struct.go index e6ed1d851..d94083a71 100644 --- a/iSolarCloud/AppService/cloudDeploymentRecord/struct.go +++ b/iSolarCloud/AppService/cloudDeploymentRecord/struct.go @@ -6,8 +6,8 @@ package cloudDeploymentRecord import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/comfirmParamModel/data.go b/iSolarCloud/AppService/comfirmParamModel/data.go index 235e04773..1092091c5 100644 --- a/iSolarCloud/AppService/comfirmParamModel/data.go +++ b/iSolarCloud/AppService/comfirmParamModel/data.go @@ -2,8 +2,8 @@ package comfirmParamModel import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/comfirmParamModel/struct.go b/iSolarCloud/AppService/comfirmParamModel/struct.go index 701f4e823..ad2937deb 100644 --- a/iSolarCloud/AppService/comfirmParamModel/struct.go +++ b/iSolarCloud/AppService/comfirmParamModel/struct.go @@ -6,8 +6,8 @@ package comfirmParamModel import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/communicationModuleDetail/data.go b/iSolarCloud/AppService/communicationModuleDetail/data.go index 5a15f0301..e648ad481 100644 --- a/iSolarCloud/AppService/communicationModuleDetail/data.go +++ b/iSolarCloud/AppService/communicationModuleDetail/data.go @@ -2,8 +2,8 @@ package communicationModuleDetail import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/communicationModuleDetail/struct.go b/iSolarCloud/AppService/communicationModuleDetail/struct.go index 0bab9bc53..9bfefecf9 100644 --- a/iSolarCloud/AppService/communicationModuleDetail/struct.go +++ b/iSolarCloud/AppService/communicationModuleDetail/struct.go @@ -6,8 +6,8 @@ package communicationModuleDetail import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/compareValidateCode/data.go b/iSolarCloud/AppService/compareValidateCode/data.go index 67360c818..d4fe713dd 100644 --- a/iSolarCloud/AppService/compareValidateCode/data.go +++ b/iSolarCloud/AppService/compareValidateCode/data.go @@ -2,8 +2,8 @@ package compareValidateCode import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/compareValidateCode/struct.go b/iSolarCloud/AppService/compareValidateCode/struct.go index 39f0a5307..37ab1b985 100644 --- a/iSolarCloud/AppService/compareValidateCode/struct.go +++ b/iSolarCloud/AppService/compareValidateCode/struct.go @@ -6,8 +6,8 @@ package compareValidateCode import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/componentInfo2Cloud/data.go b/iSolarCloud/AppService/componentInfo2Cloud/data.go index fac74cbf7..0eaffde5c 100644 --- a/iSolarCloud/AppService/componentInfo2Cloud/data.go +++ b/iSolarCloud/AppService/componentInfo2Cloud/data.go @@ -2,8 +2,8 @@ package componentInfo2Cloud import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/componentInfo2Cloud/struct.go b/iSolarCloud/AppService/componentInfo2Cloud/struct.go index 939ff7b57..4ff94c3be 100644 --- a/iSolarCloud/AppService/componentInfo2Cloud/struct.go +++ b/iSolarCloud/AppService/componentInfo2Cloud/struct.go @@ -6,8 +6,8 @@ package componentInfo2Cloud import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/confirmFault/data.go b/iSolarCloud/AppService/confirmFault/data.go index 3d1df16ba..ad657b7d4 100644 --- a/iSolarCloud/AppService/confirmFault/data.go +++ b/iSolarCloud/AppService/confirmFault/data.go @@ -2,8 +2,8 @@ package confirmFault import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/confirmFault/struct.go b/iSolarCloud/AppService/confirmFault/struct.go index f1eea1e0d..832a15ea0 100644 --- a/iSolarCloud/AppService/confirmFault/struct.go +++ b/iSolarCloud/AppService/confirmFault/struct.go @@ -6,8 +6,8 @@ package confirmFault import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/confirmIvFault/data.go b/iSolarCloud/AppService/confirmIvFault/data.go index 02a89ff9a..1db1abc91 100644 --- a/iSolarCloud/AppService/confirmIvFault/data.go +++ b/iSolarCloud/AppService/confirmIvFault/data.go @@ -2,8 +2,8 @@ package confirmIvFault import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/confirmIvFault/struct.go b/iSolarCloud/AppService/confirmIvFault/struct.go index a8f50a294..1ed47ee68 100644 --- a/iSolarCloud/AppService/confirmIvFault/struct.go +++ b/iSolarCloud/AppService/confirmIvFault/struct.go @@ -6,8 +6,8 @@ package confirmIvFault import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/confirmReportConfig/data.go b/iSolarCloud/AppService/confirmReportConfig/data.go index 4a28abac3..f85b2eb63 100644 --- a/iSolarCloud/AppService/confirmReportConfig/data.go +++ b/iSolarCloud/AppService/confirmReportConfig/data.go @@ -2,8 +2,8 @@ package confirmReportConfig import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/confirmReportConfig/struct.go b/iSolarCloud/AppService/confirmReportConfig/struct.go index 2d38a36ca..7f0f6e67f 100644 --- a/iSolarCloud/AppService/confirmReportConfig/struct.go +++ b/iSolarCloud/AppService/confirmReportConfig/struct.go @@ -6,8 +6,8 @@ package confirmReportConfig import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/createAppkeyInfo/data.go b/iSolarCloud/AppService/createAppkeyInfo/data.go index 51984d8a5..d4e079fc7 100644 --- a/iSolarCloud/AppService/createAppkeyInfo/data.go +++ b/iSolarCloud/AppService/createAppkeyInfo/data.go @@ -2,8 +2,8 @@ package createAppkeyInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/createAppkeyInfo/struct.go b/iSolarCloud/AppService/createAppkeyInfo/struct.go index d880887fd..f86629b44 100644 --- a/iSolarCloud/AppService/createAppkeyInfo/struct.go +++ b/iSolarCloud/AppService/createAppkeyInfo/struct.go @@ -6,8 +6,8 @@ package createAppkeyInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/createRenewInvoice/data.go b/iSolarCloud/AppService/createRenewInvoice/data.go index 5f21a9acd..994fc00a5 100644 --- a/iSolarCloud/AppService/createRenewInvoice/data.go +++ b/iSolarCloud/AppService/createRenewInvoice/data.go @@ -2,8 +2,8 @@ package createRenewInvoice import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/createRenewInvoice/struct.go b/iSolarCloud/AppService/createRenewInvoice/struct.go index 20fa637cb..45a9e82b2 100644 --- a/iSolarCloud/AppService/createRenewInvoice/struct.go +++ b/iSolarCloud/AppService/createRenewInvoice/struct.go @@ -6,8 +6,8 @@ package createRenewInvoice import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/dealCommandReply/data.go b/iSolarCloud/AppService/dealCommandReply/data.go index fda8f688f..5447d2eb0 100644 --- a/iSolarCloud/AppService/dealCommandReply/data.go +++ b/iSolarCloud/AppService/dealCommandReply/data.go @@ -2,8 +2,8 @@ package dealCommandReply import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/dealCommandReply/struct.go b/iSolarCloud/AppService/dealCommandReply/struct.go index 708805fb2..a1a13e4f2 100644 --- a/iSolarCloud/AppService/dealCommandReply/struct.go +++ b/iSolarCloud/AppService/dealCommandReply/struct.go @@ -6,8 +6,8 @@ package dealCommandReply import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/dealDeletePsFailPsDelete/data.go b/iSolarCloud/AppService/dealDeletePsFailPsDelete/data.go index 7b926af6b..6580baf1c 100644 --- a/iSolarCloud/AppService/dealDeletePsFailPsDelete/data.go +++ b/iSolarCloud/AppService/dealDeletePsFailPsDelete/data.go @@ -2,8 +2,8 @@ package dealDeletePsFailPsDelete import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/dealDeletePsFailPsDelete/struct.go b/iSolarCloud/AppService/dealDeletePsFailPsDelete/struct.go index 6ec7fbb9c..a269b7fee 100644 --- a/iSolarCloud/AppService/dealDeletePsFailPsDelete/struct.go +++ b/iSolarCloud/AppService/dealDeletePsFailPsDelete/struct.go @@ -6,8 +6,8 @@ package dealDeletePsFailPsDelete import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/dealFailRemoteUpgradeSubTasks/data.go b/iSolarCloud/AppService/dealFailRemoteUpgradeSubTasks/data.go index 377932996..0f8edb4b4 100644 --- a/iSolarCloud/AppService/dealFailRemoteUpgradeSubTasks/data.go +++ b/iSolarCloud/AppService/dealFailRemoteUpgradeSubTasks/data.go @@ -2,8 +2,8 @@ package dealFailRemoteUpgradeSubTasks import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/dealFailRemoteUpgradeSubTasks/struct.go b/iSolarCloud/AppService/dealFailRemoteUpgradeSubTasks/struct.go index 20637cbc4..1dbc211f2 100644 --- a/iSolarCloud/AppService/dealFailRemoteUpgradeSubTasks/struct.go +++ b/iSolarCloud/AppService/dealFailRemoteUpgradeSubTasks/struct.go @@ -6,8 +6,8 @@ package dealFailRemoteUpgradeSubTasks import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/dealFailRemoteUpgradeTasks/data.go b/iSolarCloud/AppService/dealFailRemoteUpgradeTasks/data.go index 39d2f5265..d552ae95e 100644 --- a/iSolarCloud/AppService/dealFailRemoteUpgradeTasks/data.go +++ b/iSolarCloud/AppService/dealFailRemoteUpgradeTasks/data.go @@ -2,8 +2,8 @@ package dealFailRemoteUpgradeTasks import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/dealFailRemoteUpgradeTasks/struct.go b/iSolarCloud/AppService/dealFailRemoteUpgradeTasks/struct.go index 582f68fba..04fd9457c 100644 --- a/iSolarCloud/AppService/dealFailRemoteUpgradeTasks/struct.go +++ b/iSolarCloud/AppService/dealFailRemoteUpgradeTasks/struct.go @@ -6,8 +6,8 @@ package dealFailRemoteUpgradeTasks import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/dealFaultOrder/data.go b/iSolarCloud/AppService/dealFaultOrder/data.go index 58a6f35e5..824cadbb6 100644 --- a/iSolarCloud/AppService/dealFaultOrder/data.go +++ b/iSolarCloud/AppService/dealFaultOrder/data.go @@ -2,8 +2,8 @@ package dealFaultOrder import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/dealFaultOrder/struct.go b/iSolarCloud/AppService/dealFaultOrder/struct.go index 68a2f48f4..530eada78 100644 --- a/iSolarCloud/AppService/dealFaultOrder/struct.go +++ b/iSolarCloud/AppService/dealFaultOrder/struct.go @@ -6,8 +6,8 @@ package dealFaultOrder import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/dealGroupStringDisableOrEnable/data.go b/iSolarCloud/AppService/dealGroupStringDisableOrEnable/data.go index 2d9607a27..3b0b7ca1f 100644 --- a/iSolarCloud/AppService/dealGroupStringDisableOrEnable/data.go +++ b/iSolarCloud/AppService/dealGroupStringDisableOrEnable/data.go @@ -2,8 +2,8 @@ package dealGroupStringDisableOrEnable import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/dealGroupStringDisableOrEnable/struct.go b/iSolarCloud/AppService/dealGroupStringDisableOrEnable/struct.go index a8c927b8b..0a7d5cd9b 100644 --- a/iSolarCloud/AppService/dealGroupStringDisableOrEnable/struct.go +++ b/iSolarCloud/AppService/dealGroupStringDisableOrEnable/struct.go @@ -6,8 +6,8 @@ package dealGroupStringDisableOrEnable import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/dealNumberOfServiceCalls2Mysql/data.go b/iSolarCloud/AppService/dealNumberOfServiceCalls2Mysql/data.go index 2f1ba60c1..4487e3ab3 100644 --- a/iSolarCloud/AppService/dealNumberOfServiceCalls2Mysql/data.go +++ b/iSolarCloud/AppService/dealNumberOfServiceCalls2Mysql/data.go @@ -2,8 +2,8 @@ package dealNumberOfServiceCalls2Mysql import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/dealNumberOfServiceCalls2Mysql/struct.go b/iSolarCloud/AppService/dealNumberOfServiceCalls2Mysql/struct.go index f7325c143..e7213e57c 100644 --- a/iSolarCloud/AppService/dealNumberOfServiceCalls2Mysql/struct.go +++ b/iSolarCloud/AppService/dealNumberOfServiceCalls2Mysql/struct.go @@ -6,8 +6,8 @@ package dealNumberOfServiceCalls2Mysql import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/dealParamSettingAfterComplete/data.go b/iSolarCloud/AppService/dealParamSettingAfterComplete/data.go index cc2479bfa..a46121dc2 100644 --- a/iSolarCloud/AppService/dealParamSettingAfterComplete/data.go +++ b/iSolarCloud/AppService/dealParamSettingAfterComplete/data.go @@ -2,8 +2,8 @@ package dealParamSettingAfterComplete import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/dealParamSettingAfterComplete/struct.go b/iSolarCloud/AppService/dealParamSettingAfterComplete/struct.go index cd134ae15..4c49468e0 100644 --- a/iSolarCloud/AppService/dealParamSettingAfterComplete/struct.go +++ b/iSolarCloud/AppService/dealParamSettingAfterComplete/struct.go @@ -6,8 +6,8 @@ package dealParamSettingAfterComplete import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/dealPsDataSupplement/data.go b/iSolarCloud/AppService/dealPsDataSupplement/data.go index b78dda538..5a4435524 100644 --- a/iSolarCloud/AppService/dealPsDataSupplement/data.go +++ b/iSolarCloud/AppService/dealPsDataSupplement/data.go @@ -2,8 +2,8 @@ package dealPsDataSupplement import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/dealPsDataSupplement/struct.go b/iSolarCloud/AppService/dealPsDataSupplement/struct.go index 8f6fbd81a..f46bce5a1 100644 --- a/iSolarCloud/AppService/dealPsDataSupplement/struct.go +++ b/iSolarCloud/AppService/dealPsDataSupplement/struct.go @@ -6,8 +6,8 @@ package dealPsDataSupplement import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/dealPsReportEmailSend/data.go b/iSolarCloud/AppService/dealPsReportEmailSend/data.go index e3bd618a2..e73ed9584 100644 --- a/iSolarCloud/AppService/dealPsReportEmailSend/data.go +++ b/iSolarCloud/AppService/dealPsReportEmailSend/data.go @@ -2,8 +2,8 @@ package dealPsReportEmailSend import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/dealPsReportEmailSend/struct.go b/iSolarCloud/AppService/dealPsReportEmailSend/struct.go index e2614d2b3..89f35cc28 100644 --- a/iSolarCloud/AppService/dealPsReportEmailSend/struct.go +++ b/iSolarCloud/AppService/dealPsReportEmailSend/struct.go @@ -6,8 +6,8 @@ package dealPsReportEmailSend import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/dealRemoteUpgrade/data.go b/iSolarCloud/AppService/dealRemoteUpgrade/data.go index 195cf2809..2ae8b8f1d 100644 --- a/iSolarCloud/AppService/dealRemoteUpgrade/data.go +++ b/iSolarCloud/AppService/dealRemoteUpgrade/data.go @@ -2,8 +2,8 @@ package dealRemoteUpgrade import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/dealRemoteUpgrade/struct.go b/iSolarCloud/AppService/dealRemoteUpgrade/struct.go index 6ee4151a1..b0cd6adc8 100644 --- a/iSolarCloud/AppService/dealRemoteUpgrade/struct.go +++ b/iSolarCloud/AppService/dealRemoteUpgrade/struct.go @@ -6,8 +6,8 @@ package dealRemoteUpgrade import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/dealSnElectrifyCheck/data.go b/iSolarCloud/AppService/dealSnElectrifyCheck/data.go index 87cc9b64c..7a6ead62e 100644 --- a/iSolarCloud/AppService/dealSnElectrifyCheck/data.go +++ b/iSolarCloud/AppService/dealSnElectrifyCheck/data.go @@ -2,8 +2,8 @@ package dealSnElectrifyCheck import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/dealSnElectrifyCheck/struct.go b/iSolarCloud/AppService/dealSnElectrifyCheck/struct.go index ec763ee83..1dc4dd87f 100644 --- a/iSolarCloud/AppService/dealSnElectrifyCheck/struct.go +++ b/iSolarCloud/AppService/dealSnElectrifyCheck/struct.go @@ -6,8 +6,8 @@ package dealSnElectrifyCheck import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/dealSysDeviceSimFlowInfo/data.go b/iSolarCloud/AppService/dealSysDeviceSimFlowInfo/data.go index 204af111f..7e7f45f42 100644 --- a/iSolarCloud/AppService/dealSysDeviceSimFlowInfo/data.go +++ b/iSolarCloud/AppService/dealSysDeviceSimFlowInfo/data.go @@ -2,8 +2,8 @@ package dealSysDeviceSimFlowInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/dealSysDeviceSimFlowInfo/struct.go b/iSolarCloud/AppService/dealSysDeviceSimFlowInfo/struct.go index b90b52998..34cafe88f 100644 --- a/iSolarCloud/AppService/dealSysDeviceSimFlowInfo/struct.go +++ b/iSolarCloud/AppService/dealSysDeviceSimFlowInfo/struct.go @@ -6,8 +6,8 @@ package dealSysDeviceSimFlowInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/dealSysDeviceSimInfo/data.go b/iSolarCloud/AppService/dealSysDeviceSimInfo/data.go index 4c55145cf..2f5cfa50e 100644 --- a/iSolarCloud/AppService/dealSysDeviceSimInfo/data.go +++ b/iSolarCloud/AppService/dealSysDeviceSimInfo/data.go @@ -2,8 +2,8 @@ package dealSysDeviceSimInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/dealSysDeviceSimInfo/struct.go b/iSolarCloud/AppService/dealSysDeviceSimInfo/struct.go index c0aa85370..abbe665f5 100644 --- a/iSolarCloud/AppService/dealSysDeviceSimInfo/struct.go +++ b/iSolarCloud/AppService/dealSysDeviceSimInfo/struct.go @@ -6,8 +6,8 @@ package dealSysDeviceSimInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/definiteTimeDealSnExpRemind/data.go b/iSolarCloud/AppService/definiteTimeDealSnExpRemind/data.go index d4af9396e..39bd6f8d2 100644 --- a/iSolarCloud/AppService/definiteTimeDealSnExpRemind/data.go +++ b/iSolarCloud/AppService/definiteTimeDealSnExpRemind/data.go @@ -2,8 +2,8 @@ package definiteTimeDealSnExpRemind import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/definiteTimeDealSnExpRemind/struct.go b/iSolarCloud/AppService/definiteTimeDealSnExpRemind/struct.go index 95e765e2c..8e76f1fcc 100644 --- a/iSolarCloud/AppService/definiteTimeDealSnExpRemind/struct.go +++ b/iSolarCloud/AppService/definiteTimeDealSnExpRemind/struct.go @@ -6,8 +6,8 @@ package definiteTimeDealSnExpRemind import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/definiteTimeDealSnStatus/data.go b/iSolarCloud/AppService/definiteTimeDealSnStatus/data.go index d46628671..bf14b761c 100644 --- a/iSolarCloud/AppService/definiteTimeDealSnStatus/data.go +++ b/iSolarCloud/AppService/definiteTimeDealSnStatus/data.go @@ -2,8 +2,8 @@ package definiteTimeDealSnStatus import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/definiteTimeDealSnStatus/struct.go b/iSolarCloud/AppService/definiteTimeDealSnStatus/struct.go index 816aefc4c..cf7de9708 100644 --- a/iSolarCloud/AppService/definiteTimeDealSnStatus/struct.go +++ b/iSolarCloud/AppService/definiteTimeDealSnStatus/struct.go @@ -6,8 +6,8 @@ package definiteTimeDealSnStatus import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/delDeviceRepair/data.go b/iSolarCloud/AppService/delDeviceRepair/data.go index fc82dbd0f..edc387557 100644 --- a/iSolarCloud/AppService/delDeviceRepair/data.go +++ b/iSolarCloud/AppService/delDeviceRepair/data.go @@ -2,8 +2,8 @@ package delDeviceRepair import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/delDeviceRepair/struct.go b/iSolarCloud/AppService/delDeviceRepair/struct.go index 235147424..536886f4c 100644 --- a/iSolarCloud/AppService/delDeviceRepair/struct.go +++ b/iSolarCloud/AppService/delDeviceRepair/struct.go @@ -6,8 +6,8 @@ package delDeviceRepair import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/delOperRule/data.go b/iSolarCloud/AppService/delOperRule/data.go index 3af9655af..6771c4025 100644 --- a/iSolarCloud/AppService/delOperRule/data.go +++ b/iSolarCloud/AppService/delOperRule/data.go @@ -2,8 +2,8 @@ package delOperRule import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/delOperRule/struct.go b/iSolarCloud/AppService/delOperRule/struct.go index 57440fa44..dcaec36c5 100644 --- a/iSolarCloud/AppService/delOperRule/struct.go +++ b/iSolarCloud/AppService/delOperRule/struct.go @@ -6,8 +6,8 @@ package delOperRule import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/delayCallApiResidueTimes/data.go b/iSolarCloud/AppService/delayCallApiResidueTimes/data.go index a684481ab..4dbde1486 100644 --- a/iSolarCloud/AppService/delayCallApiResidueTimes/data.go +++ b/iSolarCloud/AppService/delayCallApiResidueTimes/data.go @@ -2,8 +2,8 @@ package delayCallApiResidueTimes import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/delayCallApiResidueTimes/struct.go b/iSolarCloud/AppService/delayCallApiResidueTimes/struct.go index 3ae79759f..1982a9cae 100644 --- a/iSolarCloud/AppService/delayCallApiResidueTimes/struct.go +++ b/iSolarCloud/AppService/delayCallApiResidueTimes/struct.go @@ -6,8 +6,8 @@ package delayCallApiResidueTimes import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/deleteComponent/data.go b/iSolarCloud/AppService/deleteComponent/data.go index 0f222468d..a6059e710 100644 --- a/iSolarCloud/AppService/deleteComponent/data.go +++ b/iSolarCloud/AppService/deleteComponent/data.go @@ -2,8 +2,8 @@ package deleteComponent import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/deleteComponent/struct.go b/iSolarCloud/AppService/deleteComponent/struct.go index 4dcef2965..caca765a2 100644 --- a/iSolarCloud/AppService/deleteComponent/struct.go +++ b/iSolarCloud/AppService/deleteComponent/struct.go @@ -6,8 +6,8 @@ package deleteComponent import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/deleteCustomerEmployee/data.go b/iSolarCloud/AppService/deleteCustomerEmployee/data.go index a3ef57692..9e68528ec 100644 --- a/iSolarCloud/AppService/deleteCustomerEmployee/data.go +++ b/iSolarCloud/AppService/deleteCustomerEmployee/data.go @@ -2,8 +2,8 @@ package deleteCustomerEmployee import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/deleteCustomerEmployee/struct.go b/iSolarCloud/AppService/deleteCustomerEmployee/struct.go index d00f50b48..a5ccfde6f 100644 --- a/iSolarCloud/AppService/deleteCustomerEmployee/struct.go +++ b/iSolarCloud/AppService/deleteCustomerEmployee/struct.go @@ -6,8 +6,8 @@ package deleteCustomerEmployee import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/deleteDeviceAccount/data.go b/iSolarCloud/AppService/deleteDeviceAccount/data.go index 496967890..c81e0bde4 100644 --- a/iSolarCloud/AppService/deleteDeviceAccount/data.go +++ b/iSolarCloud/AppService/deleteDeviceAccount/data.go @@ -2,8 +2,8 @@ package deleteDeviceAccount import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/deleteDeviceAccount/struct.go b/iSolarCloud/AppService/deleteDeviceAccount/struct.go index 839b47130..4d847a69d 100644 --- a/iSolarCloud/AppService/deleteDeviceAccount/struct.go +++ b/iSolarCloud/AppService/deleteDeviceAccount/struct.go @@ -6,8 +6,8 @@ package deleteDeviceAccount import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/deleteDeviceSimById/data.go b/iSolarCloud/AppService/deleteDeviceSimById/data.go index 97fcbc84c..5658a6d3f 100644 --- a/iSolarCloud/AppService/deleteDeviceSimById/data.go +++ b/iSolarCloud/AppService/deleteDeviceSimById/data.go @@ -2,8 +2,8 @@ package deleteDeviceSimById import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/deleteDeviceSimById/struct.go b/iSolarCloud/AppService/deleteDeviceSimById/struct.go index 75c9e5803..fcdbf4698 100644 --- a/iSolarCloud/AppService/deleteDeviceSimById/struct.go +++ b/iSolarCloud/AppService/deleteDeviceSimById/struct.go @@ -6,8 +6,8 @@ package deleteDeviceSimById import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/deleteElectricitySettlementData/data.go b/iSolarCloud/AppService/deleteElectricitySettlementData/data.go index 95250ea53..b80562400 100644 --- a/iSolarCloud/AppService/deleteElectricitySettlementData/data.go +++ b/iSolarCloud/AppService/deleteElectricitySettlementData/data.go @@ -2,8 +2,8 @@ package deleteElectricitySettlementData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/deleteElectricitySettlementData/struct.go b/iSolarCloud/AppService/deleteElectricitySettlementData/struct.go index 7dcf68348..a7b0b704a 100644 --- a/iSolarCloud/AppService/deleteElectricitySettlementData/struct.go +++ b/iSolarCloud/AppService/deleteElectricitySettlementData/struct.go @@ -6,8 +6,8 @@ package deleteElectricitySettlementData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/deleteFaultPlan/data.go b/iSolarCloud/AppService/deleteFaultPlan/data.go index 147a2c3ff..4abe22553 100644 --- a/iSolarCloud/AppService/deleteFaultPlan/data.go +++ b/iSolarCloud/AppService/deleteFaultPlan/data.go @@ -2,8 +2,8 @@ package deleteFaultPlan import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/deleteFaultPlan/struct.go b/iSolarCloud/AppService/deleteFaultPlan/struct.go index b9a769e3c..0172a8f07 100644 --- a/iSolarCloud/AppService/deleteFaultPlan/struct.go +++ b/iSolarCloud/AppService/deleteFaultPlan/struct.go @@ -6,8 +6,8 @@ package deleteFaultPlan import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/deleteFirmwareFiles/data.go b/iSolarCloud/AppService/deleteFirmwareFiles/data.go index 07fefcb62..58a3160da 100644 --- a/iSolarCloud/AppService/deleteFirmwareFiles/data.go +++ b/iSolarCloud/AppService/deleteFirmwareFiles/data.go @@ -2,8 +2,8 @@ package deleteFirmwareFiles import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/deleteFirmwareFiles/struct.go b/iSolarCloud/AppService/deleteFirmwareFiles/struct.go index 7e117ba80..a612d054e 100644 --- a/iSolarCloud/AppService/deleteFirmwareFiles/struct.go +++ b/iSolarCloud/AppService/deleteFirmwareFiles/struct.go @@ -6,8 +6,8 @@ package deleteFirmwareFiles import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/deleteHouseholdEvaluation/data.go b/iSolarCloud/AppService/deleteHouseholdEvaluation/data.go index 2491f4f2c..e5ed61ed9 100644 --- a/iSolarCloud/AppService/deleteHouseholdEvaluation/data.go +++ b/iSolarCloud/AppService/deleteHouseholdEvaluation/data.go @@ -2,8 +2,8 @@ package deleteHouseholdEvaluation import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/deleteHouseholdEvaluation/struct.go b/iSolarCloud/AppService/deleteHouseholdEvaluation/struct.go index 02f9b9729..66068aa1d 100644 --- a/iSolarCloud/AppService/deleteHouseholdEvaluation/struct.go +++ b/iSolarCloud/AppService/deleteHouseholdEvaluation/struct.go @@ -6,8 +6,8 @@ package deleteHouseholdEvaluation import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/deleteHouseholdLeaveMessage/data.go b/iSolarCloud/AppService/deleteHouseholdLeaveMessage/data.go index 51bdc796d..272362cf0 100644 --- a/iSolarCloud/AppService/deleteHouseholdLeaveMessage/data.go +++ b/iSolarCloud/AppService/deleteHouseholdLeaveMessage/data.go @@ -2,8 +2,8 @@ package deleteHouseholdLeaveMessage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/deleteHouseholdLeaveMessage/struct.go b/iSolarCloud/AppService/deleteHouseholdLeaveMessage/struct.go index b0c3f3d0c..1ca7b3032 100644 --- a/iSolarCloud/AppService/deleteHouseholdLeaveMessage/struct.go +++ b/iSolarCloud/AppService/deleteHouseholdLeaveMessage/struct.go @@ -6,8 +6,8 @@ package deleteHouseholdLeaveMessage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/deleteHouseholdWorkOrder/data.go b/iSolarCloud/AppService/deleteHouseholdWorkOrder/data.go index 494683c52..4c7911bde 100644 --- a/iSolarCloud/AppService/deleteHouseholdWorkOrder/data.go +++ b/iSolarCloud/AppService/deleteHouseholdWorkOrder/data.go @@ -2,8 +2,8 @@ package deleteHouseholdWorkOrder import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/deleteHouseholdWorkOrder/struct.go b/iSolarCloud/AppService/deleteHouseholdWorkOrder/struct.go index fd6950e4f..134a2cf60 100644 --- a/iSolarCloud/AppService/deleteHouseholdWorkOrder/struct.go +++ b/iSolarCloud/AppService/deleteHouseholdWorkOrder/struct.go @@ -6,8 +6,8 @@ package deleteHouseholdWorkOrder import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/deleteInverterSnInChnnl/data.go b/iSolarCloud/AppService/deleteInverterSnInChnnl/data.go index 451e7b50e..6e065d6c2 100644 --- a/iSolarCloud/AppService/deleteInverterSnInChnnl/data.go +++ b/iSolarCloud/AppService/deleteInverterSnInChnnl/data.go @@ -2,8 +2,8 @@ package deleteInverterSnInChnnl import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/deleteInverterSnInChnnl/struct.go b/iSolarCloud/AppService/deleteInverterSnInChnnl/struct.go index 9c2ea623c..9f6cb4b17 100644 --- a/iSolarCloud/AppService/deleteInverterSnInChnnl/struct.go +++ b/iSolarCloud/AppService/deleteInverterSnInChnnl/struct.go @@ -6,8 +6,8 @@ package deleteInverterSnInChnnl import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/deleteModuleLog/data.go b/iSolarCloud/AppService/deleteModuleLog/data.go index 939514b27..bb50dd326 100644 --- a/iSolarCloud/AppService/deleteModuleLog/data.go +++ b/iSolarCloud/AppService/deleteModuleLog/data.go @@ -2,8 +2,8 @@ package deleteModuleLog import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/deleteModuleLog/struct.go b/iSolarCloud/AppService/deleteModuleLog/struct.go index c7edf1bbd..8de0de49b 100644 --- a/iSolarCloud/AppService/deleteModuleLog/struct.go +++ b/iSolarCloud/AppService/deleteModuleLog/struct.go @@ -6,8 +6,8 @@ package deleteModuleLog import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/deleteOnDutyInfo/data.go b/iSolarCloud/AppService/deleteOnDutyInfo/data.go index 279e525cb..cce4d5626 100644 --- a/iSolarCloud/AppService/deleteOnDutyInfo/data.go +++ b/iSolarCloud/AppService/deleteOnDutyInfo/data.go @@ -2,8 +2,8 @@ package deleteOnDutyInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/deleteOnDutyInfo/struct.go b/iSolarCloud/AppService/deleteOnDutyInfo/struct.go index e82cf105d..48ecf7493 100644 --- a/iSolarCloud/AppService/deleteOnDutyInfo/struct.go +++ b/iSolarCloud/AppService/deleteOnDutyInfo/struct.go @@ -6,8 +6,8 @@ package deleteOnDutyInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/deleteOperateBillFile/data.go b/iSolarCloud/AppService/deleteOperateBillFile/data.go index bf318b748..f792cfc58 100644 --- a/iSolarCloud/AppService/deleteOperateBillFile/data.go +++ b/iSolarCloud/AppService/deleteOperateBillFile/data.go @@ -2,8 +2,8 @@ package deleteOperateBillFile import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/deleteOperateBillFile/struct.go b/iSolarCloud/AppService/deleteOperateBillFile/struct.go index fcc38466f..2f43d696c 100644 --- a/iSolarCloud/AppService/deleteOperateBillFile/struct.go +++ b/iSolarCloud/AppService/deleteOperateBillFile/struct.go @@ -6,8 +6,8 @@ package deleteOperateBillFile import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/deleteOssObject/data.go b/iSolarCloud/AppService/deleteOssObject/data.go index ca9ad3327..3e64809ad 100644 --- a/iSolarCloud/AppService/deleteOssObject/data.go +++ b/iSolarCloud/AppService/deleteOssObject/data.go @@ -2,8 +2,8 @@ package deleteOssObject import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/deleteOssObject/struct.go b/iSolarCloud/AppService/deleteOssObject/struct.go index 0a4112cab..91ab82050 100644 --- a/iSolarCloud/AppService/deleteOssObject/struct.go +++ b/iSolarCloud/AppService/deleteOssObject/struct.go @@ -6,8 +6,8 @@ package deleteOssObject import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/deletePowerDevicePointById/data.go b/iSolarCloud/AppService/deletePowerDevicePointById/data.go index 4e5e63e77..b38b81963 100644 --- a/iSolarCloud/AppService/deletePowerDevicePointById/data.go +++ b/iSolarCloud/AppService/deletePowerDevicePointById/data.go @@ -2,8 +2,8 @@ package deletePowerDevicePointById import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/deletePowerDevicePointById/struct.go b/iSolarCloud/AppService/deletePowerDevicePointById/struct.go index 5e89b743b..9e33c29a6 100644 --- a/iSolarCloud/AppService/deletePowerDevicePointById/struct.go +++ b/iSolarCloud/AppService/deletePowerDevicePointById/struct.go @@ -6,8 +6,8 @@ package deletePowerDevicePointById import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/deletePowerPicture/data.go b/iSolarCloud/AppService/deletePowerPicture/data.go index f3471a6b7..ede1d45ba 100644 --- a/iSolarCloud/AppService/deletePowerPicture/data.go +++ b/iSolarCloud/AppService/deletePowerPicture/data.go @@ -2,8 +2,8 @@ package deletePowerPicture import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/deletePowerPicture/struct.go b/iSolarCloud/AppService/deletePowerPicture/struct.go index 862664605..875ad7579 100644 --- a/iSolarCloud/AppService/deletePowerPicture/struct.go +++ b/iSolarCloud/AppService/deletePowerPicture/struct.go @@ -6,8 +6,8 @@ package deletePowerPicture import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/deletePowerRobotInfoBySnAndPsId/data.go b/iSolarCloud/AppService/deletePowerRobotInfoBySnAndPsId/data.go index 980043b8c..21a4d53d5 100644 --- a/iSolarCloud/AppService/deletePowerRobotInfoBySnAndPsId/data.go +++ b/iSolarCloud/AppService/deletePowerRobotInfoBySnAndPsId/data.go @@ -2,8 +2,8 @@ package deletePowerRobotInfoBySnAndPsId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/deletePowerRobotInfoBySnAndPsId/struct.go b/iSolarCloud/AppService/deletePowerRobotInfoBySnAndPsId/struct.go index 9df12a39b..e8405b5cd 100644 --- a/iSolarCloud/AppService/deletePowerRobotInfoBySnAndPsId/struct.go +++ b/iSolarCloud/AppService/deletePowerRobotInfoBySnAndPsId/struct.go @@ -6,8 +6,8 @@ package deletePowerRobotInfoBySnAndPsId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/deletePowerRobotSweepStrategy/data.go b/iSolarCloud/AppService/deletePowerRobotSweepStrategy/data.go index a53c8b25c..e8745e519 100644 --- a/iSolarCloud/AppService/deletePowerRobotSweepStrategy/data.go +++ b/iSolarCloud/AppService/deletePowerRobotSweepStrategy/data.go @@ -2,8 +2,8 @@ package deletePowerRobotSweepStrategy import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/deletePowerRobotSweepStrategy/struct.go b/iSolarCloud/AppService/deletePowerRobotSweepStrategy/struct.go index 0b0835eb3..b84c6c369 100644 --- a/iSolarCloud/AppService/deletePowerRobotSweepStrategy/struct.go +++ b/iSolarCloud/AppService/deletePowerRobotSweepStrategy/struct.go @@ -6,8 +6,8 @@ package deletePowerRobotSweepStrategy import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/deleteProductionData/data.go b/iSolarCloud/AppService/deleteProductionData/data.go index c95c4af8d..4b7fc8769 100644 --- a/iSolarCloud/AppService/deleteProductionData/data.go +++ b/iSolarCloud/AppService/deleteProductionData/data.go @@ -2,8 +2,8 @@ package deleteProductionData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/deleteProductionData/struct.go b/iSolarCloud/AppService/deleteProductionData/struct.go index 6c6d7f31d..9a0f43052 100644 --- a/iSolarCloud/AppService/deleteProductionData/struct.go +++ b/iSolarCloud/AppService/deleteProductionData/struct.go @@ -6,8 +6,8 @@ package deleteProductionData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/deletePs/data.go b/iSolarCloud/AppService/deletePs/data.go index 07989e899..bd62cd9ee 100644 --- a/iSolarCloud/AppService/deletePs/data.go +++ b/iSolarCloud/AppService/deletePs/data.go @@ -2,8 +2,8 @@ package deletePs import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/deletePs/struct.go b/iSolarCloud/AppService/deletePs/struct.go index 299096dae..5e9090fb6 100644 --- a/iSolarCloud/AppService/deletePs/struct.go +++ b/iSolarCloud/AppService/deletePs/struct.go @@ -6,8 +6,8 @@ package deletePs import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/deleteRechargeOrder/data.go b/iSolarCloud/AppService/deleteRechargeOrder/data.go index 7535550e0..f4407edf7 100644 --- a/iSolarCloud/AppService/deleteRechargeOrder/data.go +++ b/iSolarCloud/AppService/deleteRechargeOrder/data.go @@ -2,8 +2,8 @@ package deleteRechargeOrder import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/deleteRechargeOrder/struct.go b/iSolarCloud/AppService/deleteRechargeOrder/struct.go index 270b25898..50003f8c5 100644 --- a/iSolarCloud/AppService/deleteRechargeOrder/struct.go +++ b/iSolarCloud/AppService/deleteRechargeOrder/struct.go @@ -6,8 +6,8 @@ package deleteRechargeOrder import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/deleteRegularlyConnectionInfo/data.go b/iSolarCloud/AppService/deleteRegularlyConnectionInfo/data.go index 62c302613..8d6e29d0a 100644 --- a/iSolarCloud/AppService/deleteRegularlyConnectionInfo/data.go +++ b/iSolarCloud/AppService/deleteRegularlyConnectionInfo/data.go @@ -2,8 +2,8 @@ package deleteRegularlyConnectionInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/deleteRegularlyConnectionInfo/struct.go b/iSolarCloud/AppService/deleteRegularlyConnectionInfo/struct.go index de4331c91..e507b889a 100644 --- a/iSolarCloud/AppService/deleteRegularlyConnectionInfo/struct.go +++ b/iSolarCloud/AppService/deleteRegularlyConnectionInfo/struct.go @@ -6,8 +6,8 @@ package deleteRegularlyConnectionInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/deleteReportConfigEmailAddr/data.go b/iSolarCloud/AppService/deleteReportConfigEmailAddr/data.go index d2950b65f..5317eafe9 100644 --- a/iSolarCloud/AppService/deleteReportConfigEmailAddr/data.go +++ b/iSolarCloud/AppService/deleteReportConfigEmailAddr/data.go @@ -2,8 +2,8 @@ package deleteReportConfigEmailAddr import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/deleteReportConfigEmailAddr/struct.go b/iSolarCloud/AppService/deleteReportConfigEmailAddr/struct.go index 8d837adfd..d530f8e98 100644 --- a/iSolarCloud/AppService/deleteReportConfigEmailAddr/struct.go +++ b/iSolarCloud/AppService/deleteReportConfigEmailAddr/struct.go @@ -6,8 +6,8 @@ package deleteReportConfigEmailAddr import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/deleteSysAdvancedParam/data.go b/iSolarCloud/AppService/deleteSysAdvancedParam/data.go index a634fe7fe..d36bd0b69 100644 --- a/iSolarCloud/AppService/deleteSysAdvancedParam/data.go +++ b/iSolarCloud/AppService/deleteSysAdvancedParam/data.go @@ -2,8 +2,8 @@ package deleteSysAdvancedParam import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/deleteSysAdvancedParam/struct.go b/iSolarCloud/AppService/deleteSysAdvancedParam/struct.go index 7530946ec..49d7aa3ec 100644 --- a/iSolarCloud/AppService/deleteSysAdvancedParam/struct.go +++ b/iSolarCloud/AppService/deleteSysAdvancedParam/struct.go @@ -6,8 +6,8 @@ package deleteSysAdvancedParam import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/deleteSysOrgNew/data.go b/iSolarCloud/AppService/deleteSysOrgNew/data.go index db7bf7272..2f3c4a1e0 100644 --- a/iSolarCloud/AppService/deleteSysOrgNew/data.go +++ b/iSolarCloud/AppService/deleteSysOrgNew/data.go @@ -2,8 +2,8 @@ package deleteSysOrgNew import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/deleteSysOrgNew/struct.go b/iSolarCloud/AppService/deleteSysOrgNew/struct.go index 89d6a81bf..daf044abf 100644 --- a/iSolarCloud/AppService/deleteSysOrgNew/struct.go +++ b/iSolarCloud/AppService/deleteSysOrgNew/struct.go @@ -6,8 +6,8 @@ package deleteSysOrgNew import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/deleteTemplate/data.go b/iSolarCloud/AppService/deleteTemplate/data.go index 9e51fcd66..f2202767a 100644 --- a/iSolarCloud/AppService/deleteTemplate/data.go +++ b/iSolarCloud/AppService/deleteTemplate/data.go @@ -2,8 +2,8 @@ package deleteTemplate import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/deleteTemplate/struct.go b/iSolarCloud/AppService/deleteTemplate/struct.go index 2ad2c6a28..5cd1a9869 100644 --- a/iSolarCloud/AppService/deleteTemplate/struct.go +++ b/iSolarCloud/AppService/deleteTemplate/struct.go @@ -6,8 +6,8 @@ package deleteTemplate import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/deleteUserInfoAllByUserId/data.go b/iSolarCloud/AppService/deleteUserInfoAllByUserId/data.go index e1019096a..d4674fb2f 100644 --- a/iSolarCloud/AppService/deleteUserInfoAllByUserId/data.go +++ b/iSolarCloud/AppService/deleteUserInfoAllByUserId/data.go @@ -2,8 +2,8 @@ package deleteUserInfoAllByUserId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/deleteUserInfoAllByUserId/struct.go b/iSolarCloud/AppService/deleteUserInfoAllByUserId/struct.go index b3b94f8c9..b862ca77d 100644 --- a/iSolarCloud/AppService/deleteUserInfoAllByUserId/struct.go +++ b/iSolarCloud/AppService/deleteUserInfoAllByUserId/struct.go @@ -6,8 +6,8 @@ package deleteUserInfoAllByUserId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/deviceInputDiscreteDeleteTime/data.go b/iSolarCloud/AppService/deviceInputDiscreteDeleteTime/data.go index a84ea3361..fcd9cab53 100644 --- a/iSolarCloud/AppService/deviceInputDiscreteDeleteTime/data.go +++ b/iSolarCloud/AppService/deviceInputDiscreteDeleteTime/data.go @@ -2,8 +2,8 @@ package deviceInputDiscreteDeleteTime import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/deviceInputDiscreteDeleteTime/struct.go b/iSolarCloud/AppService/deviceInputDiscreteDeleteTime/struct.go index e0f3772a7..4ce7bc676 100644 --- a/iSolarCloud/AppService/deviceInputDiscreteDeleteTime/struct.go +++ b/iSolarCloud/AppService/deviceInputDiscreteDeleteTime/struct.go @@ -6,8 +6,8 @@ package deviceInputDiscreteDeleteTime import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/deviceInputDiscreteGetTime/data.go b/iSolarCloud/AppService/deviceInputDiscreteGetTime/data.go index 710ad8b1e..ba41db5a0 100644 --- a/iSolarCloud/AppService/deviceInputDiscreteGetTime/data.go +++ b/iSolarCloud/AppService/deviceInputDiscreteGetTime/data.go @@ -2,8 +2,8 @@ package deviceInputDiscreteGetTime import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/deviceInputDiscreteGetTime/struct.go b/iSolarCloud/AppService/deviceInputDiscreteGetTime/struct.go index 28d6f7104..e301e09ea 100644 --- a/iSolarCloud/AppService/deviceInputDiscreteGetTime/struct.go +++ b/iSolarCloud/AppService/deviceInputDiscreteGetTime/struct.go @@ -6,8 +6,8 @@ package deviceInputDiscreteGetTime import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/deviceInputDiscreteInsertTime/data.go b/iSolarCloud/AppService/deviceInputDiscreteInsertTime/data.go index 863905791..0c3fc39e2 100644 --- a/iSolarCloud/AppService/deviceInputDiscreteInsertTime/data.go +++ b/iSolarCloud/AppService/deviceInputDiscreteInsertTime/data.go @@ -2,8 +2,8 @@ package deviceInputDiscreteInsertTime import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/deviceInputDiscreteInsertTime/struct.go b/iSolarCloud/AppService/deviceInputDiscreteInsertTime/struct.go index 443991c9a..a96186deb 100644 --- a/iSolarCloud/AppService/deviceInputDiscreteInsertTime/struct.go +++ b/iSolarCloud/AppService/deviceInputDiscreteInsertTime/struct.go @@ -6,8 +6,8 @@ package deviceInputDiscreteInsertTime import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/deviceInputDiscreteUpdateTime/data.go b/iSolarCloud/AppService/deviceInputDiscreteUpdateTime/data.go index c29eadbe7..47d3eee06 100644 --- a/iSolarCloud/AppService/deviceInputDiscreteUpdateTime/data.go +++ b/iSolarCloud/AppService/deviceInputDiscreteUpdateTime/data.go @@ -2,8 +2,8 @@ package deviceInputDiscreteUpdateTime import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/deviceInputDiscreteUpdateTime/struct.go b/iSolarCloud/AppService/deviceInputDiscreteUpdateTime/struct.go index dcd81aff8..35c1f49af 100644 --- a/iSolarCloud/AppService/deviceInputDiscreteUpdateTime/struct.go +++ b/iSolarCloud/AppService/deviceInputDiscreteUpdateTime/struct.go @@ -6,8 +6,8 @@ package deviceInputDiscreteUpdateTime import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/devicePointsDataFromMySql/data.go b/iSolarCloud/AppService/devicePointsDataFromMySql/data.go index 1d817028f..bbf90ddcc 100644 --- a/iSolarCloud/AppService/devicePointsDataFromMySql/data.go +++ b/iSolarCloud/AppService/devicePointsDataFromMySql/data.go @@ -2,8 +2,8 @@ package devicePointsDataFromMySql import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -75,10 +75,10 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsKey.String() - entries.StructToDataMap(*e, e.Request.PsKey.String(), apiReflect.NewEndPointPath(e.Request.PsKey.String())) + entries.StructToDataMap(*e, e.Request.PsKey.String(), GoStruct.NewEndPointPath(e.Request.PsKey.String())) } return entries diff --git a/iSolarCloud/AppService/devicePointsDataFromMySql/struct.go b/iSolarCloud/AppService/devicePointsDataFromMySql/struct.go index f546bd850..98f96dbf4 100644 --- a/iSolarCloud/AppService/devicePointsDataFromMySql/struct.go +++ b/iSolarCloud/AppService/devicePointsDataFromMySql/struct.go @@ -6,8 +6,8 @@ package devicePointsDataFromMySql import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/deviceReplace/data.go b/iSolarCloud/AppService/deviceReplace/data.go index fb33bcfff..8192631cb 100644 --- a/iSolarCloud/AppService/deviceReplace/data.go +++ b/iSolarCloud/AppService/deviceReplace/data.go @@ -2,8 +2,8 @@ package deviceReplace import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/deviceReplace/struct.go b/iSolarCloud/AppService/deviceReplace/struct.go index e24c09213..2e3f99573 100644 --- a/iSolarCloud/AppService/deviceReplace/struct.go +++ b/iSolarCloud/AppService/deviceReplace/struct.go @@ -6,8 +6,8 @@ package deviceReplace import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/editDeviceRepair/data.go b/iSolarCloud/AppService/editDeviceRepair/data.go index 015443c18..dd16df3af 100644 --- a/iSolarCloud/AppService/editDeviceRepair/data.go +++ b/iSolarCloud/AppService/editDeviceRepair/data.go @@ -2,8 +2,8 @@ package editDeviceRepair import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/editDeviceRepair/struct.go b/iSolarCloud/AppService/editDeviceRepair/struct.go index cc64ff8b0..f46428a46 100644 --- a/iSolarCloud/AppService/editDeviceRepair/struct.go +++ b/iSolarCloud/AppService/editDeviceRepair/struct.go @@ -6,8 +6,8 @@ package editDeviceRepair import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/editOperRule/data.go b/iSolarCloud/AppService/editOperRule/data.go index 662c4401c..88416ee09 100644 --- a/iSolarCloud/AppService/editOperRule/data.go +++ b/iSolarCloud/AppService/editOperRule/data.go @@ -2,8 +2,8 @@ package editOperRule import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/editOperRule/struct.go b/iSolarCloud/AppService/editOperRule/struct.go index 9670ffb6c..b4650a37b 100644 --- a/iSolarCloud/AppService/editOperRule/struct.go +++ b/iSolarCloud/AppService/editOperRule/struct.go @@ -6,8 +6,8 @@ package editOperRule import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/energyPovertyAlleviation/data.go b/iSolarCloud/AppService/energyPovertyAlleviation/data.go index a7bef66e9..ca128f7a7 100644 --- a/iSolarCloud/AppService/energyPovertyAlleviation/data.go +++ b/iSolarCloud/AppService/energyPovertyAlleviation/data.go @@ -2,8 +2,8 @@ package energyPovertyAlleviation import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/energyPovertyAlleviation/struct.go b/iSolarCloud/AppService/energyPovertyAlleviation/struct.go index 70bff60a1..dbdc291f7 100644 --- a/iSolarCloud/AppService/energyPovertyAlleviation/struct.go +++ b/iSolarCloud/AppService/energyPovertyAlleviation/struct.go @@ -6,8 +6,8 @@ package energyPovertyAlleviation import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/energyTrend/data.go b/iSolarCloud/AppService/energyTrend/data.go index 9095a7c73..a9b2e86f0 100644 --- a/iSolarCloud/AppService/energyTrend/data.go +++ b/iSolarCloud/AppService/energyTrend/data.go @@ -2,8 +2,8 @@ package energyTrend import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -54,7 +54,7 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsId.String() entries.StructToDataMap(*e, "system", nil) diff --git a/iSolarCloud/AppService/energyTrend/struct.go b/iSolarCloud/AppService/energyTrend/struct.go index f6932d0c1..e8e562bc0 100644 --- a/iSolarCloud/AppService/energyTrend/struct.go +++ b/iSolarCloud/AppService/energyTrend/struct.go @@ -6,8 +6,8 @@ package energyTrend import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/exportParamSettingValPDF/data.go b/iSolarCloud/AppService/exportParamSettingValPDF/data.go index 3edacd264..6c81bcf74 100644 --- a/iSolarCloud/AppService/exportParamSettingValPDF/data.go +++ b/iSolarCloud/AppService/exportParamSettingValPDF/data.go @@ -2,8 +2,8 @@ package exportParamSettingValPDF import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/exportParamSettingValPDF/struct.go b/iSolarCloud/AppService/exportParamSettingValPDF/struct.go index b39bcfe6c..719da71a0 100644 --- a/iSolarCloud/AppService/exportParamSettingValPDF/struct.go +++ b/iSolarCloud/AppService/exportParamSettingValPDF/struct.go @@ -6,8 +6,8 @@ package exportParamSettingValPDF import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/exportPlantReportPDF/data.go b/iSolarCloud/AppService/exportPlantReportPDF/data.go index 26796a0ec..33d7017f3 100644 --- a/iSolarCloud/AppService/exportPlantReportPDF/data.go +++ b/iSolarCloud/AppService/exportPlantReportPDF/data.go @@ -2,8 +2,8 @@ package exportPlantReportPDF import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/exportPlantReportPDF/struct.go b/iSolarCloud/AppService/exportPlantReportPDF/struct.go index c34cf945e..391b74e7c 100644 --- a/iSolarCloud/AppService/exportPlantReportPDF/struct.go +++ b/iSolarCloud/AppService/exportPlantReportPDF/struct.go @@ -6,8 +6,8 @@ package exportPlantReportPDF import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/faultAutoClose/data.go b/iSolarCloud/AppService/faultAutoClose/data.go index 431c09f66..db74b65a5 100644 --- a/iSolarCloud/AppService/faultAutoClose/data.go +++ b/iSolarCloud/AppService/faultAutoClose/data.go @@ -2,8 +2,8 @@ package faultAutoClose import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/faultAutoClose/struct.go b/iSolarCloud/AppService/faultAutoClose/struct.go index 7f9224d3a..4a2080526 100644 --- a/iSolarCloud/AppService/faultAutoClose/struct.go +++ b/iSolarCloud/AppService/faultAutoClose/struct.go @@ -6,8 +6,8 @@ package faultAutoClose import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/faultCloseRemindOrderHandler/data.go b/iSolarCloud/AppService/faultCloseRemindOrderHandler/data.go index 2fadd13a1..f56705eef 100644 --- a/iSolarCloud/AppService/faultCloseRemindOrderHandler/data.go +++ b/iSolarCloud/AppService/faultCloseRemindOrderHandler/data.go @@ -2,8 +2,8 @@ package faultCloseRemindOrderHandler import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/faultCloseRemindOrderHandler/struct.go b/iSolarCloud/AppService/faultCloseRemindOrderHandler/struct.go index ab5fad487..9fb87d04d 100644 --- a/iSolarCloud/AppService/faultCloseRemindOrderHandler/struct.go +++ b/iSolarCloud/AppService/faultCloseRemindOrderHandler/struct.go @@ -6,8 +6,8 @@ package faultCloseRemindOrderHandler import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/findCodeValueList/data.go b/iSolarCloud/AppService/findCodeValueList/data.go index 79806daec..1e7d4e42f 100644 --- a/iSolarCloud/AppService/findCodeValueList/data.go +++ b/iSolarCloud/AppService/findCodeValueList/data.go @@ -2,8 +2,8 @@ package findCodeValueList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -38,7 +38,7 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsId.String() entries.StructToDataMap(*e, "system", nil) diff --git a/iSolarCloud/AppService/findCodeValueList/struct.go b/iSolarCloud/AppService/findCodeValueList/struct.go index 0ed48df54..a20b01d72 100644 --- a/iSolarCloud/AppService/findCodeValueList/struct.go +++ b/iSolarCloud/AppService/findCodeValueList/struct.go @@ -6,8 +6,8 @@ package findCodeValueList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/findEmgOrgInfo/data.go b/iSolarCloud/AppService/findEmgOrgInfo/data.go index cb08d533f..ab0da5ef2 100644 --- a/iSolarCloud/AppService/findEmgOrgInfo/data.go +++ b/iSolarCloud/AppService/findEmgOrgInfo/data.go @@ -2,8 +2,8 @@ package findEmgOrgInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/findEmgOrgInfo/struct.go b/iSolarCloud/AppService/findEmgOrgInfo/struct.go index a97c5a4f0..e6f3fb348 100644 --- a/iSolarCloud/AppService/findEmgOrgInfo/struct.go +++ b/iSolarCloud/AppService/findEmgOrgInfo/struct.go @@ -6,8 +6,8 @@ package findEmgOrgInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/findEnvironmentInfo/data.go b/iSolarCloud/AppService/findEnvironmentInfo/data.go index a7f803525..51cb329df 100644 --- a/iSolarCloud/AppService/findEnvironmentInfo/data.go +++ b/iSolarCloud/AppService/findEnvironmentInfo/data.go @@ -2,8 +2,8 @@ package findEnvironmentInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/findEnvironmentInfo/struct.go b/iSolarCloud/AppService/findEnvironmentInfo/struct.go index 24c2d0c67..7323e898b 100644 --- a/iSolarCloud/AppService/findEnvironmentInfo/struct.go +++ b/iSolarCloud/AppService/findEnvironmentInfo/struct.go @@ -6,8 +6,8 @@ package findEnvironmentInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/findFromHbaseAndRedis/data.go b/iSolarCloud/AppService/findFromHbaseAndRedis/data.go index 8edf7eff7..6bcd6aaa0 100644 --- a/iSolarCloud/AppService/findFromHbaseAndRedis/data.go +++ b/iSolarCloud/AppService/findFromHbaseAndRedis/data.go @@ -2,8 +2,8 @@ package findFromHbaseAndRedis import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/findFromHbaseAndRedis/struct.go b/iSolarCloud/AppService/findFromHbaseAndRedis/struct.go index c4610558f..91a89d195 100644 --- a/iSolarCloud/AppService/findFromHbaseAndRedis/struct.go +++ b/iSolarCloud/AppService/findFromHbaseAndRedis/struct.go @@ -6,8 +6,8 @@ package findFromHbaseAndRedis import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/findInfoByuuid/data.go b/iSolarCloud/AppService/findInfoByuuid/data.go index 42654c8a9..39f91decb 100644 --- a/iSolarCloud/AppService/findInfoByuuid/data.go +++ b/iSolarCloud/AppService/findInfoByuuid/data.go @@ -2,8 +2,8 @@ package findInfoByuuid import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/findInfoByuuid/struct.go b/iSolarCloud/AppService/findInfoByuuid/struct.go index 1b06f75d4..4f66550e7 100644 --- a/iSolarCloud/AppService/findInfoByuuid/struct.go +++ b/iSolarCloud/AppService/findInfoByuuid/struct.go @@ -6,8 +6,8 @@ package findInfoByuuid import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/findLossAnalysisList/data.go b/iSolarCloud/AppService/findLossAnalysisList/data.go index a0d3e6c10..f32e63eb2 100644 --- a/iSolarCloud/AppService/findLossAnalysisList/data.go +++ b/iSolarCloud/AppService/findLossAnalysisList/data.go @@ -2,8 +2,8 @@ package findLossAnalysisList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/findLossAnalysisList/struct.go b/iSolarCloud/AppService/findLossAnalysisList/struct.go index 27ca364fc..a41d87dda 100644 --- a/iSolarCloud/AppService/findLossAnalysisList/struct.go +++ b/iSolarCloud/AppService/findLossAnalysisList/struct.go @@ -6,8 +6,8 @@ package findLossAnalysisList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/findOnDutyInfo/data.go b/iSolarCloud/AppService/findOnDutyInfo/data.go index 5f4d68c08..44c263d88 100644 --- a/iSolarCloud/AppService/findOnDutyInfo/data.go +++ b/iSolarCloud/AppService/findOnDutyInfo/data.go @@ -2,8 +2,8 @@ package findOnDutyInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/findOnDutyInfo/struct.go b/iSolarCloud/AppService/findOnDutyInfo/struct.go index 2b6f31da5..3842682be 100644 --- a/iSolarCloud/AppService/findOnDutyInfo/struct.go +++ b/iSolarCloud/AppService/findOnDutyInfo/struct.go @@ -6,8 +6,8 @@ package findOnDutyInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/findPsType/data.go b/iSolarCloud/AppService/findPsType/data.go index 0d54a85b0..7a99b7d13 100644 --- a/iSolarCloud/AppService/findPsType/data.go +++ b/iSolarCloud/AppService/findPsType/data.go @@ -2,8 +2,8 @@ package findPsType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -38,10 +38,10 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsId.String() - entries.StructToDataMap(*e, e.Request.PsId.String(), apiReflect.NewEndPointPath(e.Request.PsId.String())) + entries.StructToDataMap(*e, e.Request.PsId.String(), GoStruct.NewEndPointPath(e.Request.PsId.String())) } return entries diff --git a/iSolarCloud/AppService/findPsType/struct.go b/iSolarCloud/AppService/findPsType/struct.go index 7b60dea8c..a8349f8f5 100644 --- a/iSolarCloud/AppService/findPsType/struct.go +++ b/iSolarCloud/AppService/findPsType/struct.go @@ -6,8 +6,8 @@ package findPsType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/findSingleStationPR/data.go b/iSolarCloud/AppService/findSingleStationPR/data.go index 78c7a16ea..c0bc5a256 100644 --- a/iSolarCloud/AppService/findSingleStationPR/data.go +++ b/iSolarCloud/AppService/findSingleStationPR/data.go @@ -2,8 +2,8 @@ package findSingleStationPR import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/findSingleStationPR/struct.go b/iSolarCloud/AppService/findSingleStationPR/struct.go index 2d5b48b11..478a49683 100644 --- a/iSolarCloud/AppService/findSingleStationPR/struct.go +++ b/iSolarCloud/AppService/findSingleStationPR/struct.go @@ -6,8 +6,8 @@ package findSingleStationPR import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/findUserPassword/data.go b/iSolarCloud/AppService/findUserPassword/data.go index f3ac8d608..15aba8edf 100644 --- a/iSolarCloud/AppService/findUserPassword/data.go +++ b/iSolarCloud/AppService/findUserPassword/data.go @@ -2,8 +2,8 @@ package findUserPassword import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/findUserPassword/struct.go b/iSolarCloud/AppService/findUserPassword/struct.go index 79dd3a986..f8b231080 100644 --- a/iSolarCloud/AppService/findUserPassword/struct.go +++ b/iSolarCloud/AppService/findUserPassword/struct.go @@ -6,8 +6,8 @@ package findUserPassword import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/genTLSUserSigByUserAccount/data.go b/iSolarCloud/AppService/genTLSUserSigByUserAccount/data.go index cfa7c9364..6e00ff201 100644 --- a/iSolarCloud/AppService/genTLSUserSigByUserAccount/data.go +++ b/iSolarCloud/AppService/genTLSUserSigByUserAccount/data.go @@ -2,8 +2,8 @@ package genTLSUserSigByUserAccount import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/genTLSUserSigByUserAccount/struct.go b/iSolarCloud/AppService/genTLSUserSigByUserAccount/struct.go index db6a9522d..d26c54b86 100644 --- a/iSolarCloud/AppService/genTLSUserSigByUserAccount/struct.go +++ b/iSolarCloud/AppService/genTLSUserSigByUserAccount/struct.go @@ -6,8 +6,8 @@ package genTLSUserSigByUserAccount import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/generateRandomPassword/data.go b/iSolarCloud/AppService/generateRandomPassword/data.go index a064ced9a..e648e9a22 100644 --- a/iSolarCloud/AppService/generateRandomPassword/data.go +++ b/iSolarCloud/AppService/generateRandomPassword/data.go @@ -2,8 +2,8 @@ package generateRandomPassword import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/generateRandomPassword/struct.go b/iSolarCloud/AppService/generateRandomPassword/struct.go index 151c855d4..a26cd4200 100644 --- a/iSolarCloud/AppService/generateRandomPassword/struct.go +++ b/iSolarCloud/AppService/generateRandomPassword/struct.go @@ -6,8 +6,8 @@ package generateRandomPassword import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getAPIServiceInfo/data.go b/iSolarCloud/AppService/getAPIServiceInfo/data.go index ddf01c2e6..05baa21ad 100644 --- a/iSolarCloud/AppService/getAPIServiceInfo/data.go +++ b/iSolarCloud/AppService/getAPIServiceInfo/data.go @@ -2,8 +2,8 @@ package getAPIServiceInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getAPIServiceInfo/struct.go b/iSolarCloud/AppService/getAPIServiceInfo/struct.go index 847a15f61..450b8440d 100644 --- a/iSolarCloud/AppService/getAPIServiceInfo/struct.go +++ b/iSolarCloud/AppService/getAPIServiceInfo/struct.go @@ -6,8 +6,8 @@ package getAPIServiceInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getAccessedPermission/data.go b/iSolarCloud/AppService/getAccessedPermission/data.go index 8bfb488bf..70570c16f 100644 --- a/iSolarCloud/AppService/getAccessedPermission/data.go +++ b/iSolarCloud/AppService/getAccessedPermission/data.go @@ -2,8 +2,8 @@ package getAccessedPermission import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getAccessedPermission/struct.go b/iSolarCloud/AppService/getAccessedPermission/struct.go index 2089fb49d..6f2b76900 100644 --- a/iSolarCloud/AppService/getAccessedPermission/struct.go +++ b/iSolarCloud/AppService/getAccessedPermission/struct.go @@ -6,8 +6,8 @@ package getAccessedPermission import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getAllDeviceByPsId/data.go b/iSolarCloud/AppService/getAllDeviceByPsId/data.go index e37333329..f1189ac30 100644 --- a/iSolarCloud/AppService/getAllDeviceByPsId/data.go +++ b/iSolarCloud/AppService/getAllDeviceByPsId/data.go @@ -2,8 +2,8 @@ package getAllDeviceByPsId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -38,10 +38,10 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsId.String() - entries.StructToDataMap(*e, e.Request.PsId.String(), apiReflect.NewEndPointPath(e.Request.PsId.String())) + entries.StructToDataMap(*e, e.Request.PsId.String(), GoStruct.NewEndPointPath(e.Request.PsId.String())) } return entries diff --git a/iSolarCloud/AppService/getAllDeviceByPsId/struct.go b/iSolarCloud/AppService/getAllDeviceByPsId/struct.go index 7688c7d91..de4fd8400 100644 --- a/iSolarCloud/AppService/getAllDeviceByPsId/struct.go +++ b/iSolarCloud/AppService/getAllDeviceByPsId/struct.go @@ -6,8 +6,8 @@ package getAllDeviceByPsId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getAllPowerDeviceSetName/data.go b/iSolarCloud/AppService/getAllPowerDeviceSetName/data.go index 949231ee0..751a2f7d4 100644 --- a/iSolarCloud/AppService/getAllPowerDeviceSetName/data.go +++ b/iSolarCloud/AppService/getAllPowerDeviceSetName/data.go @@ -2,8 +2,8 @@ package getAllPowerDeviceSetName import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -15,7 +15,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getAllPowerDeviceSetName/struct.go b/iSolarCloud/AppService/getAllPowerDeviceSetName/struct.go index 874dbc494..f9031c377 100644 --- a/iSolarCloud/AppService/getAllPowerDeviceSetName/struct.go +++ b/iSolarCloud/AppService/getAllPowerDeviceSetName/struct.go @@ -6,8 +6,8 @@ package getAllPowerDeviceSetName import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getAllPowerRobotViewInfoByPsId/data.go b/iSolarCloud/AppService/getAllPowerRobotViewInfoByPsId/data.go index 9f095d40c..d4089b13b 100644 --- a/iSolarCloud/AppService/getAllPowerRobotViewInfoByPsId/data.go +++ b/iSolarCloud/AppService/getAllPowerRobotViewInfoByPsId/data.go @@ -2,21 +2,21 @@ package getAllPowerRobotViewInfoByPsId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" - "github.com/MickMake/GoUnify/Only" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" + "github.com/MickMake/GoUnify/Only" ) const Url = "/v1/devService/getAllPowerRobotViewInfoByPsId" const Disabled = false type RequestData struct { - // DeviceType valueTypes.String `json:"device_type" required:"true"` + PsId valueTypes.PsId `json:"ps_id" required:"true"` } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -26,7 +26,7 @@ func (rd RequestData) Help() string { type ResultData struct { - Dummy valueTypes.String `json:"dummy"` + ViewInfoList []interface{} `json:"viewInfoList"` } func (e *ResultData) IsValid() error { @@ -34,30 +34,11 @@ func (e *ResultData) IsValid() error { return err } -//type DecodeResultData ResultData -// -//func (e *ResultData) UnmarshalJSON(data []byte) error { -// var err error -// -// for range Only.Once { -// if len(data) == 0 { -// break -// } -// var pd DecodeResultData -// -// // Store ResultData -// _ = json.Unmarshal(data, &pd) -// e.Dummy = pd.Dummy -// } -// -// return err -//} - func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - entries.StructToDataMap(*e, "system", nil) + entries.StructToDataMap(*e, e.Request.PsId.String(), GoStruct.NewEndPointPath(e.Request.PsId.String())) } return entries diff --git a/iSolarCloud/AppService/getAllPowerRobotViewInfoByPsId/struct.go b/iSolarCloud/AppService/getAllPowerRobotViewInfoByPsId/struct.go index d1229079b..fe38fa6dd 100644 --- a/iSolarCloud/AppService/getAllPowerRobotViewInfoByPsId/struct.go +++ b/iSolarCloud/AppService/getAllPowerRobotViewInfoByPsId/struct.go @@ -6,8 +6,8 @@ package getAllPowerRobotViewInfoByPsId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getAllPsIdByOrgIds/data.go b/iSolarCloud/AppService/getAllPsIdByOrgIds/data.go index 323994a36..b5c0288c9 100644 --- a/iSolarCloud/AppService/getAllPsIdByOrgIds/data.go +++ b/iSolarCloud/AppService/getAllPsIdByOrgIds/data.go @@ -2,8 +2,8 @@ package getAllPsIdByOrgIds import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -36,10 +36,10 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.OrgIds.String() - entries.StructToDataMap(*e, e.Request.OrgIds.String(), apiReflect.NewEndPointPath(e.Request.OrgIds.String())) + entries.StructToDataMap(*e, e.Request.OrgIds.String(), GoStruct.NewEndPointPath(e.Request.OrgIds.String())) } return entries diff --git a/iSolarCloud/AppService/getAllPsIdByOrgIds/struct.go b/iSolarCloud/AppService/getAllPsIdByOrgIds/struct.go index 2aefa84f5..f9984c304 100644 --- a/iSolarCloud/AppService/getAllPsIdByOrgIds/struct.go +++ b/iSolarCloud/AppService/getAllPsIdByOrgIds/struct.go @@ -6,8 +6,8 @@ package getAllPsIdByOrgIds import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getAllUserRemindCount/data.go b/iSolarCloud/AppService/getAllUserRemindCount/data.go index 825d2f426..0b75cbad1 100644 --- a/iSolarCloud/AppService/getAllUserRemindCount/data.go +++ b/iSolarCloud/AppService/getAllUserRemindCount/data.go @@ -2,8 +2,8 @@ package getAllUserRemindCount import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getAllUserRemindCount/struct.go b/iSolarCloud/AppService/getAllUserRemindCount/struct.go index f766e4321..94b9903b5 100644 --- a/iSolarCloud/AppService/getAllUserRemindCount/struct.go +++ b/iSolarCloud/AppService/getAllUserRemindCount/struct.go @@ -6,8 +6,8 @@ package getAllUserRemindCount import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getAndOutletsAndUnit/data.go b/iSolarCloud/AppService/getAndOutletsAndUnit/data.go index 18783c9e3..2dbed1b81 100644 --- a/iSolarCloud/AppService/getAndOutletsAndUnit/data.go +++ b/iSolarCloud/AppService/getAndOutletsAndUnit/data.go @@ -2,8 +2,8 @@ package getAndOutletsAndUnit import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getAndOutletsAndUnit/struct.go b/iSolarCloud/AppService/getAndOutletsAndUnit/struct.go index e31274c8c..6a2316748 100644 --- a/iSolarCloud/AppService/getAndOutletsAndUnit/struct.go +++ b/iSolarCloud/AppService/getAndOutletsAndUnit/struct.go @@ -6,8 +6,8 @@ package getAndOutletsAndUnit import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getApiCallsForAppkeys/data.go b/iSolarCloud/AppService/getApiCallsForAppkeys/data.go index 8007e882e..5622dddbc 100644 --- a/iSolarCloud/AppService/getApiCallsForAppkeys/data.go +++ b/iSolarCloud/AppService/getApiCallsForAppkeys/data.go @@ -2,8 +2,8 @@ package getApiCallsForAppkeys import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getApiCallsForAppkeys/struct.go b/iSolarCloud/AppService/getApiCallsForAppkeys/struct.go index 58d414fbb..a61d51864 100644 --- a/iSolarCloud/AppService/getApiCallsForAppkeys/struct.go +++ b/iSolarCloud/AppService/getApiCallsForAppkeys/struct.go @@ -6,8 +6,8 @@ package getApiCallsForAppkeys import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getAreaInfoCodeByCounty/data.go b/iSolarCloud/AppService/getAreaInfoCodeByCounty/data.go index 4c5b5ce63..e12f8af67 100644 --- a/iSolarCloud/AppService/getAreaInfoCodeByCounty/data.go +++ b/iSolarCloud/AppService/getAreaInfoCodeByCounty/data.go @@ -2,8 +2,8 @@ package getAreaInfoCodeByCounty import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getAreaInfoCodeByCounty/struct.go b/iSolarCloud/AppService/getAreaInfoCodeByCounty/struct.go index 8f03fd44a..613afb402 100644 --- a/iSolarCloud/AppService/getAreaInfoCodeByCounty/struct.go +++ b/iSolarCloud/AppService/getAreaInfoCodeByCounty/struct.go @@ -6,8 +6,8 @@ package getAreaInfoCodeByCounty import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getAreaList/data.go b/iSolarCloud/AppService/getAreaList/data.go index fed0e64c7..b19021acf 100644 --- a/iSolarCloud/AppService/getAreaList/data.go +++ b/iSolarCloud/AppService/getAreaList/data.go @@ -2,8 +2,8 @@ package getAreaList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -15,7 +15,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -39,7 +39,7 @@ type ResultData struct { TodayEnergy valueTypes.UnitValue `json:"today_energy"` TotalEnergy valueTypes.UnitValue `json:"total_energy"` } `json:"pageList" PointId:"page_list" PointNameFromChild:"OrgId" PointNameAppend:"false" PointArrayFlatten:"false" DataTable:"true"` - RowCount valueTypes.Integer `json:"rowCount" PointIgnore:"true"` + RowCount valueTypes.Integer `json:"rowCount" PointId:"row_count" PointIgnore:"true"` } func (e *ResultData) IsValid() error { diff --git a/iSolarCloud/AppService/getAreaList/struct.go b/iSolarCloud/AppService/getAreaList/struct.go index 5d5d57372..862c89d02 100644 --- a/iSolarCloud/AppService/getAreaList/struct.go +++ b/iSolarCloud/AppService/getAreaList/struct.go @@ -6,8 +6,8 @@ package getAreaList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getAutoCreatePowerStation/data.go b/iSolarCloud/AppService/getAutoCreatePowerStation/data.go index a6fd5a4bc..25a13c2e7 100644 --- a/iSolarCloud/AppService/getAutoCreatePowerStation/data.go +++ b/iSolarCloud/AppService/getAutoCreatePowerStation/data.go @@ -2,8 +2,8 @@ package getAutoCreatePowerStation import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getAutoCreatePowerStation/struct.go b/iSolarCloud/AppService/getAutoCreatePowerStation/struct.go index 856975092..e7442914b 100644 --- a/iSolarCloud/AppService/getAutoCreatePowerStation/struct.go +++ b/iSolarCloud/AppService/getAutoCreatePowerStation/struct.go @@ -6,8 +6,8 @@ package getAutoCreatePowerStation import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getBackReadValue/data.go b/iSolarCloud/AppService/getBackReadValue/data.go index 5de9d1dad..4b4f7151d 100644 --- a/iSolarCloud/AppService/getBackReadValue/data.go +++ b/iSolarCloud/AppService/getBackReadValue/data.go @@ -2,8 +2,8 @@ package getBackReadValue import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getBackReadValue/struct.go b/iSolarCloud/AppService/getBackReadValue/struct.go index 168507c61..d7ce57587 100644 --- a/iSolarCloud/AppService/getBackReadValue/struct.go +++ b/iSolarCloud/AppService/getBackReadValue/struct.go @@ -6,8 +6,8 @@ package getBackReadValue import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getBatchNewestPointData/data.go b/iSolarCloud/AppService/getBatchNewestPointData/data.go index 277548585..d304d6fb6 100644 --- a/iSolarCloud/AppService/getBatchNewestPointData/data.go +++ b/iSolarCloud/AppService/getBatchNewestPointData/data.go @@ -2,8 +2,8 @@ package getBatchNewestPointData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getBatchNewestPointData/struct.go b/iSolarCloud/AppService/getBatchNewestPointData/struct.go index 897becf9a..0aa4fae13 100644 --- a/iSolarCloud/AppService/getBatchNewestPointData/struct.go +++ b/iSolarCloud/AppService/getBatchNewestPointData/struct.go @@ -6,8 +6,8 @@ package getBatchNewestPointData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getCallApiResidueTimes/data.go b/iSolarCloud/AppService/getCallApiResidueTimes/data.go index feebdc4af..c0a5a3b8f 100644 --- a/iSolarCloud/AppService/getCallApiResidueTimes/data.go +++ b/iSolarCloud/AppService/getCallApiResidueTimes/data.go @@ -2,8 +2,8 @@ package getCallApiResidueTimes import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getCallApiResidueTimes/struct.go b/iSolarCloud/AppService/getCallApiResidueTimes/struct.go index 302ae661e..97ba44df5 100644 --- a/iSolarCloud/AppService/getCallApiResidueTimes/struct.go +++ b/iSolarCloud/AppService/getCallApiResidueTimes/struct.go @@ -6,8 +6,8 @@ package getCallApiResidueTimes import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getChangedPsListByTime/data.go b/iSolarCloud/AppService/getChangedPsListByTime/data.go index a450aeffa..c8ec47ce9 100644 --- a/iSolarCloud/AppService/getChangedPsListByTime/data.go +++ b/iSolarCloud/AppService/getChangedPsListByTime/data.go @@ -2,8 +2,8 @@ package getChangedPsListByTime import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getChangedPsListByTime/struct.go b/iSolarCloud/AppService/getChangedPsListByTime/struct.go index 9d07c918a..c94183b81 100644 --- a/iSolarCloud/AppService/getChangedPsListByTime/struct.go +++ b/iSolarCloud/AppService/getChangedPsListByTime/struct.go @@ -6,8 +6,8 @@ package getChangedPsListByTime import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getChnnlListByPsId/data.go b/iSolarCloud/AppService/getChnnlListByPsId/data.go index 63105d07d..0cce7f440 100644 --- a/iSolarCloud/AppService/getChnnlListByPsId/data.go +++ b/iSolarCloud/AppService/getChnnlListByPsId/data.go @@ -2,8 +2,8 @@ package getChnnlListByPsId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -38,10 +38,10 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsId.String() - entries.StructToDataMap(*e, e.Request.PsId.String(), apiReflect.NewEndPointPath(e.Request.PsId.String())) + entries.StructToDataMap(*e, e.Request.PsId.String(), GoStruct.NewEndPointPath(e.Request.PsId.String())) } return entries diff --git a/iSolarCloud/AppService/getChnnlListByPsId/struct.go b/iSolarCloud/AppService/getChnnlListByPsId/struct.go index a0ce6431b..11e7c12ab 100644 --- a/iSolarCloud/AppService/getChnnlListByPsId/struct.go +++ b/iSolarCloud/AppService/getChnnlListByPsId/struct.go @@ -6,8 +6,8 @@ package getChnnlListByPsId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getCloudList/data.go b/iSolarCloud/AppService/getCloudList/data.go index 9c6d56cce..8ed99b5e0 100644 --- a/iSolarCloud/AppService/getCloudList/data.go +++ b/iSolarCloud/AppService/getCloudList/data.go @@ -2,8 +2,8 @@ package getCloudList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -15,7 +15,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getCloudList/struct.go b/iSolarCloud/AppService/getCloudList/struct.go index 9cebe3791..97fe44668 100644 --- a/iSolarCloud/AppService/getCloudList/struct.go +++ b/iSolarCloud/AppService/getCloudList/struct.go @@ -6,8 +6,8 @@ package getCloudList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getCloudServiceMappingConfig/data.go b/iSolarCloud/AppService/getCloudServiceMappingConfig/data.go index a758150bb..a0cd7f4ff 100644 --- a/iSolarCloud/AppService/getCloudServiceMappingConfig/data.go +++ b/iSolarCloud/AppService/getCloudServiceMappingConfig/data.go @@ -2,8 +2,8 @@ package getCloudServiceMappingConfig import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getCloudServiceMappingConfig/struct.go b/iSolarCloud/AppService/getCloudServiceMappingConfig/struct.go index 1c0d382e7..3c0a844a9 100644 --- a/iSolarCloud/AppService/getCloudServiceMappingConfig/struct.go +++ b/iSolarCloud/AppService/getCloudServiceMappingConfig/struct.go @@ -6,8 +6,8 @@ package getCloudServiceMappingConfig import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getCommunicationDeviceConfigInfo/data.go b/iSolarCloud/AppService/getCommunicationDeviceConfigInfo/data.go index b357e344c..eb32a9622 100644 --- a/iSolarCloud/AppService/getCommunicationDeviceConfigInfo/data.go +++ b/iSolarCloud/AppService/getCommunicationDeviceConfigInfo/data.go @@ -2,8 +2,8 @@ package getCommunicationDeviceConfigInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getCommunicationDeviceConfigInfo/struct.go b/iSolarCloud/AppService/getCommunicationDeviceConfigInfo/struct.go index 492b968db..388bf926e 100644 --- a/iSolarCloud/AppService/getCommunicationDeviceConfigInfo/struct.go +++ b/iSolarCloud/AppService/getCommunicationDeviceConfigInfo/struct.go @@ -6,8 +6,8 @@ package getCommunicationDeviceConfigInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getCommunicationModuleMonitorData/data.go b/iSolarCloud/AppService/getCommunicationModuleMonitorData/data.go index 29faa2865..40373327b 100644 --- a/iSolarCloud/AppService/getCommunicationModuleMonitorData/data.go +++ b/iSolarCloud/AppService/getCommunicationModuleMonitorData/data.go @@ -2,8 +2,8 @@ package getCommunicationModuleMonitorData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getCommunicationModuleMonitorData/struct.go b/iSolarCloud/AppService/getCommunicationModuleMonitorData/struct.go index e1c243293..e23c5dba1 100644 --- a/iSolarCloud/AppService/getCommunicationModuleMonitorData/struct.go +++ b/iSolarCloud/AppService/getCommunicationModuleMonitorData/struct.go @@ -6,8 +6,8 @@ package getCommunicationModuleMonitorData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getComponentModelFactory/data.go b/iSolarCloud/AppService/getComponentModelFactory/data.go index 9ba0ddfe2..7de65a9ba 100644 --- a/iSolarCloud/AppService/getComponentModelFactory/data.go +++ b/iSolarCloud/AppService/getComponentModelFactory/data.go @@ -2,8 +2,8 @@ package getComponentModelFactory import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getComponentModelFactory/struct.go b/iSolarCloud/AppService/getComponentModelFactory/struct.go index edfeffa6d..76648b195 100644 --- a/iSolarCloud/AppService/getComponentModelFactory/struct.go +++ b/iSolarCloud/AppService/getComponentModelFactory/struct.go @@ -6,8 +6,8 @@ package getComponentModelFactory import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getConfigList/data.go b/iSolarCloud/AppService/getConfigList/data.go index 74440d872..2655f9529 100644 --- a/iSolarCloud/AppService/getConfigList/data.go +++ b/iSolarCloud/AppService/getConfigList/data.go @@ -2,8 +2,8 @@ package getConfigList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getConfigList/struct.go b/iSolarCloud/AppService/getConfigList/struct.go index b71b5065e..ece9e39dd 100644 --- a/iSolarCloud/AppService/getConfigList/struct.go +++ b/iSolarCloud/AppService/getConfigList/struct.go @@ -6,8 +6,8 @@ package getConfigList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getConnectionInfoBySnAndLocalPort/data.go b/iSolarCloud/AppService/getConnectionInfoBySnAndLocalPort/data.go index d6c7b8c55..398ced484 100644 --- a/iSolarCloud/AppService/getConnectionInfoBySnAndLocalPort/data.go +++ b/iSolarCloud/AppService/getConnectionInfoBySnAndLocalPort/data.go @@ -2,8 +2,8 @@ package getConnectionInfoBySnAndLocalPort import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getConnectionInfoBySnAndLocalPort/struct.go b/iSolarCloud/AppService/getConnectionInfoBySnAndLocalPort/struct.go index f4cb6ddc0..b4a166fd3 100644 --- a/iSolarCloud/AppService/getConnectionInfoBySnAndLocalPort/struct.go +++ b/iSolarCloud/AppService/getConnectionInfoBySnAndLocalPort/struct.go @@ -6,8 +6,8 @@ package getConnectionInfoBySnAndLocalPort import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getCountDown/data.go b/iSolarCloud/AppService/getCountDown/data.go index 015afe81a..92efd5841 100644 --- a/iSolarCloud/AppService/getCountDown/data.go +++ b/iSolarCloud/AppService/getCountDown/data.go @@ -2,8 +2,8 @@ package getCountDown import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getCountDown/struct.go b/iSolarCloud/AppService/getCountDown/struct.go index ceddf7900..9b53bafd6 100644 --- a/iSolarCloud/AppService/getCountDown/struct.go +++ b/iSolarCloud/AppService/getCountDown/struct.go @@ -6,8 +6,8 @@ package getCountDown import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getCountryServiceInfo/data.go b/iSolarCloud/AppService/getCountryServiceInfo/data.go index 3241808e0..7bc47a91f 100644 --- a/iSolarCloud/AppService/getCountryServiceInfo/data.go +++ b/iSolarCloud/AppService/getCountryServiceInfo/data.go @@ -2,8 +2,8 @@ package getCountryServiceInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getCountryServiceInfo/struct.go b/iSolarCloud/AppService/getCountryServiceInfo/struct.go index d69dd65c3..257601be2 100644 --- a/iSolarCloud/AppService/getCountryServiceInfo/struct.go +++ b/iSolarCloud/AppService/getCountryServiceInfo/struct.go @@ -6,8 +6,8 @@ package getCountryServiceInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getCounty/data.go b/iSolarCloud/AppService/getCounty/data.go index 24708fcb8..06ef7a2b1 100644 --- a/iSolarCloud/AppService/getCounty/data.go +++ b/iSolarCloud/AppService/getCounty/data.go @@ -2,8 +2,8 @@ package getCounty import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getCounty/struct.go b/iSolarCloud/AppService/getCounty/struct.go index f2baef823..0ab686e7a 100644 --- a/iSolarCloud/AppService/getCounty/struct.go +++ b/iSolarCloud/AppService/getCounty/struct.go @@ -6,8 +6,8 @@ package getCounty import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getCustomerEmployee/data.go b/iSolarCloud/AppService/getCustomerEmployee/data.go index 3b24972c5..871a9544c 100644 --- a/iSolarCloud/AppService/getCustomerEmployee/data.go +++ b/iSolarCloud/AppService/getCustomerEmployee/data.go @@ -2,8 +2,8 @@ package getCustomerEmployee import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getCustomerEmployee/struct.go b/iSolarCloud/AppService/getCustomerEmployee/struct.go index e2a1c9ddf..8ffbb657c 100644 --- a/iSolarCloud/AppService/getCustomerEmployee/struct.go +++ b/iSolarCloud/AppService/getCustomerEmployee/struct.go @@ -6,8 +6,8 @@ package getCustomerEmployee import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getCustomerList/data.go b/iSolarCloud/AppService/getCustomerList/data.go index 604e137ad..31cd186d5 100644 --- a/iSolarCloud/AppService/getCustomerList/data.go +++ b/iSolarCloud/AppService/getCustomerList/data.go @@ -2,8 +2,8 @@ package getCustomerList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getCustomerList/struct.go b/iSolarCloud/AppService/getCustomerList/struct.go index e4800da2b..18d655184 100644 --- a/iSolarCloud/AppService/getCustomerList/struct.go +++ b/iSolarCloud/AppService/getCustomerList/struct.go @@ -6,8 +6,8 @@ package getCustomerList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getDataFromHBase/data.go b/iSolarCloud/AppService/getDataFromHBase/data.go index 8252cd865..f9d93acc7 100644 --- a/iSolarCloud/AppService/getDataFromHBase/data.go +++ b/iSolarCloud/AppService/getDataFromHBase/data.go @@ -2,8 +2,8 @@ package getDataFromHBase import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getDataFromHBase/struct.go b/iSolarCloud/AppService/getDataFromHBase/struct.go index 4c6a284fa..0442a77e4 100644 --- a/iSolarCloud/AppService/getDataFromHBase/struct.go +++ b/iSolarCloud/AppService/getDataFromHBase/struct.go @@ -6,8 +6,8 @@ package getDataFromHBase import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getDataFromHbaseByRowKey/data.go b/iSolarCloud/AppService/getDataFromHbaseByRowKey/data.go index f7017faac..598a54cea 100644 --- a/iSolarCloud/AppService/getDataFromHbaseByRowKey/data.go +++ b/iSolarCloud/AppService/getDataFromHbaseByRowKey/data.go @@ -2,8 +2,8 @@ package getDataFromHbaseByRowKey import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getDataFromHbaseByRowKey/struct.go b/iSolarCloud/AppService/getDataFromHbaseByRowKey/struct.go index 4b6bf2eb1..e55b0fffb 100644 --- a/iSolarCloud/AppService/getDataFromHbaseByRowKey/struct.go +++ b/iSolarCloud/AppService/getDataFromHbaseByRowKey/struct.go @@ -6,8 +6,8 @@ package getDataFromHbaseByRowKey import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getDevInstalledPowerByPsId/data.go b/iSolarCloud/AppService/getDevInstalledPowerByPsId/data.go index 5b8dd1703..c606a66d6 100644 --- a/iSolarCloud/AppService/getDevInstalledPowerByPsId/data.go +++ b/iSolarCloud/AppService/getDevInstalledPowerByPsId/data.go @@ -2,8 +2,8 @@ package getDevInstalledPowerByPsId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getDevInstalledPowerByPsId/struct.go b/iSolarCloud/AppService/getDevInstalledPowerByPsId/struct.go index cc1bf4aaa..b3180221d 100644 --- a/iSolarCloud/AppService/getDevInstalledPowerByPsId/struct.go +++ b/iSolarCloud/AppService/getDevInstalledPowerByPsId/struct.go @@ -6,8 +6,8 @@ package getDevInstalledPowerByPsId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getDevRecord/data.go b/iSolarCloud/AppService/getDevRecord/data.go index 4cf580af9..77b8c43b1 100644 --- a/iSolarCloud/AppService/getDevRecord/data.go +++ b/iSolarCloud/AppService/getDevRecord/data.go @@ -2,8 +2,8 @@ package getDevRecord import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getDevRecord/struct.go b/iSolarCloud/AppService/getDevRecord/struct.go index cb04b16b6..ba5e10a9e 100644 --- a/iSolarCloud/AppService/getDevRecord/struct.go +++ b/iSolarCloud/AppService/getDevRecord/struct.go @@ -6,8 +6,8 @@ package getDevRecord import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getDevRunRecordList/data.go b/iSolarCloud/AppService/getDevRunRecordList/data.go index b02888ef5..d187c0ce6 100644 --- a/iSolarCloud/AppService/getDevRunRecordList/data.go +++ b/iSolarCloud/AppService/getDevRunRecordList/data.go @@ -2,8 +2,8 @@ package getDevRunRecordList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getDevRunRecordList/struct.go b/iSolarCloud/AppService/getDevRunRecordList/struct.go index c9eabd611..29495c22f 100644 --- a/iSolarCloud/AppService/getDevRunRecordList/struct.go +++ b/iSolarCloud/AppService/getDevRunRecordList/struct.go @@ -6,8 +6,8 @@ package getDevRunRecordList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getDevSimByList/data.go b/iSolarCloud/AppService/getDevSimByList/data.go index ee89cd1ac..d9ffd1322 100644 --- a/iSolarCloud/AppService/getDevSimByList/data.go +++ b/iSolarCloud/AppService/getDevSimByList/data.go @@ -2,8 +2,8 @@ package getDevSimByList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getDevSimByList/struct.go b/iSolarCloud/AppService/getDevSimByList/struct.go index 567f049e0..9f9a34ec3 100644 --- a/iSolarCloud/AppService/getDevSimByList/struct.go +++ b/iSolarCloud/AppService/getDevSimByList/struct.go @@ -6,8 +6,8 @@ package getDevSimByList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getDevSimList/data.go b/iSolarCloud/AppService/getDevSimList/data.go index 11682fbb1..3d78e41e3 100644 --- a/iSolarCloud/AppService/getDevSimList/data.go +++ b/iSolarCloud/AppService/getDevSimList/data.go @@ -2,8 +2,8 @@ package getDevSimList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getDevSimList/struct.go b/iSolarCloud/AppService/getDevSimList/struct.go index 7c51e004a..afbb8fe42 100644 --- a/iSolarCloud/AppService/getDevSimList/struct.go +++ b/iSolarCloud/AppService/getDevSimList/struct.go @@ -6,8 +6,8 @@ package getDevSimList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getDeviceAccountById/data.go b/iSolarCloud/AppService/getDeviceAccountById/data.go index 46b56812c..b445e424e 100644 --- a/iSolarCloud/AppService/getDeviceAccountById/data.go +++ b/iSolarCloud/AppService/getDeviceAccountById/data.go @@ -2,8 +2,8 @@ package getDeviceAccountById import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getDeviceAccountById/struct.go b/iSolarCloud/AppService/getDeviceAccountById/struct.go index 849f6deb9..195941215 100644 --- a/iSolarCloud/AppService/getDeviceAccountById/struct.go +++ b/iSolarCloud/AppService/getDeviceAccountById/struct.go @@ -6,8 +6,8 @@ package getDeviceAccountById import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getDeviceFaultStatisticsData/data.go b/iSolarCloud/AppService/getDeviceFaultStatisticsData/data.go index 75b3f38f0..c588d25bd 100644 --- a/iSolarCloud/AppService/getDeviceFaultStatisticsData/data.go +++ b/iSolarCloud/AppService/getDeviceFaultStatisticsData/data.go @@ -2,8 +2,8 @@ package getDeviceFaultStatisticsData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getDeviceFaultStatisticsData/struct.go b/iSolarCloud/AppService/getDeviceFaultStatisticsData/struct.go index 9e9519ab4..811621143 100644 --- a/iSolarCloud/AppService/getDeviceFaultStatisticsData/struct.go +++ b/iSolarCloud/AppService/getDeviceFaultStatisticsData/struct.go @@ -6,8 +6,8 @@ package getDeviceFaultStatisticsData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getDeviceInfo/data.go b/iSolarCloud/AppService/getDeviceInfo/data.go index 697558e60..2842b215c 100644 --- a/iSolarCloud/AppService/getDeviceInfo/data.go +++ b/iSolarCloud/AppService/getDeviceInfo/data.go @@ -2,8 +2,8 @@ package getDeviceInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getDeviceInfo/struct.go b/iSolarCloud/AppService/getDeviceInfo/struct.go index d6f4c870c..859187954 100644 --- a/iSolarCloud/AppService/getDeviceInfo/struct.go +++ b/iSolarCloud/AppService/getDeviceInfo/struct.go @@ -6,8 +6,8 @@ package getDeviceInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getDeviceList/data.go b/iSolarCloud/AppService/getDeviceList/data.go index eaa9c48fb..23eb27a54 100644 --- a/iSolarCloud/AppService/getDeviceList/data.go +++ b/iSolarCloud/AppService/getDeviceList/data.go @@ -2,9 +2,9 @@ package getDeviceList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -17,7 +17,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -71,8 +71,8 @@ type ResultData struct { Sn valueTypes.String `json:"sn" PointName:"Serial Number"` TypeName valueTypes.String `json:"type_name"` UUID valueTypes.Integer `json:"uuid"` - } `json:"pageList" PointNameFromChild:"PsKey" PointNameAppend:"false" PointArrayFlatten:"false" DataTable:"true"` - RowCount valueTypes.Integer `json:"rowCount" PointIgnore:"true"` + } `json:"pageList" PointId:"page_list" PointNameFromChild:"PsKey" PointNameAppend:"false" PointArrayFlatten:"false" DataTable:"true"` + RowCount valueTypes.Integer `json:"rowCount" PointId:"row_count" PointIgnore:"true"` } func (e *ResultData) IsValid() error { @@ -215,12 +215,7 @@ func GetDevicesTable(data Devices) output.Table { // ) // } - table = output.NewTable() - table.SetTitle("") - // table.SetJson([]byte(e.GetJsonData(false))) - // table.SetRaw([]byte(e.GetJsonData(true))) - - _ = table.SetHeader( + table = output.NewTable( "Vendor", "Ps Key", "Ps Id", @@ -236,22 +231,42 @@ func GetDevicesTable(data Devices) output.Table { "Status", "UUID", ) + table.SetTitle("") + // table.SetJson([]byte(e.GetJsonData(false))) + // table.SetRaw([]byte(e.GetJsonData(true))) + // + // _ = table.SetHeader( + // "Vendor", + // "Ps Key", + // "Ps Id", + // "Type", + // "Code", + // "Id", + // "Type Name", + // "Serial Number", + // "Model", + // "Model Id", + // "Name", + // "State", + // "Status", + // "UUID", + // ) + for _, d := range data { - _ = table.AddRow( - d.Vendor.Value(), - d.PsKey.Value(), - d.PsId.Value(), - d.DeviceType.Value(), - d.DeviceCode.Value(), - d.ChannelId.Value(), - d.TypeName.Value(), - d.DeviceProSn.Value(), - d.DeviceModel.Value(), - d.DeviceModelId.Value(), - d.DeviceName.Value(), - d.DeviceState, - d.DevStatus, - d.Uuid.Value(), + _ = table.AddRow(d.Vendor.String(), + d.PsKey.String(), + d.PsId.String(), + d.DeviceType.String(), + d.DeviceCode.String(), + d.ChannelId.String(), + d.TypeName.String(), + d.DeviceProSn.String(), + d.DeviceModel.String(), + d.DeviceModelId.String(), + d.DeviceName.String(), + d.DeviceState.String(), + d.DevStatus.String(), + d.Uuid.String(), ) } } @@ -263,10 +278,10 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsId.String() - entries.StructToDataMap(*e, e.Request.PsId.String(), apiReflect.NewEndPointPath(e.Request.PsId.String())) + entries.StructToDataMap(*e, e.Request.PsId.String(), GoStruct.NewEndPointPath(e.Request.PsId.String())) } return entries diff --git a/iSolarCloud/AppService/getDeviceList/struct.go b/iSolarCloud/AppService/getDeviceList/struct.go index 810ffcbf7..7d0391c93 100644 --- a/iSolarCloud/AppService/getDeviceList/struct.go +++ b/iSolarCloud/AppService/getDeviceList/struct.go @@ -6,8 +6,8 @@ package getDeviceList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getDeviceModelInfoList/data.go b/iSolarCloud/AppService/getDeviceModelInfoList/data.go index 07bd5b499..e207565fc 100644 --- a/iSolarCloud/AppService/getDeviceModelInfoList/data.go +++ b/iSolarCloud/AppService/getDeviceModelInfoList/data.go @@ -2,9 +2,9 @@ package getDeviceModelInfoList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -17,7 +17,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -69,12 +69,7 @@ func (e *ResultData) IsValid() error { func (e *EndPoint) GetPointDataTable() output.Table { var table output.Table for range Only.Once { - table = output.NewTable() - table.SetTitle("") - table.SetJson([]byte(e.GetJsonData(false))) - table.SetRaw([]byte(e.GetJsonData(true))) - - _ = table.SetHeader( + table = output.NewTable( "Model Id", "Type", "Com Type", @@ -84,19 +79,32 @@ func (e *EndPoint) GetPointDataTable() output.Table { "Model Code", "Is Remote Upgrade", ) + table.SetTitle("") + table.SetJson([]byte(e.GetJsonData(false))) + table.SetRaw([]byte(e.GetJsonData(true))) + + // _ = table.SetHeader( + // "Model Id", + // "Type", + // "Com Type", + // "Factory Id", + // "Factory Name", + // "Model", + // "Model Code", + // "Is Remote Upgrade", + // ) for _, d := range e.Response.ResultData { if d.DeviceModel == d.DeviceModelCode { d.DeviceModelCode.SetString("") } - _ = table.AddRow( - d.DeviceModelId, - d.DeviceType, - d.ComType, - d.DeviceFactoryId, - d.DeviceFactoryName, - d.DeviceModel, - d.DeviceModelCode, - d.IsRemoteUpgrade, + _ = table.AddRow(d.DeviceModelId.String(), + d.DeviceType.String(), + d.ComType.String(), + d.DeviceFactoryId.String(), + d.DeviceFactoryName.String(), + d.DeviceModel.String(), + d.DeviceModelCode.String(), + d.IsRemoteUpgrade.String(), ) } } diff --git a/iSolarCloud/AppService/getDeviceModelInfoList/struct.go b/iSolarCloud/AppService/getDeviceModelInfoList/struct.go index c999ed1b7..06d7e7113 100644 --- a/iSolarCloud/AppService/getDeviceModelInfoList/struct.go +++ b/iSolarCloud/AppService/getDeviceModelInfoList/struct.go @@ -6,8 +6,8 @@ package getDeviceModelInfoList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getDevicePointMinuteDataList/data.go b/iSolarCloud/AppService/getDevicePointMinuteDataList/data.go index 233a490e2..2c57d1781 100644 --- a/iSolarCloud/AppService/getDevicePointMinuteDataList/data.go +++ b/iSolarCloud/AppService/getDevicePointMinuteDataList/data.go @@ -2,8 +2,8 @@ package getDevicePointMinuteDataList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getDevicePointMinuteDataList/struct.go b/iSolarCloud/AppService/getDevicePointMinuteDataList/struct.go index 2bb964738..7b4c2fefe 100644 --- a/iSolarCloud/AppService/getDevicePointMinuteDataList/struct.go +++ b/iSolarCloud/AppService/getDevicePointMinuteDataList/struct.go @@ -6,8 +6,8 @@ package getDevicePointMinuteDataList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getDevicePoints/data.go b/iSolarCloud/AppService/getDevicePoints/data.go index 2a65954dd..0ffdeba1c 100644 --- a/iSolarCloud/AppService/getDevicePoints/data.go +++ b/iSolarCloud/AppService/getDevicePoints/data.go @@ -2,8 +2,8 @@ package getDevicePoints import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getDevicePoints/struct.go b/iSolarCloud/AppService/getDevicePoints/struct.go index 53c795402..69ca17c09 100644 --- a/iSolarCloud/AppService/getDevicePoints/struct.go +++ b/iSolarCloud/AppService/getDevicePoints/struct.go @@ -6,8 +6,8 @@ package getDevicePoints import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getDevicePropertys/data.go b/iSolarCloud/AppService/getDevicePropertys/data.go index b5edac9fa..9c85ce70f 100644 --- a/iSolarCloud/AppService/getDevicePropertys/data.go +++ b/iSolarCloud/AppService/getDevicePropertys/data.go @@ -2,8 +2,8 @@ package getDevicePropertys import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getDevicePropertys/struct.go b/iSolarCloud/AppService/getDevicePropertys/struct.go index c41a96a6d..c0dd6a8d1 100644 --- a/iSolarCloud/AppService/getDevicePropertys/struct.go +++ b/iSolarCloud/AppService/getDevicePropertys/struct.go @@ -6,8 +6,8 @@ package getDevicePropertys import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getDeviceRepairDetail/data.go b/iSolarCloud/AppService/getDeviceRepairDetail/data.go index fac843f5d..009e2e13f 100644 --- a/iSolarCloud/AppService/getDeviceRepairDetail/data.go +++ b/iSolarCloud/AppService/getDeviceRepairDetail/data.go @@ -2,8 +2,8 @@ package getDeviceRepairDetail import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getDeviceRepairDetail/struct.go b/iSolarCloud/AppService/getDeviceRepairDetail/struct.go index c944381bf..d3192af43 100644 --- a/iSolarCloud/AppService/getDeviceRepairDetail/struct.go +++ b/iSolarCloud/AppService/getDeviceRepairDetail/struct.go @@ -6,8 +6,8 @@ package getDeviceRepairDetail import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getDeviceTechBranchCount/data.go b/iSolarCloud/AppService/getDeviceTechBranchCount/data.go index a70dcb8bf..aa63b184e 100644 --- a/iSolarCloud/AppService/getDeviceTechBranchCount/data.go +++ b/iSolarCloud/AppService/getDeviceTechBranchCount/data.go @@ -2,8 +2,8 @@ package getDeviceTechBranchCount import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getDeviceTechBranchCount/struct.go b/iSolarCloud/AppService/getDeviceTechBranchCount/struct.go index 3e4153d45..f163b7adc 100644 --- a/iSolarCloud/AppService/getDeviceTechBranchCount/struct.go +++ b/iSolarCloud/AppService/getDeviceTechBranchCount/struct.go @@ -6,8 +6,8 @@ package getDeviceTechBranchCount import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getDeviceTypeInfoList/data.go b/iSolarCloud/AppService/getDeviceTypeInfoList/data.go index cb68e413a..700d8cda3 100644 --- a/iSolarCloud/AppService/getDeviceTypeInfoList/data.go +++ b/iSolarCloud/AppService/getDeviceTypeInfoList/data.go @@ -2,8 +2,8 @@ package getDeviceTypeInfoList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -15,7 +15,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getDeviceTypeInfoList/struct.go b/iSolarCloud/AppService/getDeviceTypeInfoList/struct.go index 618875f4a..6011fb31b 100644 --- a/iSolarCloud/AppService/getDeviceTypeInfoList/struct.go +++ b/iSolarCloud/AppService/getDeviceTypeInfoList/struct.go @@ -6,8 +6,8 @@ package getDeviceTypeInfoList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getDeviceTypeList/data.go b/iSolarCloud/AppService/getDeviceTypeList/data.go index 925bf714b..bfcf71b6a 100644 --- a/iSolarCloud/AppService/getDeviceTypeList/data.go +++ b/iSolarCloud/AppService/getDeviceTypeList/data.go @@ -2,8 +2,8 @@ package getDeviceTypeList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -15,7 +15,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getDeviceTypeList/struct.go b/iSolarCloud/AppService/getDeviceTypeList/struct.go index 721dde4f2..d29b45bbc 100644 --- a/iSolarCloud/AppService/getDeviceTypeList/struct.go +++ b/iSolarCloud/AppService/getDeviceTypeList/struct.go @@ -6,8 +6,8 @@ package getDeviceTypeList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getDstInfo/data.go b/iSolarCloud/AppService/getDstInfo/data.go index 0cf2900d3..e1e53299f 100644 --- a/iSolarCloud/AppService/getDstInfo/data.go +++ b/iSolarCloud/AppService/getDstInfo/data.go @@ -2,8 +2,8 @@ package getDstInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getDstInfo/struct.go b/iSolarCloud/AppService/getDstInfo/struct.go index 452b7f8c1..633311f5f 100644 --- a/iSolarCloud/AppService/getDstInfo/struct.go +++ b/iSolarCloud/AppService/getDstInfo/struct.go @@ -6,8 +6,8 @@ package getDstInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getElectricitySettlementData/data.go b/iSolarCloud/AppService/getElectricitySettlementData/data.go index 3a0d3f90c..0c59e611d 100644 --- a/iSolarCloud/AppService/getElectricitySettlementData/data.go +++ b/iSolarCloud/AppService/getElectricitySettlementData/data.go @@ -2,8 +2,8 @@ package getElectricitySettlementData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getElectricitySettlementData/struct.go b/iSolarCloud/AppService/getElectricitySettlementData/struct.go index 15993aebf..3d6903e65 100644 --- a/iSolarCloud/AppService/getElectricitySettlementData/struct.go +++ b/iSolarCloud/AppService/getElectricitySettlementData/struct.go @@ -6,8 +6,8 @@ package getElectricitySettlementData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getElectricitySettlementDetailData/data.go b/iSolarCloud/AppService/getElectricitySettlementDetailData/data.go index 0dd1e13ab..9530b9769 100644 --- a/iSolarCloud/AppService/getElectricitySettlementDetailData/data.go +++ b/iSolarCloud/AppService/getElectricitySettlementDetailData/data.go @@ -2,8 +2,8 @@ package getElectricitySettlementDetailData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getElectricitySettlementDetailData/struct.go b/iSolarCloud/AppService/getElectricitySettlementDetailData/struct.go index 4f48b2166..8be58fa59 100644 --- a/iSolarCloud/AppService/getElectricitySettlementDetailData/struct.go +++ b/iSolarCloud/AppService/getElectricitySettlementDetailData/struct.go @@ -6,8 +6,8 @@ package getElectricitySettlementDetailData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getEncryptPublicKey/data.go b/iSolarCloud/AppService/getEncryptPublicKey/data.go index 6fdc73280..15a97de1e 100644 --- a/iSolarCloud/AppService/getEncryptPublicKey/data.go +++ b/iSolarCloud/AppService/getEncryptPublicKey/data.go @@ -2,7 +2,7 @@ package getEncryptPublicKey import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" + "GoSungrow/iSolarCloud/api/GoStruct" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -15,7 +15,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getEncryptPublicKey/struct.go b/iSolarCloud/AppService/getEncryptPublicKey/struct.go index 46f971866..ebcef4b4a 100644 --- a/iSolarCloud/AppService/getEncryptPublicKey/struct.go +++ b/iSolarCloud/AppService/getEncryptPublicKey/struct.go @@ -6,8 +6,8 @@ package getEncryptPublicKey import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getFaultCount/data.go b/iSolarCloud/AppService/getFaultCount/data.go index 4e588b525..423a01858 100644 --- a/iSolarCloud/AppService/getFaultCount/data.go +++ b/iSolarCloud/AppService/getFaultCount/data.go @@ -2,8 +2,8 @@ package getFaultCount import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getFaultCount/struct.go b/iSolarCloud/AppService/getFaultCount/struct.go index 4f39182fe..9b000a3f8 100644 --- a/iSolarCloud/AppService/getFaultCount/struct.go +++ b/iSolarCloud/AppService/getFaultCount/struct.go @@ -6,8 +6,8 @@ package getFaultCount import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getFaultDetail/data.go b/iSolarCloud/AppService/getFaultDetail/data.go index 2aab3cb5d..d0b201653 100644 --- a/iSolarCloud/AppService/getFaultDetail/data.go +++ b/iSolarCloud/AppService/getFaultDetail/data.go @@ -2,8 +2,8 @@ package getFaultDetail import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getFaultDetail/struct.go b/iSolarCloud/AppService/getFaultDetail/struct.go index f25ba99ce..d22e0397e 100644 --- a/iSolarCloud/AppService/getFaultDetail/struct.go +++ b/iSolarCloud/AppService/getFaultDetail/struct.go @@ -6,8 +6,8 @@ package getFaultDetail import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getFaultMsgByFaultCode/data.go b/iSolarCloud/AppService/getFaultMsgByFaultCode/data.go index 1ae80b0d4..2c36d16db 100644 --- a/iSolarCloud/AppService/getFaultMsgByFaultCode/data.go +++ b/iSolarCloud/AppService/getFaultMsgByFaultCode/data.go @@ -2,8 +2,8 @@ package getFaultMsgByFaultCode import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getFaultMsgByFaultCode/struct.go b/iSolarCloud/AppService/getFaultMsgByFaultCode/struct.go index 4e438d137..63ad9bedc 100644 --- a/iSolarCloud/AppService/getFaultMsgByFaultCode/struct.go +++ b/iSolarCloud/AppService/getFaultMsgByFaultCode/struct.go @@ -6,8 +6,8 @@ package getFaultMsgByFaultCode import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getFaultMsgListByPageWithYYYYMM/data.go b/iSolarCloud/AppService/getFaultMsgListByPageWithYYYYMM/data.go index 5b62d75c9..8de2c2649 100644 --- a/iSolarCloud/AppService/getFaultMsgListByPageWithYYYYMM/data.go +++ b/iSolarCloud/AppService/getFaultMsgListByPageWithYYYYMM/data.go @@ -2,8 +2,8 @@ package getFaultMsgListByPageWithYYYYMM import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getFaultMsgListByPageWithYYYYMM/struct.go b/iSolarCloud/AppService/getFaultMsgListByPageWithYYYYMM/struct.go index f9ee86e6c..23da4859d 100644 --- a/iSolarCloud/AppService/getFaultMsgListByPageWithYYYYMM/struct.go +++ b/iSolarCloud/AppService/getFaultMsgListByPageWithYYYYMM/struct.go @@ -6,8 +6,8 @@ package getFaultMsgListByPageWithYYYYMM import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getFaultMsgListWithYYYYMM/data.go b/iSolarCloud/AppService/getFaultMsgListWithYYYYMM/data.go index aba9f2f96..514b8c2c2 100644 --- a/iSolarCloud/AppService/getFaultMsgListWithYYYYMM/data.go +++ b/iSolarCloud/AppService/getFaultMsgListWithYYYYMM/data.go @@ -2,8 +2,8 @@ package getFaultMsgListWithYYYYMM import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getFaultMsgListWithYYYYMM/struct.go b/iSolarCloud/AppService/getFaultMsgListWithYYYYMM/struct.go index 59f1a360c..a6b3ff0ae 100644 --- a/iSolarCloud/AppService/getFaultMsgListWithYYYYMM/struct.go +++ b/iSolarCloud/AppService/getFaultMsgListWithYYYYMM/struct.go @@ -6,8 +6,8 @@ package getFaultMsgListWithYYYYMM import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getFaultPlanList/data.go b/iSolarCloud/AppService/getFaultPlanList/data.go index f4b60dc40..c088019a0 100644 --- a/iSolarCloud/AppService/getFaultPlanList/data.go +++ b/iSolarCloud/AppService/getFaultPlanList/data.go @@ -2,8 +2,8 @@ package getFaultPlanList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getFaultPlanList/struct.go b/iSolarCloud/AppService/getFaultPlanList/struct.go index 42e38fd51..521975257 100644 --- a/iSolarCloud/AppService/getFaultPlanList/struct.go +++ b/iSolarCloud/AppService/getFaultPlanList/struct.go @@ -6,8 +6,8 @@ package getFaultPlanList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getFileOperationRecordOne/data.go b/iSolarCloud/AppService/getFileOperationRecordOne/data.go index 78de2cd6c..5c16ebf3b 100644 --- a/iSolarCloud/AppService/getFileOperationRecordOne/data.go +++ b/iSolarCloud/AppService/getFileOperationRecordOne/data.go @@ -2,8 +2,8 @@ package getFileOperationRecordOne import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getFileOperationRecordOne/struct.go b/iSolarCloud/AppService/getFileOperationRecordOne/struct.go index 3ac65ae23..d8f2e7553 100644 --- a/iSolarCloud/AppService/getFileOperationRecordOne/struct.go +++ b/iSolarCloud/AppService/getFileOperationRecordOne/struct.go @@ -6,8 +6,8 @@ package getFileOperationRecordOne import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getFormulaFaultAnalyseList/data.go b/iSolarCloud/AppService/getFormulaFaultAnalyseList/data.go index 4ef94655c..42976ec84 100644 --- a/iSolarCloud/AppService/getFormulaFaultAnalyseList/data.go +++ b/iSolarCloud/AppService/getFormulaFaultAnalyseList/data.go @@ -2,8 +2,8 @@ package getFormulaFaultAnalyseList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getFormulaFaultAnalyseList/struct.go b/iSolarCloud/AppService/getFormulaFaultAnalyseList/struct.go index d5c93c4f5..6e871bdcb 100644 --- a/iSolarCloud/AppService/getFormulaFaultAnalyseList/struct.go +++ b/iSolarCloud/AppService/getFormulaFaultAnalyseList/struct.go @@ -6,8 +6,8 @@ package getFormulaFaultAnalyseList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getGroupStringCheckResult/data.go b/iSolarCloud/AppService/getGroupStringCheckResult/data.go index f6aab77b7..c9b84ca0c 100644 --- a/iSolarCloud/AppService/getGroupStringCheckResult/data.go +++ b/iSolarCloud/AppService/getGroupStringCheckResult/data.go @@ -2,8 +2,8 @@ package getGroupStringCheckResult import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getGroupStringCheckResult/struct.go b/iSolarCloud/AppService/getGroupStringCheckResult/struct.go index 14b6c15b3..d4d6f3f63 100644 --- a/iSolarCloud/AppService/getGroupStringCheckResult/struct.go +++ b/iSolarCloud/AppService/getGroupStringCheckResult/struct.go @@ -6,8 +6,8 @@ package getGroupStringCheckResult import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getGroupStringCheckRule/data.go b/iSolarCloud/AppService/getGroupStringCheckRule/data.go index 782a1489a..f8704ac24 100644 --- a/iSolarCloud/AppService/getGroupStringCheckRule/data.go +++ b/iSolarCloud/AppService/getGroupStringCheckRule/data.go @@ -2,8 +2,8 @@ package getGroupStringCheckRule import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getGroupStringCheckRule/struct.go b/iSolarCloud/AppService/getGroupStringCheckRule/struct.go index daaa15527..b0c0a19be 100644 --- a/iSolarCloud/AppService/getGroupStringCheckRule/struct.go +++ b/iSolarCloud/AppService/getGroupStringCheckRule/struct.go @@ -6,8 +6,8 @@ package getGroupStringCheckRule import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getHisData/data.go b/iSolarCloud/AppService/getHisData/data.go index 6ab862131..49483dd75 100644 --- a/iSolarCloud/AppService/getHisData/data.go +++ b/iSolarCloud/AppService/getHisData/data.go @@ -2,8 +2,8 @@ package getHisData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getHisData/struct.go b/iSolarCloud/AppService/getHisData/struct.go index b080c601a..ca2dabf43 100644 --- a/iSolarCloud/AppService/getHisData/struct.go +++ b/iSolarCloud/AppService/getHisData/struct.go @@ -6,8 +6,8 @@ package getHisData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getHistoryInfo/data.go b/iSolarCloud/AppService/getHistoryInfo/data.go index 986949a69..afcbbbfa1 100644 --- a/iSolarCloud/AppService/getHistoryInfo/data.go +++ b/iSolarCloud/AppService/getHistoryInfo/data.go @@ -2,8 +2,8 @@ package getHistoryInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -17,7 +17,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getHistoryInfo/struct.go b/iSolarCloud/AppService/getHistoryInfo/struct.go index de1cf5620..a56797ec1 100644 --- a/iSolarCloud/AppService/getHistoryInfo/struct.go +++ b/iSolarCloud/AppService/getHistoryInfo/struct.go @@ -6,8 +6,8 @@ package getHistoryInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getHouseholdEvaluation/data.go b/iSolarCloud/AppService/getHouseholdEvaluation/data.go index 5c0e5a4fc..f528375ad 100644 --- a/iSolarCloud/AppService/getHouseholdEvaluation/data.go +++ b/iSolarCloud/AppService/getHouseholdEvaluation/data.go @@ -2,8 +2,8 @@ package getHouseholdEvaluation import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getHouseholdEvaluation/struct.go b/iSolarCloud/AppService/getHouseholdEvaluation/struct.go index 0f74dd501..35195d031 100644 --- a/iSolarCloud/AppService/getHouseholdEvaluation/struct.go +++ b/iSolarCloud/AppService/getHouseholdEvaluation/struct.go @@ -6,8 +6,8 @@ package getHouseholdEvaluation import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getHouseholdLeaveMessage/data.go b/iSolarCloud/AppService/getHouseholdLeaveMessage/data.go index 36b6b498a..c20d8eb28 100644 --- a/iSolarCloud/AppService/getHouseholdLeaveMessage/data.go +++ b/iSolarCloud/AppService/getHouseholdLeaveMessage/data.go @@ -2,8 +2,8 @@ package getHouseholdLeaveMessage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getHouseholdLeaveMessage/struct.go b/iSolarCloud/AppService/getHouseholdLeaveMessage/struct.go index c26c94583..b2db63723 100644 --- a/iSolarCloud/AppService/getHouseholdLeaveMessage/struct.go +++ b/iSolarCloud/AppService/getHouseholdLeaveMessage/struct.go @@ -6,8 +6,8 @@ package getHouseholdLeaveMessage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getHouseholdOpinionFeedback/data.go b/iSolarCloud/AppService/getHouseholdOpinionFeedback/data.go index ffb4d554a..00993486f 100644 --- a/iSolarCloud/AppService/getHouseholdOpinionFeedback/data.go +++ b/iSolarCloud/AppService/getHouseholdOpinionFeedback/data.go @@ -2,8 +2,8 @@ package getHouseholdOpinionFeedback import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getHouseholdOpinionFeedback/struct.go b/iSolarCloud/AppService/getHouseholdOpinionFeedback/struct.go index b0048b48e..dbc2fc37b 100644 --- a/iSolarCloud/AppService/getHouseholdOpinionFeedback/struct.go +++ b/iSolarCloud/AppService/getHouseholdOpinionFeedback/struct.go @@ -6,8 +6,8 @@ package getHouseholdOpinionFeedback import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getHouseholdPsInstallerByUserId/data.go b/iSolarCloud/AppService/getHouseholdPsInstallerByUserId/data.go index ab9a74c71..108c0bbfd 100644 --- a/iSolarCloud/AppService/getHouseholdPsInstallerByUserId/data.go +++ b/iSolarCloud/AppService/getHouseholdPsInstallerByUserId/data.go @@ -2,8 +2,8 @@ package getHouseholdPsInstallerByUserId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getHouseholdPsInstallerByUserId/struct.go b/iSolarCloud/AppService/getHouseholdPsInstallerByUserId/struct.go index 08a25b93d..9652393cc 100644 --- a/iSolarCloud/AppService/getHouseholdPsInstallerByUserId/struct.go +++ b/iSolarCloud/AppService/getHouseholdPsInstallerByUserId/struct.go @@ -6,8 +6,8 @@ package getHouseholdPsInstallerByUserId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getHouseholdStoragePsReport/data.go b/iSolarCloud/AppService/getHouseholdStoragePsReport/data.go index c359dd1f5..20affd0e1 100644 --- a/iSolarCloud/AppService/getHouseholdStoragePsReport/data.go +++ b/iSolarCloud/AppService/getHouseholdStoragePsReport/data.go @@ -2,8 +2,8 @@ package getHouseholdStoragePsReport import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "encoding/json" "fmt" "github.com/MickMake/GoUnify/Only" @@ -20,7 +20,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -343,10 +343,10 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsId.String() - entries.StructToDataMap(*e, e.Request.PsId.String(), apiReflect.NewEndPointPath(e.Request.PsId.String())) + entries.StructToDataMap(*e, e.Request.PsId.String(), GoStruct.NewEndPointPath(e.Request.PsId.String())) } return entries diff --git a/iSolarCloud/AppService/getHouseholdStoragePsReport/struct.go b/iSolarCloud/AppService/getHouseholdStoragePsReport/struct.go index 8b790d8f4..ad5c60c25 100644 --- a/iSolarCloud/AppService/getHouseholdStoragePsReport/struct.go +++ b/iSolarCloud/AppService/getHouseholdStoragePsReport/struct.go @@ -6,8 +6,8 @@ package getHouseholdStoragePsReport import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getHouseholdUserInfo/data.go b/iSolarCloud/AppService/getHouseholdUserInfo/data.go index b9290b44a..29d2051ab 100644 --- a/iSolarCloud/AppService/getHouseholdUserInfo/data.go +++ b/iSolarCloud/AppService/getHouseholdUserInfo/data.go @@ -2,8 +2,8 @@ package getHouseholdUserInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getHouseholdUserInfo/struct.go b/iSolarCloud/AppService/getHouseholdUserInfo/struct.go index d1b213f9f..4af9700e8 100644 --- a/iSolarCloud/AppService/getHouseholdUserInfo/struct.go +++ b/iSolarCloud/AppService/getHouseholdUserInfo/struct.go @@ -6,8 +6,8 @@ package getHouseholdUserInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getHouseholdWorkOrderInfo/data.go b/iSolarCloud/AppService/getHouseholdWorkOrderInfo/data.go index 2231688a0..7e8caf48d 100644 --- a/iSolarCloud/AppService/getHouseholdWorkOrderInfo/data.go +++ b/iSolarCloud/AppService/getHouseholdWorkOrderInfo/data.go @@ -2,8 +2,8 @@ package getHouseholdWorkOrderInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getHouseholdWorkOrderInfo/struct.go b/iSolarCloud/AppService/getHouseholdWorkOrderInfo/struct.go index 9f33b7753..c4e6e43d4 100644 --- a/iSolarCloud/AppService/getHouseholdWorkOrderInfo/struct.go +++ b/iSolarCloud/AppService/getHouseholdWorkOrderInfo/struct.go @@ -6,8 +6,8 @@ package getHouseholdWorkOrderInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getHouseholdWorkOrderList/data.go b/iSolarCloud/AppService/getHouseholdWorkOrderList/data.go index 2a63d2b6d..9d902c6ef 100644 --- a/iSolarCloud/AppService/getHouseholdWorkOrderList/data.go +++ b/iSolarCloud/AppService/getHouseholdWorkOrderList/data.go @@ -2,8 +2,8 @@ package getHouseholdWorkOrderList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getHouseholdWorkOrderList/struct.go b/iSolarCloud/AppService/getHouseholdWorkOrderList/struct.go index 5b4e230a0..006551658 100644 --- a/iSolarCloud/AppService/getHouseholdWorkOrderList/struct.go +++ b/iSolarCloud/AppService/getHouseholdWorkOrderList/struct.go @@ -6,8 +6,8 @@ package getHouseholdWorkOrderList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getI18nConfigByType/data.go b/iSolarCloud/AppService/getI18nConfigByType/data.go index 123ff53d9..cbbe0c56b 100644 --- a/iSolarCloud/AppService/getI18nConfigByType/data.go +++ b/iSolarCloud/AppService/getI18nConfigByType/data.go @@ -2,8 +2,8 @@ package getI18nConfigByType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getI18nConfigByType/struct.go b/iSolarCloud/AppService/getI18nConfigByType/struct.go index dbe30989d..d9c7cffbd 100644 --- a/iSolarCloud/AppService/getI18nConfigByType/struct.go +++ b/iSolarCloud/AppService/getI18nConfigByType/struct.go @@ -6,8 +6,8 @@ package getI18nConfigByType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getI18nFileInfo/data.go b/iSolarCloud/AppService/getI18nFileInfo/data.go index cb6b5baa6..20199bc82 100644 --- a/iSolarCloud/AppService/getI18nFileInfo/data.go +++ b/iSolarCloud/AppService/getI18nFileInfo/data.go @@ -2,8 +2,8 @@ package getI18nFileInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getI18nFileInfo/struct.go b/iSolarCloud/AppService/getI18nFileInfo/struct.go index b772bf092..3f3c9776d 100644 --- a/iSolarCloud/AppService/getI18nFileInfo/struct.go +++ b/iSolarCloud/AppService/getI18nFileInfo/struct.go @@ -6,8 +6,8 @@ package getI18nFileInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getI18nInfoByKey/data.go b/iSolarCloud/AppService/getI18nInfoByKey/data.go index d3a063e0d..1aba98b70 100644 --- a/iSolarCloud/AppService/getI18nInfoByKey/data.go +++ b/iSolarCloud/AppService/getI18nInfoByKey/data.go @@ -2,8 +2,8 @@ package getI18nInfoByKey import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getI18nInfoByKey/struct.go b/iSolarCloud/AppService/getI18nInfoByKey/struct.go index cc28650fe..9acce77f4 100644 --- a/iSolarCloud/AppService/getI18nInfoByKey/struct.go +++ b/iSolarCloud/AppService/getI18nInfoByKey/struct.go @@ -6,8 +6,8 @@ package getI18nInfoByKey import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getI18nVersion/data.go b/iSolarCloud/AppService/getI18nVersion/data.go index d20a6bbca..6f691d6f7 100644 --- a/iSolarCloud/AppService/getI18nVersion/data.go +++ b/iSolarCloud/AppService/getI18nVersion/data.go @@ -2,8 +2,8 @@ package getI18nVersion import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getI18nVersion/struct.go b/iSolarCloud/AppService/getI18nVersion/struct.go index c6e23e025..06d9bc564 100644 --- a/iSolarCloud/AppService/getI18nVersion/struct.go +++ b/iSolarCloud/AppService/getI18nVersion/struct.go @@ -6,8 +6,8 @@ package getI18nVersion import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getIncomeSettingInfos/data.go b/iSolarCloud/AppService/getIncomeSettingInfos/data.go index 400a4088a..1b9b1089d 100644 --- a/iSolarCloud/AppService/getIncomeSettingInfos/data.go +++ b/iSolarCloud/AppService/getIncomeSettingInfos/data.go @@ -2,8 +2,8 @@ package getIncomeSettingInfos import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -73,10 +73,10 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsId.String() - entries.StructToDataMap(*e, e.Request.PsId.String(), apiReflect.NewEndPointPath(e.Request.PsId.String())) + entries.StructToDataMap(*e, e.Request.PsId.String(), GoStruct.NewEndPointPath(e.Request.PsId.String())) } return entries diff --git a/iSolarCloud/AppService/getIncomeSettingInfos/struct.go b/iSolarCloud/AppService/getIncomeSettingInfos/struct.go index d745190a3..a11574fed 100644 --- a/iSolarCloud/AppService/getIncomeSettingInfos/struct.go +++ b/iSolarCloud/AppService/getIncomeSettingInfos/struct.go @@ -6,8 +6,8 @@ package getIncomeSettingInfos import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getInfoFromAMap/data.go b/iSolarCloud/AppService/getInfoFromAMap/data.go index 1461e4f61..991ce4c53 100644 --- a/iSolarCloud/AppService/getInfoFromAMap/data.go +++ b/iSolarCloud/AppService/getInfoFromAMap/data.go @@ -2,8 +2,8 @@ package getInfoFromAMap import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getInfoFromAMap/struct.go b/iSolarCloud/AppService/getInfoFromAMap/struct.go index 70c170040..5aafd03e8 100644 --- a/iSolarCloud/AppService/getInfoFromAMap/struct.go +++ b/iSolarCloud/AppService/getInfoFromAMap/struct.go @@ -6,8 +6,8 @@ package getInfoFromAMap import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getInfomationFromRedis/data.go b/iSolarCloud/AppService/getInfomationFromRedis/data.go index 203ba386a..57548bc07 100644 --- a/iSolarCloud/AppService/getInfomationFromRedis/data.go +++ b/iSolarCloud/AppService/getInfomationFromRedis/data.go @@ -2,8 +2,8 @@ package getInfomationFromRedis import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getInfomationFromRedis/struct.go b/iSolarCloud/AppService/getInfomationFromRedis/struct.go index d175a1cd6..5e3e24c86 100644 --- a/iSolarCloud/AppService/getInfomationFromRedis/struct.go +++ b/iSolarCloud/AppService/getInfomationFromRedis/struct.go @@ -6,8 +6,8 @@ package getInfomationFromRedis import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getInstallInfoList/data.go b/iSolarCloud/AppService/getInstallInfoList/data.go index e8208c98f..fecc78485 100644 --- a/iSolarCloud/AppService/getInstallInfoList/data.go +++ b/iSolarCloud/AppService/getInstallInfoList/data.go @@ -2,8 +2,8 @@ package getInstallInfoList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getInstallInfoList/struct.go b/iSolarCloud/AppService/getInstallInfoList/struct.go index e87c76bb5..dfcf5d740 100644 --- a/iSolarCloud/AppService/getInstallInfoList/struct.go +++ b/iSolarCloud/AppService/getInstallInfoList/struct.go @@ -6,8 +6,8 @@ package getInstallInfoList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getInstallerInfoByDealerOrgCodeOrId/data.go b/iSolarCloud/AppService/getInstallerInfoByDealerOrgCodeOrId/data.go index 6052d613f..7daf91e0a 100644 --- a/iSolarCloud/AppService/getInstallerInfoByDealerOrgCodeOrId/data.go +++ b/iSolarCloud/AppService/getInstallerInfoByDealerOrgCodeOrId/data.go @@ -2,8 +2,8 @@ package getInstallerInfoByDealerOrgCodeOrId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -17,7 +17,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -33,7 +33,7 @@ type ResultData struct { Installer string `json:"installer"` InstallerEmail string `json:"installer_email"` InstallerPhone string `json:"installer_phone"` - MobleTel interface{} `json:"moble_tel"` + MobleTel interface{} `json:"moble_tel" PointId:"mobile_tel"` OrgId valueTypes.Integer `json:"org_id"` OrgName string `json:"org_name"` UserId valueTypes.Integer `json:"user_id"` diff --git a/iSolarCloud/AppService/getInstallerInfoByDealerOrgCodeOrId/struct.go b/iSolarCloud/AppService/getInstallerInfoByDealerOrgCodeOrId/struct.go index f20915e8b..8e455c478 100644 --- a/iSolarCloud/AppService/getInstallerInfoByDealerOrgCodeOrId/struct.go +++ b/iSolarCloud/AppService/getInstallerInfoByDealerOrgCodeOrId/struct.go @@ -6,8 +6,8 @@ package getInstallerInfoByDealerOrgCodeOrId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getInvertDataList/data.go b/iSolarCloud/AppService/getInvertDataList/data.go index 79fff438b..c5f0823b0 100644 --- a/iSolarCloud/AppService/getInvertDataList/data.go +++ b/iSolarCloud/AppService/getInvertDataList/data.go @@ -2,7 +2,7 @@ package getInvertDataList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" + "GoSungrow/iSolarCloud/api/GoStruct" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -14,7 +14,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getInvertDataList/struct.go b/iSolarCloud/AppService/getInvertDataList/struct.go index ff760de48..b6fc3c58f 100644 --- a/iSolarCloud/AppService/getInvertDataList/struct.go +++ b/iSolarCloud/AppService/getInvertDataList/struct.go @@ -6,8 +6,8 @@ package getInvertDataList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getInverterDataCount/data.go b/iSolarCloud/AppService/getInverterDataCount/data.go index a7651a7d7..f928e2192 100644 --- a/iSolarCloud/AppService/getInverterDataCount/data.go +++ b/iSolarCloud/AppService/getInverterDataCount/data.go @@ -2,8 +2,8 @@ package getInverterDataCount import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getInverterDataCount/struct.go b/iSolarCloud/AppService/getInverterDataCount/struct.go index 35231261c..c893f5899 100644 --- a/iSolarCloud/AppService/getInverterDataCount/struct.go +++ b/iSolarCloud/AppService/getInverterDataCount/struct.go @@ -6,8 +6,8 @@ package getInverterDataCount import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getInverterProcess/data.go b/iSolarCloud/AppService/getInverterProcess/data.go index 7050ea339..a9dd5b6d0 100644 --- a/iSolarCloud/AppService/getInverterProcess/data.go +++ b/iSolarCloud/AppService/getInverterProcess/data.go @@ -2,8 +2,8 @@ package getInverterProcess import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getInverterProcess/struct.go b/iSolarCloud/AppService/getInverterProcess/struct.go index 78caa7bb5..127dedc32 100644 --- a/iSolarCloud/AppService/getInverterProcess/struct.go +++ b/iSolarCloud/AppService/getInverterProcess/struct.go @@ -6,8 +6,8 @@ package getInverterProcess import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getInverterUuidBytotalId/data.go b/iSolarCloud/AppService/getInverterUuidBytotalId/data.go index 5e24d56cf..97f9ecb65 100644 --- a/iSolarCloud/AppService/getInverterUuidBytotalId/data.go +++ b/iSolarCloud/AppService/getInverterUuidBytotalId/data.go @@ -2,8 +2,8 @@ package getInverterUuidBytotalId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getInverterUuidBytotalId/struct.go b/iSolarCloud/AppService/getInverterUuidBytotalId/struct.go index 9356247d1..b38fc0855 100644 --- a/iSolarCloud/AppService/getInverterUuidBytotalId/struct.go +++ b/iSolarCloud/AppService/getInverterUuidBytotalId/struct.go @@ -6,8 +6,8 @@ package getInverterUuidBytotalId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getIvEchartsData/data.go b/iSolarCloud/AppService/getIvEchartsData/data.go index bdfe59147..514753f17 100644 --- a/iSolarCloud/AppService/getIvEchartsData/data.go +++ b/iSolarCloud/AppService/getIvEchartsData/data.go @@ -2,8 +2,8 @@ package getIvEchartsData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getIvEchartsData/struct.go b/iSolarCloud/AppService/getIvEchartsData/struct.go index 3f28d9422..2ad9048da 100644 --- a/iSolarCloud/AppService/getIvEchartsData/struct.go +++ b/iSolarCloud/AppService/getIvEchartsData/struct.go @@ -6,8 +6,8 @@ package getIvEchartsData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getIvEchartsDataById/data.go b/iSolarCloud/AppService/getIvEchartsDataById/data.go index 29d11f9c8..c775aa708 100644 --- a/iSolarCloud/AppService/getIvEchartsDataById/data.go +++ b/iSolarCloud/AppService/getIvEchartsDataById/data.go @@ -2,8 +2,8 @@ package getIvEchartsDataById import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getIvEchartsDataById/struct.go b/iSolarCloud/AppService/getIvEchartsDataById/struct.go index 62da3b559..b9ab5eea9 100644 --- a/iSolarCloud/AppService/getIvEchartsDataById/struct.go +++ b/iSolarCloud/AppService/getIvEchartsDataById/struct.go @@ -6,8 +6,8 @@ package getIvEchartsDataById import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getKpiInfo/data.go b/iSolarCloud/AppService/getKpiInfo/data.go index 50d71c8b6..1ef482c89 100644 --- a/iSolarCloud/AppService/getKpiInfo/data.go +++ b/iSolarCloud/AppService/getKpiInfo/data.go @@ -2,8 +2,9 @@ package getKpiInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -15,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -24,7 +25,9 @@ func (rd RequestData) Help() string { } type ResultData struct { - ActualEnergy []valueTypes.Float `json:"actual_energy" PointUnitFrom:"ActualEnergyUnit"` + ActualEnergy []valueTypes.Float `json:"actual_energy" PointUnitFrom:"ActualEnergyUnit" DataTable:"true" DataTableMerge:"true" DataTableShowIndex:"true"` + PlanEnergy []valueTypes.Float `json:"plan_energy" PointUnitFrom:"PlanEnergyUnit" DataTable:"true" DataTableMerge:"true" DataTableShowIndex:"true"` + ActualEnergyUnit valueTypes.String `json:"actual_energy_unit" PointIgnore:"true"` ChargeTotalEnergy valueTypes.Float `json:"charge_total_energy" PointUnitFrom:"ChargeTotalEnergyUnit" PointUpdateFreq:"UpdateFreqTotal"` ChargeTotalEnergyUnit valueTypes.String `json:"charge_total_energy_unit" PointIgnore:"true"` @@ -35,7 +38,6 @@ type ResultData struct { P83024 valueTypes.Float `json:"p83024"` PercentPlanMonth valueTypes.Float `json:"percent_plan_month" PointUnit:"%" PointUpdateFreq:"UpdateFreqMonth"` PercentPlanYear valueTypes.Float `json:"percent_plan_year" PointUnit:"%" PointUpdateFreq:"UpdateFreqYear"` - PlanEnergy []valueTypes.Float `json:"plan_energy" PointUnitFrom:"PlanEnergyUnit"` PlanEnergyUnit valueTypes.String `json:"plan_energy_unit" PointIgnore:"true"` PsCount valueTypes.Integer `json:"ps_count"` TodayEnergy valueTypes.UnitValue `json:"today_energy" PointUpdateFreq:"UpdateFreqTotal"` @@ -54,7 +56,7 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - pkg := apiReflect.GetName("", *e) + pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) entries.StructToDataMap(*e, "system", nil) diff --git a/iSolarCloud/AppService/getKpiInfo/struct.go b/iSolarCloud/AppService/getKpiInfo/struct.go index 7f4a54f82..d21a5503b 100644 --- a/iSolarCloud/AppService/getKpiInfo/struct.go +++ b/iSolarCloud/AppService/getKpiInfo/struct.go @@ -6,8 +6,8 @@ package getKpiInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getListMiFromHBase/data.go b/iSolarCloud/AppService/getListMiFromHBase/data.go index bff867df3..4d761f05a 100644 --- a/iSolarCloud/AppService/getListMiFromHBase/data.go +++ b/iSolarCloud/AppService/getListMiFromHBase/data.go @@ -2,8 +2,8 @@ package getListMiFromHBase import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -17,7 +17,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getListMiFromHBase/struct.go b/iSolarCloud/AppService/getListMiFromHBase/struct.go index 64f367cb7..676978ea6 100644 --- a/iSolarCloud/AppService/getListMiFromHBase/struct.go +++ b/iSolarCloud/AppService/getListMiFromHBase/struct.go @@ -6,8 +6,8 @@ package getListMiFromHBase import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getMapInfo/data.go b/iSolarCloud/AppService/getMapInfo/data.go index d5154a327..23060f13f 100644 --- a/iSolarCloud/AppService/getMapInfo/data.go +++ b/iSolarCloud/AppService/getMapInfo/data.go @@ -2,7 +2,7 @@ package getMapInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" + "GoSungrow/iSolarCloud/api/GoStruct" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -14,7 +14,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getMapInfo/struct.go b/iSolarCloud/AppService/getMapInfo/struct.go index cebd76168..03556a6b5 100644 --- a/iSolarCloud/AppService/getMapInfo/struct.go +++ b/iSolarCloud/AppService/getMapInfo/struct.go @@ -6,8 +6,8 @@ package getMapInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getMapMiFromHBase/data.go b/iSolarCloud/AppService/getMapMiFromHBase/data.go index c2d19385f..3106e757e 100644 --- a/iSolarCloud/AppService/getMapMiFromHBase/data.go +++ b/iSolarCloud/AppService/getMapMiFromHBase/data.go @@ -2,8 +2,8 @@ package getMapMiFromHBase import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getMapMiFromHBase/struct.go b/iSolarCloud/AppService/getMapMiFromHBase/struct.go index 997063a9d..fdf881c94 100644 --- a/iSolarCloud/AppService/getMapMiFromHBase/struct.go +++ b/iSolarCloud/AppService/getMapMiFromHBase/struct.go @@ -6,8 +6,8 @@ package getMapMiFromHBase import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getMenuAndPrivileges/data.go b/iSolarCloud/AppService/getMenuAndPrivileges/data.go index 8cd394b0b..cd27a7ed4 100644 --- a/iSolarCloud/AppService/getMenuAndPrivileges/data.go +++ b/iSolarCloud/AppService/getMenuAndPrivileges/data.go @@ -2,8 +2,8 @@ package getMenuAndPrivileges import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getMenuAndPrivileges/struct.go b/iSolarCloud/AppService/getMenuAndPrivileges/struct.go index 05f94c388..8a71c1845 100644 --- a/iSolarCloud/AppService/getMenuAndPrivileges/struct.go +++ b/iSolarCloud/AppService/getMenuAndPrivileges/struct.go @@ -6,8 +6,8 @@ package getMenuAndPrivileges import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getMicrogridEStoragePsReport/data.go b/iSolarCloud/AppService/getMicrogridEStoragePsReport/data.go index 144ae27f7..6544d81f1 100644 --- a/iSolarCloud/AppService/getMicrogridEStoragePsReport/data.go +++ b/iSolarCloud/AppService/getMicrogridEStoragePsReport/data.go @@ -2,8 +2,8 @@ package getMicrogridEStoragePsReport import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getMicrogridEStoragePsReport/struct.go b/iSolarCloud/AppService/getMicrogridEStoragePsReport/struct.go index 58f040757..7ed75ffcd 100644 --- a/iSolarCloud/AppService/getMicrogridEStoragePsReport/struct.go +++ b/iSolarCloud/AppService/getMicrogridEStoragePsReport/struct.go @@ -6,8 +6,8 @@ package getMicrogridEStoragePsReport import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getModuleLogInfo/data.go b/iSolarCloud/AppService/getModuleLogInfo/data.go index 3fc9c9296..da9095306 100644 --- a/iSolarCloud/AppService/getModuleLogInfo/data.go +++ b/iSolarCloud/AppService/getModuleLogInfo/data.go @@ -2,8 +2,8 @@ package getModuleLogInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getModuleLogInfo/struct.go b/iSolarCloud/AppService/getModuleLogInfo/struct.go index 8bdee06f3..b306b2b0a 100644 --- a/iSolarCloud/AppService/getModuleLogInfo/struct.go +++ b/iSolarCloud/AppService/getModuleLogInfo/struct.go @@ -6,8 +6,8 @@ package getModuleLogInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getModuleLogTaskList/data.go b/iSolarCloud/AppService/getModuleLogTaskList/data.go index 80cb50ba0..5735e10f9 100644 --- a/iSolarCloud/AppService/getModuleLogTaskList/data.go +++ b/iSolarCloud/AppService/getModuleLogTaskList/data.go @@ -2,8 +2,8 @@ package getModuleLogTaskList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -15,7 +15,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -24,8 +24,8 @@ func (rd RequestData) Help() string { } type ResultData struct { - CurPage valueTypes.Integer `json:"curPage"` - IsMore valueTypes.Bool `json:"isMore"` + CurPage valueTypes.Integer `json:"curPage" PointId:"cur_page"` + IsMore valueTypes.Bool `json:"isMore" PointId:"is_more"` PageList []struct { BatchId valueTypes.String `json:"batch_id"` CommandStatus valueTypes.Integer `json:"command_status"` @@ -50,11 +50,11 @@ type ResultData struct { TaskId valueTypes.Integer `json:"task_id"` TaskName valueTypes.Integer `json:"task_name"` UpdateTime valueTypes.DateTime `json:"update_time"` - } `json:"pageList" PointNameFromChild:"TaskId" PointNameAppend:"false" PointArrayFlatten:"false" DataTable:"true"` - RowCount valueTypes.Integer `json:"rowCount"` + } `json:"pageList" PointId:"page_list" PointNameFromChild:"TaskId" PointNameAppend:"false" PointArrayFlatten:"false" DataTable:"true"` + RowCount valueTypes.Integer `json:"rowCount" PointId:"row_count"` Size valueTypes.Integer `json:"size"` - StartIndex valueTypes.Integer `json:"startIndex"` - TotalPage valueTypes.Integer `json:"totalPage"` + StartIndex valueTypes.Integer `json:"startIndex" PointId:"start_index"` + TotalPage valueTypes.Integer `json:"totalPage" PointId:"total_page"` } func (e *ResultData) IsValid() error { diff --git a/iSolarCloud/AppService/getModuleLogTaskList/struct.go b/iSolarCloud/AppService/getModuleLogTaskList/struct.go index a66d83907..3d3ad0e96 100644 --- a/iSolarCloud/AppService/getModuleLogTaskList/struct.go +++ b/iSolarCloud/AppService/getModuleLogTaskList/struct.go @@ -6,8 +6,8 @@ package getModuleLogTaskList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getNationProvJSON/data.go b/iSolarCloud/AppService/getNationProvJSON/data.go index deeccbdcd..4d99d71c2 100644 --- a/iSolarCloud/AppService/getNationProvJSON/data.go +++ b/iSolarCloud/AppService/getNationProvJSON/data.go @@ -2,8 +2,8 @@ package getNationProvJSON import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getNationProvJSON/struct.go b/iSolarCloud/AppService/getNationProvJSON/struct.go index bfd955ec8..26de9a4a5 100644 --- a/iSolarCloud/AppService/getNationProvJSON/struct.go +++ b/iSolarCloud/AppService/getNationProvJSON/struct.go @@ -6,8 +6,8 @@ package getNationProvJSON import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getNeedOpAsynOpRecordList/data.go b/iSolarCloud/AppService/getNeedOpAsynOpRecordList/data.go index 44d2b2f06..cc77724d5 100644 --- a/iSolarCloud/AppService/getNeedOpAsynOpRecordList/data.go +++ b/iSolarCloud/AppService/getNeedOpAsynOpRecordList/data.go @@ -2,8 +2,8 @@ package getNeedOpAsynOpRecordList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getNeedOpAsynOpRecordList/struct.go b/iSolarCloud/AppService/getNeedOpAsynOpRecordList/struct.go index 803d633f8..3bca3268c 100644 --- a/iSolarCloud/AppService/getNeedOpAsynOpRecordList/struct.go +++ b/iSolarCloud/AppService/getNeedOpAsynOpRecordList/struct.go @@ -6,8 +6,8 @@ package getNeedOpAsynOpRecordList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getNoticeInfo/data.go b/iSolarCloud/AppService/getNoticeInfo/data.go index 3d48e3e50..59fcc66e5 100644 --- a/iSolarCloud/AppService/getNoticeInfo/data.go +++ b/iSolarCloud/AppService/getNoticeInfo/data.go @@ -2,8 +2,8 @@ package getNoticeInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getNoticeInfo/struct.go b/iSolarCloud/AppService/getNoticeInfo/struct.go index f8795a327..b466656de 100644 --- a/iSolarCloud/AppService/getNoticeInfo/struct.go +++ b/iSolarCloud/AppService/getNoticeInfo/struct.go @@ -6,8 +6,8 @@ package getNoticeInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getNumberOfServiceCalls/data.go b/iSolarCloud/AppService/getNumberOfServiceCalls/data.go index ab979de5e..42d7024b7 100644 --- a/iSolarCloud/AppService/getNumberOfServiceCalls/data.go +++ b/iSolarCloud/AppService/getNumberOfServiceCalls/data.go @@ -2,8 +2,8 @@ package getNumberOfServiceCalls import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getNumberOfServiceCalls/struct.go b/iSolarCloud/AppService/getNumberOfServiceCalls/struct.go index 4d71e531f..581c3cf6c 100644 --- a/iSolarCloud/AppService/getNumberOfServiceCalls/struct.go +++ b/iSolarCloud/AppService/getNumberOfServiceCalls/struct.go @@ -6,8 +6,8 @@ package getNumberOfServiceCalls import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getOSSConfig/data.go b/iSolarCloud/AppService/getOSSConfig/data.go index 54878b4c7..950591ddb 100644 --- a/iSolarCloud/AppService/getOSSConfig/data.go +++ b/iSolarCloud/AppService/getOSSConfig/data.go @@ -2,8 +2,8 @@ package getOSSConfig import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getOSSConfig/struct.go b/iSolarCloud/AppService/getOSSConfig/struct.go index de8f5ad65..d1b6c414e 100644 --- a/iSolarCloud/AppService/getOSSConfig/struct.go +++ b/iSolarCloud/AppService/getOSSConfig/struct.go @@ -6,8 +6,8 @@ package getOSSConfig import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getOperRuleDetail/data.go b/iSolarCloud/AppService/getOperRuleDetail/data.go index f763dc580..7ef2d717d 100644 --- a/iSolarCloud/AppService/getOperRuleDetail/data.go +++ b/iSolarCloud/AppService/getOperRuleDetail/data.go @@ -2,8 +2,8 @@ package getOperRuleDetail import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getOperRuleDetail/struct.go b/iSolarCloud/AppService/getOperRuleDetail/struct.go index ede8f6b14..9b26fd1fa 100644 --- a/iSolarCloud/AppService/getOperRuleDetail/struct.go +++ b/iSolarCloud/AppService/getOperRuleDetail/struct.go @@ -6,8 +6,8 @@ package getOperRuleDetail import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getOperateBillFileId/data.go b/iSolarCloud/AppService/getOperateBillFileId/data.go index 149d65e4d..384ee5f04 100644 --- a/iSolarCloud/AppService/getOperateBillFileId/data.go +++ b/iSolarCloud/AppService/getOperateBillFileId/data.go @@ -2,8 +2,8 @@ package getOperateBillFileId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getOperateBillFileId/struct.go b/iSolarCloud/AppService/getOperateBillFileId/struct.go index 01a71e909..8599691d6 100644 --- a/iSolarCloud/AppService/getOperateBillFileId/struct.go +++ b/iSolarCloud/AppService/getOperateBillFileId/struct.go @@ -6,8 +6,8 @@ package getOperateBillFileId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getOperateTicketForDetail/data.go b/iSolarCloud/AppService/getOperateTicketForDetail/data.go index 4fc3a1743..171eca7db 100644 --- a/iSolarCloud/AppService/getOperateTicketForDetail/data.go +++ b/iSolarCloud/AppService/getOperateTicketForDetail/data.go @@ -2,8 +2,8 @@ package getOperateTicketForDetail import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getOperateTicketForDetail/struct.go b/iSolarCloud/AppService/getOperateTicketForDetail/struct.go index 33a5b19fa..aa4a2c2f4 100644 --- a/iSolarCloud/AppService/getOperateTicketForDetail/struct.go +++ b/iSolarCloud/AppService/getOperateTicketForDetail/struct.go @@ -6,8 +6,8 @@ package getOperateTicketForDetail import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getOrCreateNetEaseUserToken/data.go b/iSolarCloud/AppService/getOrCreateNetEaseUserToken/data.go index 43e9751d5..d0725a1d5 100644 --- a/iSolarCloud/AppService/getOrCreateNetEaseUserToken/data.go +++ b/iSolarCloud/AppService/getOrCreateNetEaseUserToken/data.go @@ -2,8 +2,8 @@ package getOrCreateNetEaseUserToken import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getOrCreateNetEaseUserToken/struct.go b/iSolarCloud/AppService/getOrCreateNetEaseUserToken/struct.go index 21e3f7645..9018d6f89 100644 --- a/iSolarCloud/AppService/getOrCreateNetEaseUserToken/struct.go +++ b/iSolarCloud/AppService/getOrCreateNetEaseUserToken/struct.go @@ -6,8 +6,8 @@ package getOrCreateNetEaseUserToken import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getOrderDataList/data.go b/iSolarCloud/AppService/getOrderDataList/data.go index 4bdee5a6e..f8da0062e 100644 --- a/iSolarCloud/AppService/getOrderDataList/data.go +++ b/iSolarCloud/AppService/getOrderDataList/data.go @@ -2,8 +2,8 @@ package getOrderDataList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getOrderDataList/struct.go b/iSolarCloud/AppService/getOrderDataList/struct.go index 4f85fbc83..43d2738a5 100644 --- a/iSolarCloud/AppService/getOrderDataList/struct.go +++ b/iSolarCloud/AppService/getOrderDataList/struct.go @@ -6,8 +6,8 @@ package getOrderDataList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getOrderDataSql2/data.go b/iSolarCloud/AppService/getOrderDataSql2/data.go index 16ab5088b..635630759 100644 --- a/iSolarCloud/AppService/getOrderDataSql2/data.go +++ b/iSolarCloud/AppService/getOrderDataSql2/data.go @@ -2,8 +2,8 @@ package getOrderDataSql2 import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getOrderDataSql2/struct.go b/iSolarCloud/AppService/getOrderDataSql2/struct.go index 67d6b7474..e0ece55ea 100644 --- a/iSolarCloud/AppService/getOrderDataSql2/struct.go +++ b/iSolarCloud/AppService/getOrderDataSql2/struct.go @@ -6,8 +6,8 @@ package getOrderDataSql2 import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getOrderDatas/data.go b/iSolarCloud/AppService/getOrderDatas/data.go index 1f321f31e..ef7b1b522 100644 --- a/iSolarCloud/AppService/getOrderDatas/data.go +++ b/iSolarCloud/AppService/getOrderDatas/data.go @@ -2,8 +2,8 @@ package getOrderDatas import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getOrderDatas/struct.go b/iSolarCloud/AppService/getOrderDatas/struct.go index 0c9d899dd..6773c3517 100644 --- a/iSolarCloud/AppService/getOrderDatas/struct.go +++ b/iSolarCloud/AppService/getOrderDatas/struct.go @@ -6,8 +6,8 @@ package getOrderDatas import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getOrderDetail/data.go b/iSolarCloud/AppService/getOrderDetail/data.go index 7896bd217..e703096ac 100644 --- a/iSolarCloud/AppService/getOrderDetail/data.go +++ b/iSolarCloud/AppService/getOrderDetail/data.go @@ -2,8 +2,8 @@ package getOrderDetail import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getOrderDetail/struct.go b/iSolarCloud/AppService/getOrderDetail/struct.go index 9a797fd57..19c3f02bd 100644 --- a/iSolarCloud/AppService/getOrderDetail/struct.go +++ b/iSolarCloud/AppService/getOrderDetail/struct.go @@ -6,8 +6,8 @@ package getOrderDetail import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getOrderStatistics/data.go b/iSolarCloud/AppService/getOrderStatistics/data.go index 9c94993c2..d4eb07aa9 100644 --- a/iSolarCloud/AppService/getOrderStatistics/data.go +++ b/iSolarCloud/AppService/getOrderStatistics/data.go @@ -2,8 +2,8 @@ package getOrderStatistics import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getOrderStatistics/struct.go b/iSolarCloud/AppService/getOrderStatistics/struct.go index a0ab70608..566e97e26 100644 --- a/iSolarCloud/AppService/getOrderStatistics/struct.go +++ b/iSolarCloud/AppService/getOrderStatistics/struct.go @@ -6,8 +6,8 @@ package getOrderStatistics import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getOrgIdNameByUserId/data.go b/iSolarCloud/AppService/getOrgIdNameByUserId/data.go index 47ad189cf..a2b7644d1 100644 --- a/iSolarCloud/AppService/getOrgIdNameByUserId/data.go +++ b/iSolarCloud/AppService/getOrgIdNameByUserId/data.go @@ -2,8 +2,8 @@ package getOrgIdNameByUserId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getOrgIdNameByUserId/struct.go b/iSolarCloud/AppService/getOrgIdNameByUserId/struct.go index c1debfa60..e79ccbdf1 100644 --- a/iSolarCloud/AppService/getOrgIdNameByUserId/struct.go +++ b/iSolarCloud/AppService/getOrgIdNameByUserId/struct.go @@ -6,8 +6,8 @@ package getOrgIdNameByUserId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getOrgInfoByDealerOrgCode/data.go b/iSolarCloud/AppService/getOrgInfoByDealerOrgCode/data.go index 9fd7a5d90..8f57095d3 100644 --- a/iSolarCloud/AppService/getOrgInfoByDealerOrgCode/data.go +++ b/iSolarCloud/AppService/getOrgInfoByDealerOrgCode/data.go @@ -2,8 +2,8 @@ package getOrgInfoByDealerOrgCode import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getOrgInfoByDealerOrgCode/struct.go b/iSolarCloud/AppService/getOrgInfoByDealerOrgCode/struct.go index ae038f7e5..6c103fdd9 100644 --- a/iSolarCloud/AppService/getOrgInfoByDealerOrgCode/struct.go +++ b/iSolarCloud/AppService/getOrgInfoByDealerOrgCode/struct.go @@ -6,8 +6,8 @@ package getOrgInfoByDealerOrgCode import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getOrgListByName/data.go b/iSolarCloud/AppService/getOrgListByName/data.go index 0d639a501..7f907b497 100644 --- a/iSolarCloud/AppService/getOrgListByName/data.go +++ b/iSolarCloud/AppService/getOrgListByName/data.go @@ -2,8 +2,8 @@ package getOrgListByName import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getOrgListByName/struct.go b/iSolarCloud/AppService/getOrgListByName/struct.go index c61f363db..5d0906d6a 100644 --- a/iSolarCloud/AppService/getOrgListByName/struct.go +++ b/iSolarCloud/AppService/getOrgListByName/struct.go @@ -6,8 +6,8 @@ package getOrgListByName import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getOrgListByUserId/data.go b/iSolarCloud/AppService/getOrgListByUserId/data.go index 5ce951014..55e8572b4 100644 --- a/iSolarCloud/AppService/getOrgListByUserId/data.go +++ b/iSolarCloud/AppService/getOrgListByUserId/data.go @@ -2,8 +2,8 @@ package getOrgListByUserId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getOrgListByUserId/struct.go b/iSolarCloud/AppService/getOrgListByUserId/struct.go index 075d2362b..f20e8319d 100644 --- a/iSolarCloud/AppService/getOrgListByUserId/struct.go +++ b/iSolarCloud/AppService/getOrgListByUserId/struct.go @@ -6,8 +6,8 @@ package getOrgListByUserId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getOrgListForUser/data.go b/iSolarCloud/AppService/getOrgListForUser/data.go index 77d1e79d8..af8a61233 100644 --- a/iSolarCloud/AppService/getOrgListForUser/data.go +++ b/iSolarCloud/AppService/getOrgListForUser/data.go @@ -2,8 +2,8 @@ package getOrgListForUser import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getOrgListForUser/struct.go b/iSolarCloud/AppService/getOrgListForUser/struct.go index 97d96ffbc..81da471db 100644 --- a/iSolarCloud/AppService/getOrgListForUser/struct.go +++ b/iSolarCloud/AppService/getOrgListForUser/struct.go @@ -6,8 +6,8 @@ package getOrgListForUser import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getOssObjectStream/data.go b/iSolarCloud/AppService/getOssObjectStream/data.go index e510f1adb..3cd9be699 100644 --- a/iSolarCloud/AppService/getOssObjectStream/data.go +++ b/iSolarCloud/AppService/getOssObjectStream/data.go @@ -2,8 +2,8 @@ package getOssObjectStream import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getOssObjectStream/struct.go b/iSolarCloud/AppService/getOssObjectStream/struct.go index 17ba6d1c0..06986defc 100644 --- a/iSolarCloud/AppService/getOssObjectStream/struct.go +++ b/iSolarCloud/AppService/getOssObjectStream/struct.go @@ -6,8 +6,8 @@ package getOssObjectStream import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getOwnerFaultConfigList/data.go b/iSolarCloud/AppService/getOwnerFaultConfigList/data.go index 02a037c23..6f117d99b 100644 --- a/iSolarCloud/AppService/getOwnerFaultConfigList/data.go +++ b/iSolarCloud/AppService/getOwnerFaultConfigList/data.go @@ -2,8 +2,8 @@ package getOwnerFaultConfigList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getOwnerFaultConfigList/struct.go b/iSolarCloud/AppService/getOwnerFaultConfigList/struct.go index a600b474c..1cb78b97a 100644 --- a/iSolarCloud/AppService/getOwnerFaultConfigList/struct.go +++ b/iSolarCloud/AppService/getOwnerFaultConfigList/struct.go @@ -6,8 +6,8 @@ package getOwnerFaultConfigList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPListinfoFromMysql/data.go b/iSolarCloud/AppService/getPListinfoFromMysql/data.go index 32dc580d9..ec6121a1a 100644 --- a/iSolarCloud/AppService/getPListinfoFromMysql/data.go +++ b/iSolarCloud/AppService/getPListinfoFromMysql/data.go @@ -2,8 +2,8 @@ package getPListinfoFromMysql import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -17,7 +17,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getPListinfoFromMysql/struct.go b/iSolarCloud/AppService/getPListinfoFromMysql/struct.go index 22f28d79c..b4179f046 100644 --- a/iSolarCloud/AppService/getPListinfoFromMysql/struct.go +++ b/iSolarCloud/AppService/getPListinfoFromMysql/struct.go @@ -6,8 +6,8 @@ package getPListinfoFromMysql import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getParamSetTemplate4NewProtocol/data.go b/iSolarCloud/AppService/getParamSetTemplate4NewProtocol/data.go index 593adec89..f1cb11cf9 100644 --- a/iSolarCloud/AppService/getParamSetTemplate4NewProtocol/data.go +++ b/iSolarCloud/AppService/getParamSetTemplate4NewProtocol/data.go @@ -2,8 +2,8 @@ package getParamSetTemplate4NewProtocol import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getParamSetTemplate4NewProtocol/struct.go b/iSolarCloud/AppService/getParamSetTemplate4NewProtocol/struct.go index 814878d6e..ba18f50d2 100644 --- a/iSolarCloud/AppService/getParamSetTemplate4NewProtocol/struct.go +++ b/iSolarCloud/AppService/getParamSetTemplate4NewProtocol/struct.go @@ -6,8 +6,8 @@ package getParamSetTemplate4NewProtocol import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getParamSetTemplatePointInfo/data.go b/iSolarCloud/AppService/getParamSetTemplatePointInfo/data.go index 9bfec2173..f311febb9 100644 --- a/iSolarCloud/AppService/getParamSetTemplatePointInfo/data.go +++ b/iSolarCloud/AppService/getParamSetTemplatePointInfo/data.go @@ -2,8 +2,8 @@ package getParamSetTemplatePointInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getParamSetTemplatePointInfo/struct.go b/iSolarCloud/AppService/getParamSetTemplatePointInfo/struct.go index 80fdf5850..932245e40 100644 --- a/iSolarCloud/AppService/getParamSetTemplatePointInfo/struct.go +++ b/iSolarCloud/AppService/getParamSetTemplatePointInfo/struct.go @@ -6,8 +6,8 @@ package getParamSetTemplatePointInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getParamterSettingBase/data.go b/iSolarCloud/AppService/getParamterSettingBase/data.go index 863011da6..07c6389d4 100644 --- a/iSolarCloud/AppService/getParamterSettingBase/data.go +++ b/iSolarCloud/AppService/getParamterSettingBase/data.go @@ -2,8 +2,8 @@ package getParamterSettingBase import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getParamterSettingBase/struct.go b/iSolarCloud/AppService/getParamterSettingBase/struct.go index 488de63e9..af47b46dd 100644 --- a/iSolarCloud/AppService/getParamterSettingBase/struct.go +++ b/iSolarCloud/AppService/getParamterSettingBase/struct.go @@ -6,8 +6,8 @@ package getParamterSettingBase import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPhotoInfo/data.go b/iSolarCloud/AppService/getPhotoInfo/data.go index e7ab7a9a6..65a2f752f 100644 --- a/iSolarCloud/AppService/getPhotoInfo/data.go +++ b/iSolarCloud/AppService/getPhotoInfo/data.go @@ -2,7 +2,7 @@ package getPhotoInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" + "GoSungrow/iSolarCloud/api/GoStruct" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -15,7 +15,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getPhotoInfo/struct.go b/iSolarCloud/AppService/getPhotoInfo/struct.go index cd10cc6b5..edf7c087e 100644 --- a/iSolarCloud/AppService/getPhotoInfo/struct.go +++ b/iSolarCloud/AppService/getPhotoInfo/struct.go @@ -6,8 +6,8 @@ package getPhotoInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPlanedOrNotPsList/data.go b/iSolarCloud/AppService/getPlanedOrNotPsList/data.go index 8a85a8a8b..f5869ee37 100644 --- a/iSolarCloud/AppService/getPlanedOrNotPsList/data.go +++ b/iSolarCloud/AppService/getPlanedOrNotPsList/data.go @@ -2,8 +2,8 @@ package getPlanedOrNotPsList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getPlanedOrNotPsList/struct.go b/iSolarCloud/AppService/getPlanedOrNotPsList/struct.go index 0d90e3efb..2b60e3283 100644 --- a/iSolarCloud/AppService/getPlanedOrNotPsList/struct.go +++ b/iSolarCloud/AppService/getPlanedOrNotPsList/struct.go @@ -6,8 +6,8 @@ package getPlanedOrNotPsList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPlantReportPDFList/data.go b/iSolarCloud/AppService/getPlantReportPDFList/data.go index 5efa4b45b..aaec89bbc 100644 --- a/iSolarCloud/AppService/getPlantReportPDFList/data.go +++ b/iSolarCloud/AppService/getPlantReportPDFList/data.go @@ -2,8 +2,8 @@ package getPlantReportPDFList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getPlantReportPDFList/struct.go b/iSolarCloud/AppService/getPlantReportPDFList/struct.go index d881441c1..daa626827 100644 --- a/iSolarCloud/AppService/getPlantReportPDFList/struct.go +++ b/iSolarCloud/AppService/getPlantReportPDFList/struct.go @@ -6,8 +6,8 @@ package getPlantReportPDFList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPowerChargeSettingInfo/data.go b/iSolarCloud/AppService/getPowerChargeSettingInfo/data.go index 21ac210cf..f107de388 100644 --- a/iSolarCloud/AppService/getPowerChargeSettingInfo/data.go +++ b/iSolarCloud/AppService/getPowerChargeSettingInfo/data.go @@ -2,8 +2,8 @@ package getPowerChargeSettingInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -53,10 +53,10 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsId.String() - entries.StructToDataMap(*e, e.Request.PsId.String(), apiReflect.NewEndPointPath(e.Request.PsId.String())) + entries.StructToDataMap(*e, e.Request.PsId.String(), GoStruct.NewEndPointPath(e.Request.PsId.String())) } return entries diff --git a/iSolarCloud/AppService/getPowerChargeSettingInfo/struct.go b/iSolarCloud/AppService/getPowerChargeSettingInfo/struct.go index 66a646a07..88833ab9a 100644 --- a/iSolarCloud/AppService/getPowerChargeSettingInfo/struct.go +++ b/iSolarCloud/AppService/getPowerChargeSettingInfo/struct.go @@ -6,8 +6,8 @@ package getPowerChargeSettingInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPowerDeviceModelTechList/data.go b/iSolarCloud/AppService/getPowerDeviceModelTechList/data.go index 2b83702b6..a6fea6490 100644 --- a/iSolarCloud/AppService/getPowerDeviceModelTechList/data.go +++ b/iSolarCloud/AppService/getPowerDeviceModelTechList/data.go @@ -2,8 +2,8 @@ package getPowerDeviceModelTechList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -52,7 +52,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getPowerDeviceModelTechList/struct.go b/iSolarCloud/AppService/getPowerDeviceModelTechList/struct.go index 0527e4ae7..0bad1ed8d 100644 --- a/iSolarCloud/AppService/getPowerDeviceModelTechList/struct.go +++ b/iSolarCloud/AppService/getPowerDeviceModelTechList/struct.go @@ -6,8 +6,8 @@ package getPowerDeviceModelTechList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPowerDeviceModelTree/data.go b/iSolarCloud/AppService/getPowerDeviceModelTree/data.go index bcb4b4687..95784344b 100644 --- a/iSolarCloud/AppService/getPowerDeviceModelTree/data.go +++ b/iSolarCloud/AppService/getPowerDeviceModelTree/data.go @@ -2,8 +2,8 @@ package getPowerDeviceModelTree import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getPowerDeviceModelTree/struct.go b/iSolarCloud/AppService/getPowerDeviceModelTree/struct.go index 1b6f6307f..717be5818 100644 --- a/iSolarCloud/AppService/getPowerDeviceModelTree/struct.go +++ b/iSolarCloud/AppService/getPowerDeviceModelTree/struct.go @@ -6,8 +6,8 @@ package getPowerDeviceModelTree import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPowerDevicePointInfo/data.go b/iSolarCloud/AppService/getPowerDevicePointInfo/data.go index 7bc78f186..f5b93bbb2 100644 --- a/iSolarCloud/AppService/getPowerDevicePointInfo/data.go +++ b/iSolarCloud/AppService/getPowerDevicePointInfo/data.go @@ -2,9 +2,9 @@ package getPowerDevicePointInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" @@ -19,7 +19,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -74,7 +74,14 @@ func (e *EndPoint) AddDataTable(table output.Table) output.Table { if rd.Id.Value() == 0 { break } - _ = table.AddRow(rd.DeviceType, rd.Id, rd.Period, rd.PointId,rd.PointName, rd.ShowPointName, rd.TranslationId) + _ = table.AddRow(rd.DeviceType.String(), + rd.Id.String(), + rd.Period.String(), + rd.PointId.String(), + rd.PointName.String(), + rd.ShowPointName.String(), + rd.TranslationId.String(), + ) } return table } @@ -82,12 +89,7 @@ func (e *EndPoint) AddDataTable(table output.Table) output.Table { func (e *EndPoint) GetPointDataTable() output.Table { var table output.Table for range Only.Once { - table = output.NewTable() - table.SetTitle("") - table.SetJson([]byte(e.GetJsonData(false))) - table.SetRaw([]byte(e.GetJsonData(true))) - - _ = table.SetHeader( + table = output.NewTable( "DeviceType", "Id", "Period", @@ -96,30 +98,32 @@ func (e *EndPoint) GetPointDataTable() output.Table { "Show Point Name", "Translation Id", ) + table.SetTitle("") + table.SetJson([]byte(e.GetJsonData(false))) + table.SetRaw([]byte(e.GetJsonData(true))) + + // _ = table.SetHeader( + // "DeviceType", + // "Id", + // "Period", + // "Point Id", + // "Point Name", + // "Show Point Name", + // "Translation Id", + // ) rd := e.Response.ResultData - _ = table.AddRow(rd.DeviceType, rd.Id, rd.Period, rd.PointId,rd.PointName, rd.ShowPointName, rd.TranslationId) + _ = table.AddRow(rd.DeviceType.String(), + rd.Id.String(), + rd.Period.String(), + rd.PointId.String(), + rd.PointName.String(), + rd.ShowPointName.String(), + rd.TranslationId.String(), + ) } return table } -//type DecodeResultData ResultData -// -//func (e *ResultData) UnmarshalJSON(data []byte) error { -// var err error -// -// for range Only.Once { -// if len(data) == 0 { -// break -// } -// var pd DecodeResultData -// -// // Store ResultData -// _ = json.Unmarshal(data, &pd) -// e.Dummy = pd.Dummy -// } -// -// return err -//} func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() diff --git a/iSolarCloud/AppService/getPowerDevicePointInfo/struct.go b/iSolarCloud/AppService/getPowerDevicePointInfo/struct.go index ea64d5353..55192c88e 100644 --- a/iSolarCloud/AppService/getPowerDevicePointInfo/struct.go +++ b/iSolarCloud/AppService/getPowerDevicePointInfo/struct.go @@ -6,8 +6,8 @@ package getPowerDevicePointInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -37,7 +37,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -95,7 +95,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -175,18 +175,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -223,7 +223,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPowerDevicePointNames/data.go b/iSolarCloud/AppService/getPowerDevicePointNames/data.go index a74cb200e..21902e05e 100644 --- a/iSolarCloud/AppService/getPowerDevicePointNames/data.go +++ b/iSolarCloud/AppService/getPowerDevicePointNames/data.go @@ -2,9 +2,9 @@ package getPowerDevicePointNames import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" @@ -54,7 +54,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -112,17 +112,22 @@ func (e *EndPoint) GetPointDataTable() output.Table { var table output.Table for range Only.Once { - table = output.NewTable() - table.SetTitle("") - table.SetJson([]byte(e.GetJsonData(false))) - table.SetRaw([]byte(e.GetJsonData(true))) - - e.Error = table.SetHeader( + table = output.NewTable( "Device Type", "Point Type", "Point Id", "Point Name", ) + table.SetTitle("") + table.SetJson([]byte(e.GetJsonData(false))) + table.SetRaw([]byte(e.GetJsonData(true))) + + // e.Error = table.SetHeader( + // "Device Type", + // "Point Type", + // "Point Id", + // "Point Name", + // ) if e.Error != nil { break } @@ -130,11 +135,10 @@ func (e *EndPoint) GetPointDataTable() output.Table { table.SetFilePrefix(e.Request.DeviceType.String()) for _, p := range e.Response.ResultData { - _ = table.AddRow( - e.Request.DeviceType, - p.PointCalType, - p.PointId, - p.PointName, + _ = table.AddRow(e.Request.DeviceType.String(), + p.PointCalType.String(), + p.PointId.String(), + p.PointName.String(), ) if table.Error != nil { continue diff --git a/iSolarCloud/AppService/getPowerDevicePointNames/struct.go b/iSolarCloud/AppService/getPowerDevicePointNames/struct.go index 9168d773d..fc38bdce5 100644 --- a/iSolarCloud/AppService/getPowerDevicePointNames/struct.go +++ b/iSolarCloud/AppService/getPowerDevicePointNames/struct.go @@ -6,8 +6,8 @@ package getPowerDevicePointNames import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPowerDeviceSetTaskDetailList/data.go b/iSolarCloud/AppService/getPowerDeviceSetTaskDetailList/data.go index b79b47d22..4df63585c 100644 --- a/iSolarCloud/AppService/getPowerDeviceSetTaskDetailList/data.go +++ b/iSolarCloud/AppService/getPowerDeviceSetTaskDetailList/data.go @@ -2,8 +2,8 @@ package getPowerDeviceSetTaskDetailList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -18,7 +18,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -28,9 +28,9 @@ func (rd RequestData) Help() string { type ResultData struct { DeviceList []interface{} `json:"device_list"` - PageList []interface{} `json:"pageList" PointNameAppend:"false" PointArrayFlatten:"false"` + PageList []interface{} `json:"pageList" PointId:"page_list" PointNameAppend:"false" PointArrayFlatten:"false"` PsNameInfoList []interface{} `json:"ps_name_info_list"` - RowCount valueTypes.Integer `json:"rowCount"` + RowCount valueTypes.Integer `json:"rowCount" PointId:"row_count"` } func (e *ResultData) IsValid() error { diff --git a/iSolarCloud/AppService/getPowerDeviceSetTaskDetailList/struct.go b/iSolarCloud/AppService/getPowerDeviceSetTaskDetailList/struct.go index 65d3fb178..1923bd917 100644 --- a/iSolarCloud/AppService/getPowerDeviceSetTaskDetailList/struct.go +++ b/iSolarCloud/AppService/getPowerDeviceSetTaskDetailList/struct.go @@ -6,8 +6,8 @@ package getPowerDeviceSetTaskDetailList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPowerDeviceSetTaskList/data.go b/iSolarCloud/AppService/getPowerDeviceSetTaskList/data.go index c01d25b69..c7ebb59a9 100644 --- a/iSolarCloud/AppService/getPowerDeviceSetTaskList/data.go +++ b/iSolarCloud/AppService/getPowerDeviceSetTaskList/data.go @@ -2,8 +2,8 @@ package getPowerDeviceSetTaskList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -17,7 +17,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -67,7 +67,7 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsId.String() entries.StructToDataMap(*e, "system", nil) diff --git a/iSolarCloud/AppService/getPowerDeviceSetTaskList/struct.go b/iSolarCloud/AppService/getPowerDeviceSetTaskList/struct.go index a75c36b8f..cef2ffc0a 100644 --- a/iSolarCloud/AppService/getPowerDeviceSetTaskList/struct.go +++ b/iSolarCloud/AppService/getPowerDeviceSetTaskList/struct.go @@ -6,8 +6,8 @@ package getPowerDeviceSetTaskList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPowerFormulaFaultAnalyse/data.go b/iSolarCloud/AppService/getPowerFormulaFaultAnalyse/data.go index 520da6725..4b5e64e25 100644 --- a/iSolarCloud/AppService/getPowerFormulaFaultAnalyse/data.go +++ b/iSolarCloud/AppService/getPowerFormulaFaultAnalyse/data.go @@ -2,8 +2,8 @@ package getPowerFormulaFaultAnalyse import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getPowerFormulaFaultAnalyse/struct.go b/iSolarCloud/AppService/getPowerFormulaFaultAnalyse/struct.go index 7d51f0d6e..6751c9e60 100644 --- a/iSolarCloud/AppService/getPowerFormulaFaultAnalyse/struct.go +++ b/iSolarCloud/AppService/getPowerFormulaFaultAnalyse/struct.go @@ -6,8 +6,8 @@ package getPowerFormulaFaultAnalyse import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPowerPictureList/data.go b/iSolarCloud/AppService/getPowerPictureList/data.go index 5a5254085..08ee07709 100644 --- a/iSolarCloud/AppService/getPowerPictureList/data.go +++ b/iSolarCloud/AppService/getPowerPictureList/data.go @@ -2,7 +2,7 @@ package getPowerPictureList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" + "GoSungrow/iSolarCloud/api/GoStruct" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -14,7 +14,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getPowerPictureList/struct.go b/iSolarCloud/AppService/getPowerPictureList/struct.go index 9fbfbc322..51f3ff58c 100644 --- a/iSolarCloud/AppService/getPowerPictureList/struct.go +++ b/iSolarCloud/AppService/getPowerPictureList/struct.go @@ -6,8 +6,8 @@ package getPowerPictureList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPowerRobotInfoByRobotSn/data.go b/iSolarCloud/AppService/getPowerRobotInfoByRobotSn/data.go index 585038021..535e6e26e 100644 --- a/iSolarCloud/AppService/getPowerRobotInfoByRobotSn/data.go +++ b/iSolarCloud/AppService/getPowerRobotInfoByRobotSn/data.go @@ -2,8 +2,8 @@ package getPowerRobotInfoByRobotSn import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getPowerRobotInfoByRobotSn/struct.go b/iSolarCloud/AppService/getPowerRobotInfoByRobotSn/struct.go index ed72e1350..1a110df1e 100644 --- a/iSolarCloud/AppService/getPowerRobotInfoByRobotSn/struct.go +++ b/iSolarCloud/AppService/getPowerRobotInfoByRobotSn/struct.go @@ -6,8 +6,8 @@ package getPowerRobotInfoByRobotSn import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPowerRobotSweepAttrByPsId/data.go b/iSolarCloud/AppService/getPowerRobotSweepAttrByPsId/data.go index 4a7a71d78..69567014e 100644 --- a/iSolarCloud/AppService/getPowerRobotSweepAttrByPsId/data.go +++ b/iSolarCloud/AppService/getPowerRobotSweepAttrByPsId/data.go @@ -2,8 +2,8 @@ package getPowerRobotSweepAttrByPsId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getPowerRobotSweepAttrByPsId/struct.go b/iSolarCloud/AppService/getPowerRobotSweepAttrByPsId/struct.go index 6fb4ed9ca..a5e3475cc 100644 --- a/iSolarCloud/AppService/getPowerRobotSweepAttrByPsId/struct.go +++ b/iSolarCloud/AppService/getPowerRobotSweepAttrByPsId/struct.go @@ -6,8 +6,8 @@ package getPowerRobotSweepAttrByPsId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPowerRobotSweepStrategy/data.go b/iSolarCloud/AppService/getPowerRobotSweepStrategy/data.go index 3769cadeb..3a14ad452 100644 --- a/iSolarCloud/AppService/getPowerRobotSweepStrategy/data.go +++ b/iSolarCloud/AppService/getPowerRobotSweepStrategy/data.go @@ -2,8 +2,8 @@ package getPowerRobotSweepStrategy import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getPowerRobotSweepStrategy/struct.go b/iSolarCloud/AppService/getPowerRobotSweepStrategy/struct.go index 023878058..670361833 100644 --- a/iSolarCloud/AppService/getPowerRobotSweepStrategy/struct.go +++ b/iSolarCloud/AppService/getPowerRobotSweepStrategy/struct.go @@ -6,8 +6,8 @@ package getPowerRobotSweepStrategy import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPowerRobotSweepStrategyList/data.go b/iSolarCloud/AppService/getPowerRobotSweepStrategyList/data.go index 20c1e30d4..929748052 100644 --- a/iSolarCloud/AppService/getPowerRobotSweepStrategyList/data.go +++ b/iSolarCloud/AppService/getPowerRobotSweepStrategyList/data.go @@ -2,8 +2,8 @@ package getPowerRobotSweepStrategyList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getPowerRobotSweepStrategyList/struct.go b/iSolarCloud/AppService/getPowerRobotSweepStrategyList/struct.go index 9ac5050e3..da6e97d3c 100644 --- a/iSolarCloud/AppService/getPowerRobotSweepStrategyList/struct.go +++ b/iSolarCloud/AppService/getPowerRobotSweepStrategyList/struct.go @@ -6,8 +6,8 @@ package getPowerRobotSweepStrategyList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPowerSettingCharges/data.go b/iSolarCloud/AppService/getPowerSettingCharges/data.go index b95bf2256..217aa7e8b 100644 --- a/iSolarCloud/AppService/getPowerSettingCharges/data.go +++ b/iSolarCloud/AppService/getPowerSettingCharges/data.go @@ -2,8 +2,8 @@ package getPowerSettingCharges import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getPowerSettingCharges/struct.go b/iSolarCloud/AppService/getPowerSettingCharges/struct.go index fe11f1fa9..7f8268c71 100644 --- a/iSolarCloud/AppService/getPowerSettingCharges/struct.go +++ b/iSolarCloud/AppService/getPowerSettingCharges/struct.go @@ -6,8 +6,8 @@ package getPowerSettingCharges import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "encoding/json" "errors" "fmt" @@ -35,7 +35,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -93,7 +93,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -173,18 +173,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -221,7 +221,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPowerSettingHistoryRecords/data.go b/iSolarCloud/AppService/getPowerSettingHistoryRecords/data.go index 5679df8d9..b9456e01b 100644 --- a/iSolarCloud/AppService/getPowerSettingHistoryRecords/data.go +++ b/iSolarCloud/AppService/getPowerSettingHistoryRecords/data.go @@ -2,8 +2,8 @@ package getPowerSettingHistoryRecords import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getPowerSettingHistoryRecords/struct.go b/iSolarCloud/AppService/getPowerSettingHistoryRecords/struct.go index c07bf8d7f..640c99b11 100644 --- a/iSolarCloud/AppService/getPowerSettingHistoryRecords/struct.go +++ b/iSolarCloud/AppService/getPowerSettingHistoryRecords/struct.go @@ -6,8 +6,8 @@ package getPowerSettingHistoryRecords import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPowerStationBasicInfo/data.go b/iSolarCloud/AppService/getPowerStationBasicInfo/data.go index 67227ee73..fa87c8fee 100644 --- a/iSolarCloud/AppService/getPowerStationBasicInfo/data.go +++ b/iSolarCloud/AppService/getPowerStationBasicInfo/data.go @@ -2,8 +2,8 @@ package getPowerStationBasicInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -53,7 +53,7 @@ type ResultData struct { PsLocation valueTypes.String `json:"ps_location"` PsName valueTypes.String `json:"ps_name"` PsType valueTypes.Integer `json:"ps_type"` - RecordCreateTime string `json:"recore_create_time"` + RecordCreateTime string `json:"recore_create_time" PointId:"record_create_time"` ReportType interface{} `json:"report_type"` ShippingAddress valueTypes.String `json:"shipping_address"` ShippingZipCode valueTypes.String `json:"shipping_zip_code"` @@ -81,10 +81,10 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsId.String() - entries.StructToDataMap(*e, e.Request.PsId.String(), apiReflect.NewEndPointPath(e.Request.PsId.String())) + entries.StructToDataMap(*e, e.Request.PsId.String(), GoStruct.NewEndPointPath(e.Request.PsId.String())) } return entries diff --git a/iSolarCloud/AppService/getPowerStationBasicInfo/struct.go b/iSolarCloud/AppService/getPowerStationBasicInfo/struct.go index 5cecf058d..a67e28105 100644 --- a/iSolarCloud/AppService/getPowerStationBasicInfo/struct.go +++ b/iSolarCloud/AppService/getPowerStationBasicInfo/struct.go @@ -6,8 +6,8 @@ package getPowerStationBasicInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPowerStationData/data.go b/iSolarCloud/AppService/getPowerStationData/data.go index f9b10c3f8..5baadff24 100644 --- a/iSolarCloud/AppService/getPowerStationData/data.go +++ b/iSolarCloud/AppService/getPowerStationData/data.go @@ -2,8 +2,8 @@ package getPowerStationData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -18,7 +18,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -62,10 +62,10 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsId.String() - entries.StructToDataMap(*e, e.Request.PsId.String(), apiReflect.NewEndPointPath(e.Request.PsId.String())) + entries.StructToDataMap(*e, e.Request.PsId.String(), GoStruct.NewEndPointPath(e.Request.PsId.String())) } return entries diff --git a/iSolarCloud/AppService/getPowerStationData/struct.go b/iSolarCloud/AppService/getPowerStationData/struct.go index 6d91fe43e..cf8c1c205 100644 --- a/iSolarCloud/AppService/getPowerStationData/struct.go +++ b/iSolarCloud/AppService/getPowerStationData/struct.go @@ -6,8 +6,8 @@ package getPowerStationData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPowerStationForHousehold/data.go b/iSolarCloud/AppService/getPowerStationForHousehold/data.go index 384260dc0..2ec5b49f8 100644 --- a/iSolarCloud/AppService/getPowerStationForHousehold/data.go +++ b/iSolarCloud/AppService/getPowerStationForHousehold/data.go @@ -3,8 +3,8 @@ package getPowerStationForHousehold import ( "GoSungrow/iSolarCloud/Common" "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -17,7 +17,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -148,10 +148,10 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsId.String() + "." + e.Response.ResultData.PsKey.String() - entries.StructToDataMap(*e, e.Request.PsId.String(), apiReflect.NewEndPointPath(e.Request.PsId.String())) + entries.StructToDataMap(*e, e.Request.PsId.String(), GoStruct.NewEndPointPath(e.Request.PsId.String())) } return entries diff --git a/iSolarCloud/AppService/getPowerStationForHousehold/struct.go b/iSolarCloud/AppService/getPowerStationForHousehold/struct.go index dbae99f21..dba8694b1 100644 --- a/iSolarCloud/AppService/getPowerStationForHousehold/struct.go +++ b/iSolarCloud/AppService/getPowerStationForHousehold/struct.go @@ -6,8 +6,8 @@ package getPowerStationForHousehold import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPowerStationInfo/data.go b/iSolarCloud/AppService/getPowerStationInfo/data.go index f7516b028..1ebe0cd38 100644 --- a/iSolarCloud/AppService/getPowerStationInfo/data.go +++ b/iSolarCloud/AppService/getPowerStationInfo/data.go @@ -2,8 +2,8 @@ package getPowerStationInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -58,7 +58,7 @@ type ResultData struct { PsLocation valueTypes.String `json:"ps_location"` PsName valueTypes.String `json:"ps_name"` PsType valueTypes.Integer `json:"ps_type"` - RecordCreateTime valueTypes.DateTime `json:"recore_create_time"` + RecordCreateTime valueTypes.DateTime `json:"recore_create_time" PointId:"record_create_time"` ReportType interface{} `json:"report_type"` ShippingAddress valueTypes.String `json:"shipping_address"` ShippingZipCode valueTypes.String `json:"shipping_zip_code"` @@ -125,10 +125,10 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsId.String() - entries.StructToDataMap(*e, e.Request.PsId.String(), apiReflect.NewEndPointPath(e.Request.PsId.String())) + entries.StructToDataMap(*e, e.Request.PsId.String(), GoStruct.NewEndPointPath(e.Request.PsId.String())) } return entries diff --git a/iSolarCloud/AppService/getPowerStationInfo/struct.go b/iSolarCloud/AppService/getPowerStationInfo/struct.go index 3ff3c30d6..a5ebb9e99 100644 --- a/iSolarCloud/AppService/getPowerStationInfo/struct.go +++ b/iSolarCloud/AppService/getPowerStationInfo/struct.go @@ -6,8 +6,8 @@ package getPowerStationInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPowerStationPR/data.go b/iSolarCloud/AppService/getPowerStationPR/data.go index d06e5b4a3..918f18eb7 100644 --- a/iSolarCloud/AppService/getPowerStationPR/data.go +++ b/iSolarCloud/AppService/getPowerStationPR/data.go @@ -2,8 +2,8 @@ package getPowerStationPR import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getPowerStationPR/struct.go b/iSolarCloud/AppService/getPowerStationPR/struct.go index feb5abfce..4d34a7a35 100644 --- a/iSolarCloud/AppService/getPowerStationPR/struct.go +++ b/iSolarCloud/AppService/getPowerStationPR/struct.go @@ -6,8 +6,8 @@ package getPowerStationPR import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPowerStationTableDataSql/data.go b/iSolarCloud/AppService/getPowerStationTableDataSql/data.go index 64a1492f0..53be023ec 100644 --- a/iSolarCloud/AppService/getPowerStationTableDataSql/data.go +++ b/iSolarCloud/AppService/getPowerStationTableDataSql/data.go @@ -2,8 +2,8 @@ package getPowerStationTableDataSql import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getPowerStationTableDataSql/struct.go b/iSolarCloud/AppService/getPowerStationTableDataSql/struct.go index 6f85b5ed1..11ec065ee 100644 --- a/iSolarCloud/AppService/getPowerStationTableDataSql/struct.go +++ b/iSolarCloud/AppService/getPowerStationTableDataSql/struct.go @@ -6,8 +6,8 @@ package getPowerStationTableDataSql import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPowerStationTableDataSqlCount/data.go b/iSolarCloud/AppService/getPowerStationTableDataSqlCount/data.go index 18dfef0df..3654083f3 100644 --- a/iSolarCloud/AppService/getPowerStationTableDataSqlCount/data.go +++ b/iSolarCloud/AppService/getPowerStationTableDataSqlCount/data.go @@ -2,8 +2,8 @@ package getPowerStationTableDataSqlCount import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getPowerStationTableDataSqlCount/struct.go b/iSolarCloud/AppService/getPowerStationTableDataSqlCount/struct.go index a05a756ad..5496f4a84 100644 --- a/iSolarCloud/AppService/getPowerStationTableDataSqlCount/struct.go +++ b/iSolarCloud/AppService/getPowerStationTableDataSqlCount/struct.go @@ -6,8 +6,8 @@ package getPowerStationTableDataSqlCount import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPowerStatistics/data.go b/iSolarCloud/AppService/getPowerStatistics/data.go index 4c3aa24df..2540ec188 100644 --- a/iSolarCloud/AppService/getPowerStatistics/data.go +++ b/iSolarCloud/AppService/getPowerStatistics/data.go @@ -2,8 +2,8 @@ package getPowerStatistics import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -32,11 +32,11 @@ type ResultData struct { Status2 valueTypes.Integer `json:"status2"` Status3 valueTypes.Integer `json:"status3"` - DayPower valueTypes.UnitValue `json:"dayPower"` + DayPower valueTypes.UnitValue `json:"dayPower" PointId:"day_power"` DesignCapacity valueTypes.UnitValue `json:"design_capacity"` - PRVlaue valueTypes.Float `json:"PRVlaue" PointId:"PRValue"` - EqVlaue valueTypes.Float `json:"eqVlaue" PointId:"EQValue"` - NowCapacity valueTypes.UnitValue `json:"nowCapacity"` + PRVlaue valueTypes.Float `json:"PRVlaue" PointId:"pr_value"` + EqVlaue valueTypes.Float `json:"eqVlaue" PointId:"eq_value"` + NowCapacity valueTypes.UnitValue `json:"nowCapacity" PointId:"now_capacity"` } func (e *ResultData) IsValid() error { @@ -54,10 +54,10 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsId.String() - entries.StructToDataMap(*e, e.Request.PsId.String(), apiReflect.NewEndPointPath(e.Request.PsId.String())) + entries.StructToDataMap(*e, e.Request.PsId.String(), GoStruct.NewEndPointPath(e.Request.PsId.String())) } return entries diff --git a/iSolarCloud/AppService/getPowerStatistics/struct.go b/iSolarCloud/AppService/getPowerStatistics/struct.go index f193bf5bb..7d5085451 100644 --- a/iSolarCloud/AppService/getPowerStatistics/struct.go +++ b/iSolarCloud/AppService/getPowerStatistics/struct.go @@ -6,8 +6,8 @@ package getPowerStatistics import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "encoding/json" "errors" "fmt" @@ -35,7 +35,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -93,7 +93,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -173,18 +173,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -221,7 +221,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPowerTrendDayData/data.go b/iSolarCloud/AppService/getPowerTrendDayData/data.go index de00f9f6d..6193c462e 100644 --- a/iSolarCloud/AppService/getPowerTrendDayData/data.go +++ b/iSolarCloud/AppService/getPowerTrendDayData/data.go @@ -2,8 +2,8 @@ package getPowerTrendDayData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -17,7 +17,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getPowerTrendDayData/struct.go b/iSolarCloud/AppService/getPowerTrendDayData/struct.go index 18edc8011..59d499ae7 100644 --- a/iSolarCloud/AppService/getPowerTrendDayData/struct.go +++ b/iSolarCloud/AppService/getPowerTrendDayData/struct.go @@ -6,8 +6,8 @@ package getPowerTrendDayData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPrivateCloudValidityPeriod/data.go b/iSolarCloud/AppService/getPrivateCloudValidityPeriod/data.go index 9d6868b4d..538d3e880 100644 --- a/iSolarCloud/AppService/getPrivateCloudValidityPeriod/data.go +++ b/iSolarCloud/AppService/getPrivateCloudValidityPeriod/data.go @@ -2,8 +2,8 @@ package getPrivateCloudValidityPeriod import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getPrivateCloudValidityPeriod/struct.go b/iSolarCloud/AppService/getPrivateCloudValidityPeriod/struct.go index fe9d70c77..b53c3728f 100644 --- a/iSolarCloud/AppService/getPrivateCloudValidityPeriod/struct.go +++ b/iSolarCloud/AppService/getPrivateCloudValidityPeriod/struct.go @@ -6,8 +6,8 @@ package getPrivateCloudValidityPeriod import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getProvInfoListByNationCode/data.go b/iSolarCloud/AppService/getProvInfoListByNationCode/data.go index a35697922..cc3f7658a 100644 --- a/iSolarCloud/AppService/getProvInfoListByNationCode/data.go +++ b/iSolarCloud/AppService/getProvInfoListByNationCode/data.go @@ -2,8 +2,8 @@ package getProvInfoListByNationCode import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getProvInfoListByNationCode/struct.go b/iSolarCloud/AppService/getProvInfoListByNationCode/struct.go index cf28eed18..3c01ef664 100644 --- a/iSolarCloud/AppService/getProvInfoListByNationCode/struct.go +++ b/iSolarCloud/AppService/getProvInfoListByNationCode/struct.go @@ -6,8 +6,8 @@ package getProvInfoListByNationCode import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPsAuthKey/data.go b/iSolarCloud/AppService/getPsAuthKey/data.go index 3a1ca6e63..3644ef0e3 100644 --- a/iSolarCloud/AppService/getPsAuthKey/data.go +++ b/iSolarCloud/AppService/getPsAuthKey/data.go @@ -2,8 +2,8 @@ package getPsAuthKey import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getPsAuthKey/struct.go b/iSolarCloud/AppService/getPsAuthKey/struct.go index e32b58990..925698bd0 100644 --- a/iSolarCloud/AppService/getPsAuthKey/struct.go +++ b/iSolarCloud/AppService/getPsAuthKey/struct.go @@ -6,8 +6,8 @@ package getPsAuthKey import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPsCurveInfo/data.go b/iSolarCloud/AppService/getPsCurveInfo/data.go index ecfd2401b..07bc63c41 100644 --- a/iSolarCloud/AppService/getPsCurveInfo/data.go +++ b/iSolarCloud/AppService/getPsCurveInfo/data.go @@ -2,8 +2,8 @@ package getPsCurveInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getPsCurveInfo/struct.go b/iSolarCloud/AppService/getPsCurveInfo/struct.go index c69a6e851..ba0d43a36 100644 --- a/iSolarCloud/AppService/getPsCurveInfo/struct.go +++ b/iSolarCloud/AppService/getPsCurveInfo/struct.go @@ -6,8 +6,8 @@ package getPsCurveInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPsDataSupplementTaskList/data.go b/iSolarCloud/AppService/getPsDataSupplementTaskList/data.go index a510d2bb7..a2b2fc3fe 100644 --- a/iSolarCloud/AppService/getPsDataSupplementTaskList/data.go +++ b/iSolarCloud/AppService/getPsDataSupplementTaskList/data.go @@ -2,8 +2,8 @@ package getPsDataSupplementTaskList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -15,7 +15,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -24,8 +24,8 @@ func (rd RequestData) Help() string { } type ResultData struct { - PageList interface{} `json:"pageList" PointNameAppend:"false" PointArrayFlatten:"false"` - RowCount valueTypes.Integer `json:"rowCount"` + PageList interface{} `json:"pageList" PointId:"page_list" PointNameAppend:"false" PointArrayFlatten:"false"` + RowCount valueTypes.Integer `json:"rowCount" PointId:"row_count"` } func (e *ResultData) IsValid() error { diff --git a/iSolarCloud/AppService/getPsDataSupplementTaskList/struct.go b/iSolarCloud/AppService/getPsDataSupplementTaskList/struct.go index b8d2296ac..e7f44a20c 100644 --- a/iSolarCloud/AppService/getPsDataSupplementTaskList/struct.go +++ b/iSolarCloud/AppService/getPsDataSupplementTaskList/struct.go @@ -6,8 +6,8 @@ package getPsDataSupplementTaskList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPsDetail/data.go b/iSolarCloud/AppService/getPsDetail/data.go index d091867c8..961997611 100644 --- a/iSolarCloud/AppService/getPsDetail/data.go +++ b/iSolarCloud/AppService/getPsDetail/data.go @@ -3,8 +3,8 @@ package getPsDetail import ( "GoSungrow/iSolarCloud/Common" "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -17,7 +17,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -217,7 +217,7 @@ type ResultData struct { PsTypeName valueTypes.String `json:"ps_type_name"` PsWindLevel valueTypes.String `json:"ps_wind_level"` PsWindPos valueTypes.String `json:"ps_wind_pos"` - RecordCreateTime valueTypes.DateTime `json:"recore_create_time"` + RecordCreateTime valueTypes.DateTime `json:"recore_create_time" PointId:"record_create_time"` ReportType valueTypes.String `json:"report_type"` SafeStartDate valueTypes.DateTime `json:"safe_start_date"` SelfConsumptionOffsetReminder valueTypes.Integer `json:"self_consumption_offset_reminder"` @@ -268,10 +268,10 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsId.String() - entries.StructToDataMap(*e, e.Request.PsId.String(), apiReflect.NewEndPointPath(e.Request.PsId.String())) + entries.StructToDataMap(*e, e.Request.PsId.String(), GoStruct.NewEndPointPath(e.Request.PsId.String())) // dstEndpoint := "virtual." + e.Request.PsId.String() // srcEndpoint := fmt.Sprintf("%s.%s", pkg, e.Request.PsId.String()) diff --git a/iSolarCloud/AppService/getPsDetail/struct.go b/iSolarCloud/AppService/getPsDetail/struct.go index 59b5d1b42..3caf05834 100644 --- a/iSolarCloud/AppService/getPsDetail/struct.go +++ b/iSolarCloud/AppService/getPsDetail/struct.go @@ -6,8 +6,8 @@ package getPsDetail import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPsDetailByUserTokens/data.go b/iSolarCloud/AppService/getPsDetailByUserTokens/data.go index 16bb95b8b..aea5af273 100644 --- a/iSolarCloud/AppService/getPsDetailByUserTokens/data.go +++ b/iSolarCloud/AppService/getPsDetailByUserTokens/data.go @@ -2,8 +2,8 @@ package getPsDetailByUserTokens import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getPsDetailByUserTokens/struct.go b/iSolarCloud/AppService/getPsDetailByUserTokens/struct.go index 51794e51b..ef6a99067 100644 --- a/iSolarCloud/AppService/getPsDetailByUserTokens/struct.go +++ b/iSolarCloud/AppService/getPsDetailByUserTokens/struct.go @@ -6,8 +6,8 @@ package getPsDetailByUserTokens import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPsDetailForSinglePage/data.go b/iSolarCloud/AppService/getPsDetailForSinglePage/data.go index 90016bac1..d57343fe8 100644 --- a/iSolarCloud/AppService/getPsDetailForSinglePage/data.go +++ b/iSolarCloud/AppService/getPsDetailForSinglePage/data.go @@ -2,8 +2,8 @@ package getPsDetailForSinglePage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getPsDetailForSinglePage/struct.go b/iSolarCloud/AppService/getPsDetailForSinglePage/struct.go index a898d62a9..4f1cf136e 100644 --- a/iSolarCloud/AppService/getPsDetailForSinglePage/struct.go +++ b/iSolarCloud/AppService/getPsDetailForSinglePage/struct.go @@ -6,8 +6,8 @@ package getPsDetailForSinglePage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPsDetailWithPsType/data.go b/iSolarCloud/AppService/getPsDetailWithPsType/data.go index feab3b271..3d4fcbd71 100644 --- a/iSolarCloud/AppService/getPsDetailWithPsType/data.go +++ b/iSolarCloud/AppService/getPsDetailWithPsType/data.go @@ -2,8 +2,9 @@ package getPsDetailWithPsType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" @@ -17,7 +18,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -154,9 +155,9 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - pkg := apiReflect.GetName("", *e) + pkg := reflection.GetName("", *e) // name := api.JoinWithDots(0, valueTypes.DateTimeLayoutDay, pkg, e.Response.ResultData.PsPsKey) - entries.StructToDataMap(*e, e.Response.ResultData.PsPsKey.Value(), apiReflect.NewEndPointPath(e.Response.ResultData.PsPsKey.Value())) + entries.StructToDataMap(*e, e.Response.ResultData.PsPsKey.Value(), GoStruct.NewEndPointPath(e.Response.ResultData.PsPsKey.Value())) dstEndpoint := "virtual." + e.Request.PsId.String() srcEndpoint := fmt.Sprintf("%s.%s", pkg, e.Response.ResultData.PsPsKey.Value()) diff --git a/iSolarCloud/AppService/getPsDetailWithPsType/struct.go b/iSolarCloud/AppService/getPsDetailWithPsType/struct.go index 06baf32c3..0ee82ee83 100644 --- a/iSolarCloud/AppService/getPsDetailWithPsType/struct.go +++ b/iSolarCloud/AppService/getPsDetailWithPsType/struct.go @@ -6,8 +6,8 @@ package getPsDetailWithPsType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPsHealthState/data.go b/iSolarCloud/AppService/getPsHealthState/data.go index 40047ca7c..c894aced6 100644 --- a/iSolarCloud/AppService/getPsHealthState/data.go +++ b/iSolarCloud/AppService/getPsHealthState/data.go @@ -2,8 +2,8 @@ package getPsHealthState import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -45,10 +45,10 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsId.String() - entries.StructToDataMap(*e, e.Request.PsId.String(), apiReflect.NewEndPointPath(e.Request.PsId.String())) + entries.StructToDataMap(*e, e.Request.PsId.String(), GoStruct.NewEndPointPath(e.Request.PsId.String())) } return entries diff --git a/iSolarCloud/AppService/getPsHealthState/struct.go b/iSolarCloud/AppService/getPsHealthState/struct.go index f8d261ce0..b45a7cf7e 100644 --- a/iSolarCloud/AppService/getPsHealthState/struct.go +++ b/iSolarCloud/AppService/getPsHealthState/struct.go @@ -6,8 +6,8 @@ package getPsHealthState import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPsInstallerByPsId/data.go b/iSolarCloud/AppService/getPsInstallerByPsId/data.go index 719d0a9f1..208e633b2 100644 --- a/iSolarCloud/AppService/getPsInstallerByPsId/data.go +++ b/iSolarCloud/AppService/getPsInstallerByPsId/data.go @@ -2,8 +2,8 @@ package getPsInstallerByPsId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getPsInstallerByPsId/struct.go b/iSolarCloud/AppService/getPsInstallerByPsId/struct.go index 3372b98e4..7c350866d 100644 --- a/iSolarCloud/AppService/getPsInstallerByPsId/struct.go +++ b/iSolarCloud/AppService/getPsInstallerByPsId/struct.go @@ -6,8 +6,8 @@ package getPsInstallerByPsId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPsInstallerOrgInfoByPsId/data.go b/iSolarCloud/AppService/getPsInstallerOrgInfoByPsId/data.go index 5861a8a5e..2398d7c10 100644 --- a/iSolarCloud/AppService/getPsInstallerOrgInfoByPsId/data.go +++ b/iSolarCloud/AppService/getPsInstallerOrgInfoByPsId/data.go @@ -2,8 +2,8 @@ package getPsInstallerOrgInfoByPsId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getPsInstallerOrgInfoByPsId/struct.go b/iSolarCloud/AppService/getPsInstallerOrgInfoByPsId/struct.go index e79b55ba7..95cebbee3 100644 --- a/iSolarCloud/AppService/getPsInstallerOrgInfoByPsId/struct.go +++ b/iSolarCloud/AppService/getPsInstallerOrgInfoByPsId/struct.go @@ -6,8 +6,8 @@ package getPsInstallerOrgInfoByPsId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPsList/data.go b/iSolarCloud/AppService/getPsList/data.go index c01c5ae64..55849591a 100644 --- a/iSolarCloud/AppService/getPsList/data.go +++ b/iSolarCloud/AppService/getPsList/data.go @@ -3,8 +3,8 @@ package getPsList import ( "GoSungrow/iSolarCloud/Common" "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" @@ -17,7 +17,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -144,8 +144,8 @@ type ResultData struct { WgsLatitude valueTypes.Float `json:"wgs_latitude" PointId:"wgs_latitude"` WgsLongitude valueTypes.Float `json:"wgs_longitude" PointId:"wgs_longitude"` ZipCode valueTypes.String `json:"zip_code" PointId:"zip_code"` - } `json:"pageList" PointNameFromChild:"PsId" PointNameAppend:"false" PointArrayFlatten:"false" DataTable:"true"` - RowCount valueTypes.Count `json:"rowCount" PointIgnore:"true"` + } `json:"pageList" PointId:"page_list" PointNameFromChild:"PsId" PointNameAppend:"false" PointArrayFlatten:"false" DataTable:"true"` + RowCount valueTypes.Count `json:"rowCount" PointId:"row_count" PointIgnore:"true"` } func (e *ResultData) IsValid() error { @@ -163,7 +163,7 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) entries.StructToDataMap(*e, "system", nil) } diff --git a/iSolarCloud/AppService/getPsList/struct.go b/iSolarCloud/AppService/getPsList/struct.go index 2503b3b6f..c900b0ce0 100644 --- a/iSolarCloud/AppService/getPsList/struct.go +++ b/iSolarCloud/AppService/getPsList/struct.go @@ -6,8 +6,8 @@ package getPsList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPsListByName/data.go b/iSolarCloud/AppService/getPsListByName/data.go index 52fbd8353..6572110e4 100644 --- a/iSolarCloud/AppService/getPsListByName/data.go +++ b/iSolarCloud/AppService/getPsListByName/data.go @@ -2,8 +2,8 @@ package getPsListByName import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -48,7 +48,7 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsId.String() entries.StructToDataMap(*e, "system", nil) diff --git a/iSolarCloud/AppService/getPsListByName/struct.go b/iSolarCloud/AppService/getPsListByName/struct.go index 17c7d808a..3998e59b3 100644 --- a/iSolarCloud/AppService/getPsListByName/struct.go +++ b/iSolarCloud/AppService/getPsListByName/struct.go @@ -6,8 +6,8 @@ package getPsListByName import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPsListForPsDataByPsId/data.go b/iSolarCloud/AppService/getPsListForPsDataByPsId/data.go index fbc1afb71..33eb6cc6c 100644 --- a/iSolarCloud/AppService/getPsListForPsDataByPsId/data.go +++ b/iSolarCloud/AppService/getPsListForPsDataByPsId/data.go @@ -2,8 +2,8 @@ package getPsListForPsDataByPsId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getPsListForPsDataByPsId/struct.go b/iSolarCloud/AppService/getPsListForPsDataByPsId/struct.go index b2f35001f..e3a0ed9ab 100644 --- a/iSolarCloud/AppService/getPsListForPsDataByPsId/struct.go +++ b/iSolarCloud/AppService/getPsListForPsDataByPsId/struct.go @@ -6,8 +6,8 @@ package getPsListForPsDataByPsId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPsListStaticData/data.go b/iSolarCloud/AppService/getPsListStaticData/data.go index 6b6c851c4..ad2781523 100644 --- a/iSolarCloud/AppService/getPsListStaticData/data.go +++ b/iSolarCloud/AppService/getPsListStaticData/data.go @@ -2,8 +2,8 @@ package getPsListStaticData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -47,7 +47,7 @@ type ResultData struct { ValidFlag valueTypes.Bool `json:"valid_flag"` WaitAssignOrderCount valueTypes.Integer `json:"wait_assign_order_count"` } `json:"pageList" PointId:"page_list" PointNameFromChild:"PsId" PointNameAppend:"false" PointArrayFlatten:"false" DataTable:"true"` - RowCount valueTypes.Integer `json:"rowCount"` + RowCount valueTypes.Integer `json:"rowCount" PointId:"row_count"` } func (e *ResultData) IsValid() error { @@ -65,7 +65,7 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsId.String() entries.StructToDataMap(*e, "system", nil) diff --git a/iSolarCloud/AppService/getPsListStaticData/struct.go b/iSolarCloud/AppService/getPsListStaticData/struct.go index 273735036..b5126592f 100644 --- a/iSolarCloud/AppService/getPsListStaticData/struct.go +++ b/iSolarCloud/AppService/getPsListStaticData/struct.go @@ -6,8 +6,8 @@ package getPsListStaticData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPsReport/data.go b/iSolarCloud/AppService/getPsReport/data.go index cf270afeb..25f652d3d 100644 --- a/iSolarCloud/AppService/getPsReport/data.go +++ b/iSolarCloud/AppService/getPsReport/data.go @@ -2,8 +2,8 @@ package getPsReport import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -17,7 +17,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -89,10 +89,10 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.DateId.Format(valueTypes.DateTimeLayoutDay) - entries.StructToDataMap(*e, "system", apiReflect.NewEndPointPath(e.Request.DateId.Format(valueTypes.DateTimeLayoutDay))) + entries.StructToDataMap(*e, "system", GoStruct.NewEndPointPath(e.Request.DateId.Format(valueTypes.DateTimeLayoutDay))) } return entries diff --git a/iSolarCloud/AppService/getPsReport/struct.go b/iSolarCloud/AppService/getPsReport/struct.go index 1f0c731ca..d4812fbe3 100644 --- a/iSolarCloud/AppService/getPsReport/struct.go +++ b/iSolarCloud/AppService/getPsReport/struct.go @@ -6,8 +6,8 @@ package getPsReport import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPsUser/data.go b/iSolarCloud/AppService/getPsUser/data.go index ac4348895..00c54d5c0 100644 --- a/iSolarCloud/AppService/getPsUser/data.go +++ b/iSolarCloud/AppService/getPsUser/data.go @@ -2,8 +2,8 @@ package getPsUser import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -45,7 +45,7 @@ type ResultData struct { IsValidMobileEmail valueTypes.Bool `json:"is_valid_mobile_email"` LackOfInformation valueTypes.Integer `json:"lack_of_information"` Language valueTypes.String `json:"language"` - MobileTel valueTypes.String `json:"moble_tel"` + MobileTel valueTypes.String `json:"moble_tel" PointId:"mobile_tel"` OrgId valueTypes.Integer `json:"org_id"` PhotoId valueTypes.Integer `json:"photo_id"` PhotoURL valueTypes.String `json:"photo_url"` @@ -69,12 +69,12 @@ type ResultData struct { InstallerEmail valueTypes.String `json:"installer_email"` InstallerPhone valueTypes.String `json:"installer_phone"` IsCountryDefaultDealerOrgCode valueTypes.Bool `json:"is_country_default_dealer_org_code"` - MobileTel valueTypes.String `json:"moble_tel"` + MobileTel valueTypes.String `json:"moble_tel" PointId:"mobile_tel"` OrgId valueTypes.Integer `json:"org_id"` OrgIndexCode valueTypes.String `json:"org_index_code"` OrgName valueTypes.String `json:"org_name"` UpDealerEmail valueTypes.String `json:"up_dealer_email"` - UpDealerMobileTel valueTypes.String `json:"up_dealer_moble_tel"` + UpDealerMobileTel valueTypes.String `json:"up_dealer_moble_tel" PointId:up_dealer_mobile_tel"` UpDealerOrgCode valueTypes.String `json:"up_dealer_org_code"` UpDealerOrgInstaller valueTypes.String `json:"up_dealer_org_installer"` UpDealerOrgInstallerEmail valueTypes.String `json:"up_dealer_org_installer_email"` diff --git a/iSolarCloud/AppService/getPsUser/struct.go b/iSolarCloud/AppService/getPsUser/struct.go index 28a23642c..0292fed1e 100644 --- a/iSolarCloud/AppService/getPsUser/struct.go +++ b/iSolarCloud/AppService/getPsUser/struct.go @@ -6,8 +6,8 @@ package getPsUser import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getPsWeatherList/data.go b/iSolarCloud/AppService/getPsWeatherList/data.go index 8a018887c..fdfb01bf0 100644 --- a/iSolarCloud/AppService/getPsWeatherList/data.go +++ b/iSolarCloud/AppService/getPsWeatherList/data.go @@ -2,8 +2,8 @@ package getPsWeatherList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -61,10 +61,10 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsId.String() - entries.StructToDataMap(*e, e.Request.PsId.String(), apiReflect.NewEndPointPath(e.Request.PsId.String())) + entries.StructToDataMap(*e, e.Request.PsId.String(), GoStruct.NewEndPointPath(e.Request.PsId.String())) } return entries diff --git a/iSolarCloud/AppService/getPsWeatherList/struct.go b/iSolarCloud/AppService/getPsWeatherList/struct.go index bccbea305..cc83a3154 100644 --- a/iSolarCloud/AppService/getPsWeatherList/struct.go +++ b/iSolarCloud/AppService/getPsWeatherList/struct.go @@ -6,8 +6,8 @@ package getPsWeatherList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getRechargeOrderDetail/data.go b/iSolarCloud/AppService/getRechargeOrderDetail/data.go index 7fceeeaaf..6eb870735 100644 --- a/iSolarCloud/AppService/getRechargeOrderDetail/data.go +++ b/iSolarCloud/AppService/getRechargeOrderDetail/data.go @@ -2,8 +2,8 @@ package getRechargeOrderDetail import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getRechargeOrderDetail/struct.go b/iSolarCloud/AppService/getRechargeOrderDetail/struct.go index b918bec72..34aac849a 100644 --- a/iSolarCloud/AppService/getRechargeOrderDetail/struct.go +++ b/iSolarCloud/AppService/getRechargeOrderDetail/struct.go @@ -6,8 +6,8 @@ package getRechargeOrderDetail import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getRechargeOrderItemDeviceList/data.go b/iSolarCloud/AppService/getRechargeOrderItemDeviceList/data.go index dd2f42631..090cf0536 100644 --- a/iSolarCloud/AppService/getRechargeOrderItemDeviceList/data.go +++ b/iSolarCloud/AppService/getRechargeOrderItemDeviceList/data.go @@ -2,8 +2,8 @@ package getRechargeOrderItemDeviceList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getRechargeOrderItemDeviceList/struct.go b/iSolarCloud/AppService/getRechargeOrderItemDeviceList/struct.go index 11c09c919..eddf81515 100644 --- a/iSolarCloud/AppService/getRechargeOrderItemDeviceList/struct.go +++ b/iSolarCloud/AppService/getRechargeOrderItemDeviceList/struct.go @@ -6,8 +6,8 @@ package getRechargeOrderItemDeviceList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getRechargeOrderList/data.go b/iSolarCloud/AppService/getRechargeOrderList/data.go index 94d9ff107..05701ad5d 100644 --- a/iSolarCloud/AppService/getRechargeOrderList/data.go +++ b/iSolarCloud/AppService/getRechargeOrderList/data.go @@ -2,8 +2,8 @@ package getRechargeOrderList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getRechargeOrderList/struct.go b/iSolarCloud/AppService/getRechargeOrderList/struct.go index e0baa8a9a..0ea759d79 100644 --- a/iSolarCloud/AppService/getRechargeOrderList/struct.go +++ b/iSolarCloud/AppService/getRechargeOrderList/struct.go @@ -6,8 +6,8 @@ package getRechargeOrderList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getRegionalTree/data.go b/iSolarCloud/AppService/getRegionalTree/data.go index ec2d63b57..9a4b3e4b5 100644 --- a/iSolarCloud/AppService/getRegionalTree/data.go +++ b/iSolarCloud/AppService/getRegionalTree/data.go @@ -2,8 +2,8 @@ package getRegionalTree import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -29,15 +29,15 @@ type ResultData struct { ResultList []struct { Checked valueTypes.Bool `json:"checked"` Id valueTypes.String `json:"id"` - IsFirstOrg valueTypes.Bool `json:"isFirstOrg"` - IsParent valueTypes.Bool `json:"isParent"` + IsFirstOrg valueTypes.Bool `json:"isFirstOrg" PointId:"is_first_org"` + IsParent valueTypes.Bool `json:"isParent" PointId:"is_parent"` Name valueTypes.String `json:"name"` Open valueTypes.Bool `json:"open"` OrgId valueTypes.Integer `json:"org_id"` - ParentId valueTypes.Integer `json:"pId"` + ParentId valueTypes.Integer `json:"pId" PointId:"pid"` PsId valueTypes.PsId `json:"ps_id"` ShareType int64 `json:"share_type"` - } `json:"resultList" DataTable:"true"` + } `json:"resultList" PointId:"resulte_list" DataTable:"true"` } func (e *ResultData) IsValid() error { diff --git a/iSolarCloud/AppService/getRegionalTree/struct.go b/iSolarCloud/AppService/getRegionalTree/struct.go index 6c7dd3582..5e77f154b 100644 --- a/iSolarCloud/AppService/getRegionalTree/struct.go +++ b/iSolarCloud/AppService/getRegionalTree/struct.go @@ -6,8 +6,8 @@ package getRegionalTree import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getRemoteParamSettingList/data.go b/iSolarCloud/AppService/getRemoteParamSettingList/data.go index 276841a68..de1a9f07d 100644 --- a/iSolarCloud/AppService/getRemoteParamSettingList/data.go +++ b/iSolarCloud/AppService/getRemoteParamSettingList/data.go @@ -2,8 +2,8 @@ package getRemoteParamSettingList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getRemoteParamSettingList/struct.go b/iSolarCloud/AppService/getRemoteParamSettingList/struct.go index ea7f6c434..87bc362ef 100644 --- a/iSolarCloud/AppService/getRemoteParamSettingList/struct.go +++ b/iSolarCloud/AppService/getRemoteParamSettingList/struct.go @@ -6,8 +6,8 @@ package getRemoteParamSettingList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getRemoteUpgradeDeviceList/data.go b/iSolarCloud/AppService/getRemoteUpgradeDeviceList/data.go index 74956e624..a541b5442 100644 --- a/iSolarCloud/AppService/getRemoteUpgradeDeviceList/data.go +++ b/iSolarCloud/AppService/getRemoteUpgradeDeviceList/data.go @@ -2,8 +2,8 @@ package getRemoteUpgradeDeviceList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -27,8 +27,8 @@ func (rd RequestData) Help() string { type ResultData struct { MModuleNameList []valueTypes.String `json:"m_module_name_list"` - PageList []interface{} `json:"pageList" PointNameAppend:"false" PointArrayFlatten:"false"` - RowCount valueTypes.Integer `json:"rowCount"` + PageList []interface{} `json:"pageList" PointId:"page_list" PointNameAppend:"false" PointArrayFlatten:"false"` + RowCount valueTypes.Integer `json:"rowCount" PointId:"row_count"` } func (e *ResultData) IsValid() error { diff --git a/iSolarCloud/AppService/getRemoteUpgradeDeviceList/struct.go b/iSolarCloud/AppService/getRemoteUpgradeDeviceList/struct.go index 2748924f1..cd16229b7 100644 --- a/iSolarCloud/AppService/getRemoteUpgradeDeviceList/struct.go +++ b/iSolarCloud/AppService/getRemoteUpgradeDeviceList/struct.go @@ -6,8 +6,8 @@ package getRemoteUpgradeDeviceList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getRemoteUpgradeScheduleDetails/data.go b/iSolarCloud/AppService/getRemoteUpgradeScheduleDetails/data.go index c77e1ddd5..d6a62b0e7 100644 --- a/iSolarCloud/AppService/getRemoteUpgradeScheduleDetails/data.go +++ b/iSolarCloud/AppService/getRemoteUpgradeScheduleDetails/data.go @@ -2,8 +2,8 @@ package getRemoteUpgradeScheduleDetails import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getRemoteUpgradeScheduleDetails/struct.go b/iSolarCloud/AppService/getRemoteUpgradeScheduleDetails/struct.go index d7ee0cf27..2cc582dfc 100644 --- a/iSolarCloud/AppService/getRemoteUpgradeScheduleDetails/struct.go +++ b/iSolarCloud/AppService/getRemoteUpgradeScheduleDetails/struct.go @@ -6,8 +6,8 @@ package getRemoteUpgradeScheduleDetails import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getRemoteUpgradeSubTasksList/data.go b/iSolarCloud/AppService/getRemoteUpgradeSubTasksList/data.go index 2fcb0e680..3baca9bdf 100644 --- a/iSolarCloud/AppService/getRemoteUpgradeSubTasksList/data.go +++ b/iSolarCloud/AppService/getRemoteUpgradeSubTasksList/data.go @@ -2,8 +2,8 @@ package getRemoteUpgradeSubTasksList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -17,7 +17,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -26,8 +26,8 @@ func (rd RequestData) Help() string { } type ResultData struct { - PageList []interface{} `json:"pageList" PointNameAppend:"false" PointArrayFlatten:"false"` - RowCount valueTypes.Integer `json:"rowCount"` + PageList []interface{} `json:"pageList" PointId:"page_list" PointNameAppend:"false" PointArrayFlatten:"false"` + RowCount valueTypes.Integer `json:"rowCount" PointId:"row_count"` } func (e *ResultData) IsValid() error { diff --git a/iSolarCloud/AppService/getRemoteUpgradeSubTasksList/struct.go b/iSolarCloud/AppService/getRemoteUpgradeSubTasksList/struct.go index f89683233..232bad1e2 100644 --- a/iSolarCloud/AppService/getRemoteUpgradeSubTasksList/struct.go +++ b/iSolarCloud/AppService/getRemoteUpgradeSubTasksList/struct.go @@ -6,8 +6,8 @@ package getRemoteUpgradeSubTasksList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getRemoteUpgradeTaskList/data.go b/iSolarCloud/AppService/getRemoteUpgradeTaskList/data.go index 502a9b814..9f83931ed 100644 --- a/iSolarCloud/AppService/getRemoteUpgradeTaskList/data.go +++ b/iSolarCloud/AppService/getRemoteUpgradeTaskList/data.go @@ -2,8 +2,8 @@ package getRemoteUpgradeTaskList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -44,7 +44,7 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsId.String() entries.StructToDataMap(*e, "system", nil) diff --git a/iSolarCloud/AppService/getRemoteUpgradeTaskList/struct.go b/iSolarCloud/AppService/getRemoteUpgradeTaskList/struct.go index 107d78efa..b131a7a28 100644 --- a/iSolarCloud/AppService/getRemoteUpgradeTaskList/struct.go +++ b/iSolarCloud/AppService/getRemoteUpgradeTaskList/struct.go @@ -6,8 +6,8 @@ package getRemoteUpgradeTaskList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getReportData/data.go b/iSolarCloud/AppService/getReportData/data.go index fa0ccd032..ba5c53914 100644 --- a/iSolarCloud/AppService/getReportData/data.go +++ b/iSolarCloud/AppService/getReportData/data.go @@ -2,8 +2,8 @@ package getReportData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -17,7 +17,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -198,10 +198,10 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsId.String() - entries.StructToDataMap(*e, e.Request.PsId.String(), apiReflect.NewEndPointPath(e.Request.PsId.String())) + entries.StructToDataMap(*e, e.Request.PsId.String(), GoStruct.NewEndPointPath(e.Request.PsId.String())) } return entries diff --git a/iSolarCloud/AppService/getReportData/struct.go b/iSolarCloud/AppService/getReportData/struct.go index 40bcca0ac..760c2b242 100644 --- a/iSolarCloud/AppService/getReportData/struct.go +++ b/iSolarCloud/AppService/getReportData/struct.go @@ -6,8 +6,8 @@ package getReportData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getReportEmailConfigInfo/data.go b/iSolarCloud/AppService/getReportEmailConfigInfo/data.go index cd86f0393..56a155362 100644 --- a/iSolarCloud/AppService/getReportEmailConfigInfo/data.go +++ b/iSolarCloud/AppService/getReportEmailConfigInfo/data.go @@ -2,8 +2,8 @@ package getReportEmailConfigInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getReportEmailConfigInfo/struct.go b/iSolarCloud/AppService/getReportEmailConfigInfo/struct.go index 971c547a4..5f7dced54 100644 --- a/iSolarCloud/AppService/getReportEmailConfigInfo/struct.go +++ b/iSolarCloud/AppService/getReportEmailConfigInfo/struct.go @@ -6,8 +6,8 @@ package getReportEmailConfigInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getReportExportColumns/data.go b/iSolarCloud/AppService/getReportExportColumns/data.go index c8e23b540..33d853c22 100644 --- a/iSolarCloud/AppService/getReportExportColumns/data.go +++ b/iSolarCloud/AppService/getReportExportColumns/data.go @@ -2,8 +2,8 @@ package getReportExportColumns import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getReportExportColumns/struct.go b/iSolarCloud/AppService/getReportExportColumns/struct.go index 4a994af0c..1aaf3de82 100644 --- a/iSolarCloud/AppService/getReportExportColumns/struct.go +++ b/iSolarCloud/AppService/getReportExportColumns/struct.go @@ -6,8 +6,8 @@ package getReportExportColumns import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getReportListByUserId/data.go b/iSolarCloud/AppService/getReportListByUserId/data.go index 0b6ee18ec..097ce3afe 100644 --- a/iSolarCloud/AppService/getReportListByUserId/data.go +++ b/iSolarCloud/AppService/getReportListByUserId/data.go @@ -2,8 +2,8 @@ package getReportListByUserId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getReportListByUserId/struct.go b/iSolarCloud/AppService/getReportListByUserId/struct.go index 134dd2c0b..a72a53c61 100644 --- a/iSolarCloud/AppService/getReportListByUserId/struct.go +++ b/iSolarCloud/AppService/getReportListByUserId/struct.go @@ -6,8 +6,8 @@ package getReportListByUserId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getRobotDynamicCleaningView/data.go b/iSolarCloud/AppService/getRobotDynamicCleaningView/data.go index 7af277f4c..fe74b901e 100644 --- a/iSolarCloud/AppService/getRobotDynamicCleaningView/data.go +++ b/iSolarCloud/AppService/getRobotDynamicCleaningView/data.go @@ -2,21 +2,21 @@ package getRobotDynamicCleaningView import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" - "github.com/MickMake/GoUnify/Only" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" + "github.com/MickMake/GoUnify/Only" ) const Url = "/v1/devService/getRobotDynamicCleaningView" const Disabled = false type RequestData struct { - // DeviceType valueTypes.String `json:"device_type" required:"true"` + PsId valueTypes.PsId `json:"ps_id" required:"true"` } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -26,7 +26,9 @@ func (rd RequestData) Help() string { type ResultData struct { - Dummy valueTypes.String `json:"dummy"` + DynamicRobot []interface{} `json:"dynamic_robot"` + LoggerSn []interface{} `json:"logger_sn"` + Status struct{} `json:"status"` } func (e *ResultData) IsValid() error { @@ -34,30 +36,11 @@ func (e *ResultData) IsValid() error { return err } -//type DecodeResultData ResultData -// -//func (e *ResultData) UnmarshalJSON(data []byte) error { -// var err error -// -// for range Only.Once { -// if len(data) == 0 { -// break -// } -// var pd DecodeResultData -// -// // Store ResultData -// _ = json.Unmarshal(data, &pd) -// e.Dummy = pd.Dummy -// } -// -// return err -//} - func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - entries.StructToDataMap(*e, "system", nil) + entries.StructToDataMap(*e, e.Request.PsId.String(), GoStruct.NewEndPointPath(e.Request.PsId.String())) } return entries diff --git a/iSolarCloud/AppService/getRobotDynamicCleaningView/struct.go b/iSolarCloud/AppService/getRobotDynamicCleaningView/struct.go index 69845ae1b..7efe7c2f8 100644 --- a/iSolarCloud/AppService/getRobotDynamicCleaningView/struct.go +++ b/iSolarCloud/AppService/getRobotDynamicCleaningView/struct.go @@ -6,8 +6,8 @@ package getRobotDynamicCleaningView import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getRobotNumAndSweepCapacity/data.go b/iSolarCloud/AppService/getRobotNumAndSweepCapacity/data.go index 199601365..50ee6c555 100644 --- a/iSolarCloud/AppService/getRobotNumAndSweepCapacity/data.go +++ b/iSolarCloud/AppService/getRobotNumAndSweepCapacity/data.go @@ -2,8 +2,8 @@ package getRobotNumAndSweepCapacity import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getRobotNumAndSweepCapacity/struct.go b/iSolarCloud/AppService/getRobotNumAndSweepCapacity/struct.go index 10f7228f0..55471c741 100644 --- a/iSolarCloud/AppService/getRobotNumAndSweepCapacity/struct.go +++ b/iSolarCloud/AppService/getRobotNumAndSweepCapacity/struct.go @@ -6,8 +6,8 @@ package getRobotNumAndSweepCapacity import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getRuleUnit/data.go b/iSolarCloud/AppService/getRuleUnit/data.go index 07f649f09..6b06f8177 100644 --- a/iSolarCloud/AppService/getRuleUnit/data.go +++ b/iSolarCloud/AppService/getRuleUnit/data.go @@ -2,8 +2,8 @@ package getRuleUnit import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getRuleUnit/struct.go b/iSolarCloud/AppService/getRuleUnit/struct.go index 892db5e3c..54ea9dbc5 100644 --- a/iSolarCloud/AppService/getRuleUnit/struct.go +++ b/iSolarCloud/AppService/getRuleUnit/struct.go @@ -6,8 +6,8 @@ package getRuleUnit import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getSendReportConfigCron/data.go b/iSolarCloud/AppService/getSendReportConfigCron/data.go index 98b247f4d..05a997167 100644 --- a/iSolarCloud/AppService/getSendReportConfigCron/data.go +++ b/iSolarCloud/AppService/getSendReportConfigCron/data.go @@ -2,8 +2,8 @@ package getSendReportConfigCron import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getSendReportConfigCron/struct.go b/iSolarCloud/AppService/getSendReportConfigCron/struct.go index 0c7c2e036..a0028fb2d 100644 --- a/iSolarCloud/AppService/getSendReportConfigCron/struct.go +++ b/iSolarCloud/AppService/getSendReportConfigCron/struct.go @@ -6,8 +6,8 @@ package getSendReportConfigCron import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getSerialNum/data.go b/iSolarCloud/AppService/getSerialNum/data.go index 0b6f23aba..1a00acd97 100644 --- a/iSolarCloud/AppService/getSerialNum/data.go +++ b/iSolarCloud/AppService/getSerialNum/data.go @@ -2,8 +2,8 @@ package getSerialNum import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getSerialNum/struct.go b/iSolarCloud/AppService/getSerialNum/struct.go index c6ea84c3e..7dd209b67 100644 --- a/iSolarCloud/AppService/getSerialNum/struct.go +++ b/iSolarCloud/AppService/getSerialNum/struct.go @@ -6,8 +6,8 @@ package getSerialNum import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getShieldMapConditionList/data.go b/iSolarCloud/AppService/getShieldMapConditionList/data.go index c7cd32bad..a303bfefd 100644 --- a/iSolarCloud/AppService/getShieldMapConditionList/data.go +++ b/iSolarCloud/AppService/getShieldMapConditionList/data.go @@ -2,8 +2,8 @@ package getShieldMapConditionList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getShieldMapConditionList/struct.go b/iSolarCloud/AppService/getShieldMapConditionList/struct.go index defccd6ee..845168112 100644 --- a/iSolarCloud/AppService/getShieldMapConditionList/struct.go +++ b/iSolarCloud/AppService/getShieldMapConditionList/struct.go @@ -6,8 +6,8 @@ package getShieldMapConditionList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getSimIdBySnList/data.go b/iSolarCloud/AppService/getSimIdBySnList/data.go index bd30a2dc4..e9b754b32 100644 --- a/iSolarCloud/AppService/getSimIdBySnList/data.go +++ b/iSolarCloud/AppService/getSimIdBySnList/data.go @@ -2,8 +2,8 @@ package getSimIdBySnList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getSimIdBySnList/struct.go b/iSolarCloud/AppService/getSimIdBySnList/struct.go index 30451ed3e..083eccfd6 100644 --- a/iSolarCloud/AppService/getSimIdBySnList/struct.go +++ b/iSolarCloud/AppService/getSimIdBySnList/struct.go @@ -6,8 +6,8 @@ package getSimIdBySnList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getSingleIVData/data.go b/iSolarCloud/AppService/getSingleIVData/data.go index a09bb058f..7a16ad8a8 100644 --- a/iSolarCloud/AppService/getSingleIVData/data.go +++ b/iSolarCloud/AppService/getSingleIVData/data.go @@ -2,8 +2,8 @@ package getSingleIVData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getSingleIVData/struct.go b/iSolarCloud/AppService/getSingleIVData/struct.go index 5a826e4f7..c12967388 100644 --- a/iSolarCloud/AppService/getSingleIVData/struct.go +++ b/iSolarCloud/AppService/getSingleIVData/struct.go @@ -6,8 +6,8 @@ package getSingleIVData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getSnChangeRecord/data.go b/iSolarCloud/AppService/getSnChangeRecord/data.go index 8b6ddd60f..e405b80ea 100644 --- a/iSolarCloud/AppService/getSnChangeRecord/data.go +++ b/iSolarCloud/AppService/getSnChangeRecord/data.go @@ -2,8 +2,8 @@ package getSnChangeRecord import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getSnChangeRecord/struct.go b/iSolarCloud/AppService/getSnChangeRecord/struct.go index 1b6d6ca64..6d4a4289e 100644 --- a/iSolarCloud/AppService/getSnChangeRecord/struct.go +++ b/iSolarCloud/AppService/getSnChangeRecord/struct.go @@ -6,8 +6,8 @@ package getSnChangeRecord import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getSnConnectionInfo/data.go b/iSolarCloud/AppService/getSnConnectionInfo/data.go index b020b156f..ca70b0589 100644 --- a/iSolarCloud/AppService/getSnConnectionInfo/data.go +++ b/iSolarCloud/AppService/getSnConnectionInfo/data.go @@ -2,8 +2,8 @@ package getSnConnectionInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getSnConnectionInfo/struct.go b/iSolarCloud/AppService/getSnConnectionInfo/struct.go index 14f917cf9..390bb86bb 100644 --- a/iSolarCloud/AppService/getSnConnectionInfo/struct.go +++ b/iSolarCloud/AppService/getSnConnectionInfo/struct.go @@ -6,8 +6,8 @@ package getSnConnectionInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getStationInfoSql/data.go b/iSolarCloud/AppService/getStationInfoSql/data.go index 93618bd91..a96426396 100644 --- a/iSolarCloud/AppService/getStationInfoSql/data.go +++ b/iSolarCloud/AppService/getStationInfoSql/data.go @@ -2,8 +2,8 @@ package getStationInfoSql import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getStationInfoSql/struct.go b/iSolarCloud/AppService/getStationInfoSql/struct.go index c04f568a7..4295c7066 100644 --- a/iSolarCloud/AppService/getStationInfoSql/struct.go +++ b/iSolarCloud/AppService/getStationInfoSql/struct.go @@ -6,8 +6,8 @@ package getStationInfoSql import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getSungwsConfigCache/data.go b/iSolarCloud/AppService/getSungwsConfigCache/data.go index b3799166a..19e5c5832 100644 --- a/iSolarCloud/AppService/getSungwsConfigCache/data.go +++ b/iSolarCloud/AppService/getSungwsConfigCache/data.go @@ -2,8 +2,8 @@ package getSungwsConfigCache import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getSungwsConfigCache/struct.go b/iSolarCloud/AppService/getSungwsConfigCache/struct.go index acd0ef894..37f7510c6 100644 --- a/iSolarCloud/AppService/getSungwsConfigCache/struct.go +++ b/iSolarCloud/AppService/getSungwsConfigCache/struct.go @@ -6,8 +6,8 @@ package getSungwsConfigCache import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getSungwsGlobalConfigCache/data.go b/iSolarCloud/AppService/getSungwsGlobalConfigCache/data.go index dc5bfdfd3..ae43f7ae2 100644 --- a/iSolarCloud/AppService/getSungwsGlobalConfigCache/data.go +++ b/iSolarCloud/AppService/getSungwsGlobalConfigCache/data.go @@ -2,8 +2,8 @@ package getSungwsGlobalConfigCache import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getSungwsGlobalConfigCache/struct.go b/iSolarCloud/AppService/getSungwsGlobalConfigCache/struct.go index e8546a694..f354120b1 100644 --- a/iSolarCloud/AppService/getSungwsGlobalConfigCache/struct.go +++ b/iSolarCloud/AppService/getSungwsGlobalConfigCache/struct.go @@ -6,8 +6,8 @@ package getSungwsGlobalConfigCache import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getSweepDevParamSetTemplate/data.go b/iSolarCloud/AppService/getSweepDevParamSetTemplate/data.go index 5cdbc1f48..7fd56938e 100644 --- a/iSolarCloud/AppService/getSweepDevParamSetTemplate/data.go +++ b/iSolarCloud/AppService/getSweepDevParamSetTemplate/data.go @@ -2,8 +2,8 @@ package getSweepDevParamSetTemplate import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getSweepDevParamSetTemplate/struct.go b/iSolarCloud/AppService/getSweepDevParamSetTemplate/struct.go index 82e0c875c..f997e8fa5 100644 --- a/iSolarCloud/AppService/getSweepDevParamSetTemplate/struct.go +++ b/iSolarCloud/AppService/getSweepDevParamSetTemplate/struct.go @@ -6,8 +6,8 @@ package getSweepDevParamSetTemplate import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getSweepRobotDevList/data.go b/iSolarCloud/AppService/getSweepRobotDevList/data.go index ea0625096..13b8881b6 100644 --- a/iSolarCloud/AppService/getSweepRobotDevList/data.go +++ b/iSolarCloud/AppService/getSweepRobotDevList/data.go @@ -2,8 +2,8 @@ package getSweepRobotDevList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getSweepRobotDevList/struct.go b/iSolarCloud/AppService/getSweepRobotDevList/struct.go index f31ea8f29..899d344b5 100644 --- a/iSolarCloud/AppService/getSweepRobotDevList/struct.go +++ b/iSolarCloud/AppService/getSweepRobotDevList/struct.go @@ -6,8 +6,8 @@ package getSweepRobotDevList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getSysMsg/data.go b/iSolarCloud/AppService/getSysMsg/data.go index c4901256e..4f4ea9460 100644 --- a/iSolarCloud/AppService/getSysMsg/data.go +++ b/iSolarCloud/AppService/getSysMsg/data.go @@ -2,8 +2,8 @@ package getSysMsg import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getSysMsg/struct.go b/iSolarCloud/AppService/getSysMsg/struct.go index 08faa4af7..5bea5bb96 100644 --- a/iSolarCloud/AppService/getSysMsg/struct.go +++ b/iSolarCloud/AppService/getSysMsg/struct.go @@ -6,8 +6,8 @@ package getSysMsg import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getSysOrgNewList/data.go b/iSolarCloud/AppService/getSysOrgNewList/data.go index 92f8c5324..57caf0035 100644 --- a/iSolarCloud/AppService/getSysOrgNewList/data.go +++ b/iSolarCloud/AppService/getSysOrgNewList/data.go @@ -2,8 +2,8 @@ package getSysOrgNewList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getSysOrgNewList/struct.go b/iSolarCloud/AppService/getSysOrgNewList/struct.go index 0eda57818..08362fe52 100644 --- a/iSolarCloud/AppService/getSysOrgNewList/struct.go +++ b/iSolarCloud/AppService/getSysOrgNewList/struct.go @@ -6,8 +6,8 @@ package getSysOrgNewList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getSysOrgNewOne/data.go b/iSolarCloud/AppService/getSysOrgNewOne/data.go index 540ed5270..fd9e30e7f 100644 --- a/iSolarCloud/AppService/getSysOrgNewOne/data.go +++ b/iSolarCloud/AppService/getSysOrgNewOne/data.go @@ -2,8 +2,8 @@ package getSysOrgNewOne import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getSysOrgNewOne/struct.go b/iSolarCloud/AppService/getSysOrgNewOne/struct.go index 63b370629..8d4fe9837 100644 --- a/iSolarCloud/AppService/getSysOrgNewOne/struct.go +++ b/iSolarCloud/AppService/getSysOrgNewOne/struct.go @@ -6,8 +6,8 @@ package getSysOrgNewOne import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getSysUserById/data.go b/iSolarCloud/AppService/getSysUserById/data.go index 559b907a3..ad6844e6a 100644 --- a/iSolarCloud/AppService/getSysUserById/data.go +++ b/iSolarCloud/AppService/getSysUserById/data.go @@ -2,8 +2,8 @@ package getSysUserById import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getSysUserById/struct.go b/iSolarCloud/AppService/getSysUserById/struct.go index 71619f9e0..32070e702 100644 --- a/iSolarCloud/AppService/getSysUserById/struct.go +++ b/iSolarCloud/AppService/getSysUserById/struct.go @@ -6,8 +6,8 @@ package getSysUserById import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getTableDataSql/data.go b/iSolarCloud/AppService/getTableDataSql/data.go index 373c59902..e01908299 100644 --- a/iSolarCloud/AppService/getTableDataSql/data.go +++ b/iSolarCloud/AppService/getTableDataSql/data.go @@ -2,8 +2,8 @@ package getTableDataSql import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getTableDataSql/struct.go b/iSolarCloud/AppService/getTableDataSql/struct.go index 38c44c8f5..3f578f46f 100644 --- a/iSolarCloud/AppService/getTableDataSql/struct.go +++ b/iSolarCloud/AppService/getTableDataSql/struct.go @@ -6,8 +6,8 @@ package getTableDataSql import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getTableDataSqlCount/data.go b/iSolarCloud/AppService/getTableDataSqlCount/data.go index a3563877f..2bf18fd30 100644 --- a/iSolarCloud/AppService/getTableDataSqlCount/data.go +++ b/iSolarCloud/AppService/getTableDataSqlCount/data.go @@ -2,8 +2,8 @@ package getTableDataSqlCount import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getTableDataSqlCount/struct.go b/iSolarCloud/AppService/getTableDataSqlCount/struct.go index 9a8a870ab..3a7dd0bcd 100644 --- a/iSolarCloud/AppService/getTableDataSqlCount/struct.go +++ b/iSolarCloud/AppService/getTableDataSqlCount/struct.go @@ -6,8 +6,8 @@ package getTableDataSqlCount import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getTemplateByInfoType/data.go b/iSolarCloud/AppService/getTemplateByInfoType/data.go index 5e2a662a0..bb014adc7 100644 --- a/iSolarCloud/AppService/getTemplateByInfoType/data.go +++ b/iSolarCloud/AppService/getTemplateByInfoType/data.go @@ -2,8 +2,8 @@ package getTemplateByInfoType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getTemplateByInfoType/struct.go b/iSolarCloud/AppService/getTemplateByInfoType/struct.go index df07b1f94..5d506679a 100644 --- a/iSolarCloud/AppService/getTemplateByInfoType/struct.go +++ b/iSolarCloud/AppService/getTemplateByInfoType/struct.go @@ -6,8 +6,8 @@ package getTemplateByInfoType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getTemplateList/data.go b/iSolarCloud/AppService/getTemplateList/data.go index a579e9a43..45acd66d4 100644 --- a/iSolarCloud/AppService/getTemplateList/data.go +++ b/iSolarCloud/AppService/getTemplateList/data.go @@ -2,8 +2,8 @@ package getTemplateList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -29,8 +29,8 @@ type ResultData struct { TemplateId valueTypes.Integer `json:"template_id"` TemplateName valueTypes.String `json:"template_name"` UpdateTime valueTypes.DateTime `json:"update_time"` - } `json:"pageList" PointNameFromChild:"TemplateId" PointNameAppend:"false" PointArrayFlatten:"false" DataTable:"true"` - RowCount valueTypes.Integer `json:"rowCount"` + } `json:"pageList" PointId:"page_list" PointNameFromChild:"TemplateId" PointNameAppend:"false" PointArrayFlatten:"false" DataTable:"true"` + RowCount valueTypes.Integer `json:"rowCount" PointId:"row_count"` } func (e *ResultData) IsValid() error { diff --git a/iSolarCloud/AppService/getTemplateList/struct.go b/iSolarCloud/AppService/getTemplateList/struct.go index 4284d7fc0..e38d43ae5 100644 --- a/iSolarCloud/AppService/getTemplateList/struct.go +++ b/iSolarCloud/AppService/getTemplateList/struct.go @@ -6,8 +6,8 @@ package getTemplateList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getUUIDByUpuuid/data.go b/iSolarCloud/AppService/getUUIDByUpuuid/data.go index d82452206..b7c309e74 100644 --- a/iSolarCloud/AppService/getUUIDByUpuuid/data.go +++ b/iSolarCloud/AppService/getUUIDByUpuuid/data.go @@ -2,8 +2,8 @@ package getUUIDByUpuuid import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getUUIDByUpuuid/struct.go b/iSolarCloud/AppService/getUUIDByUpuuid/struct.go index a145725a5..8e3a99891 100644 --- a/iSolarCloud/AppService/getUUIDByUpuuid/struct.go +++ b/iSolarCloud/AppService/getUUIDByUpuuid/struct.go @@ -6,8 +6,8 @@ package getUUIDByUpuuid import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getUpTimePoint/data.go b/iSolarCloud/AppService/getUpTimePoint/data.go index 902d02bd8..e017cf973 100644 --- a/iSolarCloud/AppService/getUpTimePoint/data.go +++ b/iSolarCloud/AppService/getUpTimePoint/data.go @@ -2,8 +2,8 @@ package getUpTimePoint import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getUpTimePoint/struct.go b/iSolarCloud/AppService/getUpTimePoint/struct.go index 0a3bc4b53..d19caab02 100644 --- a/iSolarCloud/AppService/getUpTimePoint/struct.go +++ b/iSolarCloud/AppService/getUpTimePoint/struct.go @@ -6,8 +6,8 @@ package getUpTimePoint import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getUserById/data.go b/iSolarCloud/AppService/getUserById/data.go index 19689793d..56f9eeb89 100644 --- a/iSolarCloud/AppService/getUserById/data.go +++ b/iSolarCloud/AppService/getUserById/data.go @@ -2,8 +2,8 @@ package getUserById import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getUserById/struct.go b/iSolarCloud/AppService/getUserById/struct.go index 6aeb20462..2e95d4919 100644 --- a/iSolarCloud/AppService/getUserById/struct.go +++ b/iSolarCloud/AppService/getUserById/struct.go @@ -6,8 +6,8 @@ package getUserById import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getUserByInstaller/data.go b/iSolarCloud/AppService/getUserByInstaller/data.go index b7cf578e1..0456c6f84 100644 --- a/iSolarCloud/AppService/getUserByInstaller/data.go +++ b/iSolarCloud/AppService/getUserByInstaller/data.go @@ -2,8 +2,8 @@ package getUserByInstaller import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getUserByInstaller/struct.go b/iSolarCloud/AppService/getUserByInstaller/struct.go index dcc848ac8..4ab0f5a06 100644 --- a/iSolarCloud/AppService/getUserByInstaller/struct.go +++ b/iSolarCloud/AppService/getUserByInstaller/struct.go @@ -6,8 +6,8 @@ package getUserByInstaller import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getUserDevOnlineOffineCount/data.go b/iSolarCloud/AppService/getUserDevOnlineOffineCount/data.go index 477be09e4..34289b424 100644 --- a/iSolarCloud/AppService/getUserDevOnlineOffineCount/data.go +++ b/iSolarCloud/AppService/getUserDevOnlineOffineCount/data.go @@ -2,8 +2,8 @@ package getUserDevOnlineOffineCount import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getUserDevOnlineOffineCount/struct.go b/iSolarCloud/AppService/getUserDevOnlineOffineCount/struct.go index 4f4274874..b9144562f 100644 --- a/iSolarCloud/AppService/getUserDevOnlineOffineCount/struct.go +++ b/iSolarCloud/AppService/getUserDevOnlineOffineCount/struct.go @@ -6,8 +6,8 @@ package getUserDevOnlineOffineCount import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getUserGDPRAttrs/data.go b/iSolarCloud/AppService/getUserGDPRAttrs/data.go index 39c87e113..d241e03b8 100644 --- a/iSolarCloud/AppService/getUserGDPRAttrs/data.go +++ b/iSolarCloud/AppService/getUserGDPRAttrs/data.go @@ -2,8 +2,8 @@ package getUserGDPRAttrs import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getUserGDPRAttrs/struct.go b/iSolarCloud/AppService/getUserGDPRAttrs/struct.go index e699b0df3..68dfed872 100644 --- a/iSolarCloud/AppService/getUserGDPRAttrs/struct.go +++ b/iSolarCloud/AppService/getUserGDPRAttrs/struct.go @@ -6,8 +6,8 @@ package getUserGDPRAttrs import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getUserHavePowerStationCount/data.go b/iSolarCloud/AppService/getUserHavePowerStationCount/data.go index 9a2598fed..8e71e8b75 100644 --- a/iSolarCloud/AppService/getUserHavePowerStationCount/data.go +++ b/iSolarCloud/AppService/getUserHavePowerStationCount/data.go @@ -2,8 +2,8 @@ package getUserHavePowerStationCount import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getUserHavePowerStationCount/struct.go b/iSolarCloud/AppService/getUserHavePowerStationCount/struct.go index 290c9c2f2..645587864 100644 --- a/iSolarCloud/AppService/getUserHavePowerStationCount/struct.go +++ b/iSolarCloud/AppService/getUserHavePowerStationCount/struct.go @@ -6,8 +6,8 @@ package getUserHavePowerStationCount import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getUserInfoByUserAccounts/data.go b/iSolarCloud/AppService/getUserInfoByUserAccounts/data.go index 35861b29d..1b4a79ae4 100644 --- a/iSolarCloud/AppService/getUserInfoByUserAccounts/data.go +++ b/iSolarCloud/AppService/getUserInfoByUserAccounts/data.go @@ -2,8 +2,8 @@ package getUserInfoByUserAccounts import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getUserInfoByUserAccounts/struct.go b/iSolarCloud/AppService/getUserInfoByUserAccounts/struct.go index 85dd7fd33..5bd6df4c5 100644 --- a/iSolarCloud/AppService/getUserInfoByUserAccounts/struct.go +++ b/iSolarCloud/AppService/getUserInfoByUserAccounts/struct.go @@ -6,8 +6,8 @@ package getUserInfoByUserAccounts import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getUserList/data.go b/iSolarCloud/AppService/getUserList/data.go index 6018cdad1..29b73f683 100644 --- a/iSolarCloud/AppService/getUserList/data.go +++ b/iSolarCloud/AppService/getUserList/data.go @@ -2,8 +2,8 @@ package getUserList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -15,7 +15,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getUserList/struct.go b/iSolarCloud/AppService/getUserList/struct.go index 6595bc3c2..32ce66a28 100644 --- a/iSolarCloud/AppService/getUserList/struct.go +++ b/iSolarCloud/AppService/getUserList/struct.go @@ -6,8 +6,8 @@ package getUserList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getUserPsOrderList/data.go b/iSolarCloud/AppService/getUserPsOrderList/data.go index a7c39654a..b25619e39 100644 --- a/iSolarCloud/AppService/getUserPsOrderList/data.go +++ b/iSolarCloud/AppService/getUserPsOrderList/data.go @@ -2,8 +2,8 @@ package getUserPsOrderList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -15,7 +15,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -24,13 +24,13 @@ func (rd RequestData) Help() string { } type ResultData struct { - CurPage valueTypes.Integer `json:"curPage"` - IsMore valueTypes.Bool `json:"isMore"` - PageList []interface{} `json:"pageList" PointNameAppend:"false" PointArrayFlatten:"false"` - RowCount valueTypes.Integer `json:"rowCount"` + CurPage valueTypes.Integer `json:"curPage" PointId:"cur_page"` + IsMore valueTypes.Bool `json:"isMore" PointId:"is_more"` + PageList []interface{} `json:"pageList" PointId:"page_list" PointNameAppend:"false" PointArrayFlatten:"false"` + RowCount valueTypes.Integer `json:"rowCount" PointId:"row_count"` Size valueTypes.Integer `json:"size"` - StartIndex interface{} `json:"startIndex"` - TotalPage interface{} `json:"totalPage"` + StartIndex interface{} `json:"startIndex" PointId:"start_index"` + TotalPage interface{} `json:"totalPage" PointId:"total_page"` } func (e *ResultData) IsValid() error { diff --git a/iSolarCloud/AppService/getUserPsOrderList/struct.go b/iSolarCloud/AppService/getUserPsOrderList/struct.go index bfff895fb..5e6de533f 100644 --- a/iSolarCloud/AppService/getUserPsOrderList/struct.go +++ b/iSolarCloud/AppService/getUserPsOrderList/struct.go @@ -6,8 +6,8 @@ package getUserPsOrderList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getValFromHBase/data.go b/iSolarCloud/AppService/getValFromHBase/data.go index b1367bd40..950122611 100644 --- a/iSolarCloud/AppService/getValFromHBase/data.go +++ b/iSolarCloud/AppService/getValFromHBase/data.go @@ -2,8 +2,8 @@ package getValFromHBase import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getValFromHBase/struct.go b/iSolarCloud/AppService/getValFromHBase/struct.go index 1ccde6eaa..bc5452264 100644 --- a/iSolarCloud/AppService/getValFromHBase/struct.go +++ b/iSolarCloud/AppService/getValFromHBase/struct.go @@ -6,8 +6,8 @@ package getValFromHBase import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getValidateCode/data.go b/iSolarCloud/AppService/getValidateCode/data.go index 4a97cea2c..29040d217 100644 --- a/iSolarCloud/AppService/getValidateCode/data.go +++ b/iSolarCloud/AppService/getValidateCode/data.go @@ -2,8 +2,8 @@ package getValidateCode import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getValidateCode/struct.go b/iSolarCloud/AppService/getValidateCode/struct.go index 3e05c7e2f..f92087224 100644 --- a/iSolarCloud/AppService/getValidateCode/struct.go +++ b/iSolarCloud/AppService/getValidateCode/struct.go @@ -6,8 +6,8 @@ package getValidateCode import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getValidateCodeAtRegister/data.go b/iSolarCloud/AppService/getValidateCodeAtRegister/data.go index 545d47731..7db66a5ea 100644 --- a/iSolarCloud/AppService/getValidateCodeAtRegister/data.go +++ b/iSolarCloud/AppService/getValidateCodeAtRegister/data.go @@ -2,8 +2,8 @@ package getValidateCodeAtRegister import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getValidateCodeAtRegister/struct.go b/iSolarCloud/AppService/getValidateCodeAtRegister/struct.go index 1cd2a8493..0b644efde 100644 --- a/iSolarCloud/AppService/getValidateCodeAtRegister/struct.go +++ b/iSolarCloud/AppService/getValidateCodeAtRegister/struct.go @@ -6,8 +6,8 @@ package getValidateCodeAtRegister import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getWeatherInfo/data.go b/iSolarCloud/AppService/getWeatherInfo/data.go index 5632d02f3..9c2983057 100644 --- a/iSolarCloud/AppService/getWeatherInfo/data.go +++ b/iSolarCloud/AppService/getWeatherInfo/data.go @@ -2,8 +2,8 @@ package getWeatherInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getWeatherInfo/struct.go b/iSolarCloud/AppService/getWeatherInfo/struct.go index eaecdea98..f9df6664a 100644 --- a/iSolarCloud/AppService/getWeatherInfo/struct.go +++ b/iSolarCloud/AppService/getWeatherInfo/struct.go @@ -6,8 +6,8 @@ package getWeatherInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getWechatPushConfig/data.go b/iSolarCloud/AppService/getWechatPushConfig/data.go index e81b937fa..83f3684b7 100644 --- a/iSolarCloud/AppService/getWechatPushConfig/data.go +++ b/iSolarCloud/AppService/getWechatPushConfig/data.go @@ -2,8 +2,8 @@ package getWechatPushConfig import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getWechatPushConfig/struct.go b/iSolarCloud/AppService/getWechatPushConfig/struct.go index 371f183eb..04b95c99f 100644 --- a/iSolarCloud/AppService/getWechatPushConfig/struct.go +++ b/iSolarCloud/AppService/getWechatPushConfig/struct.go @@ -6,8 +6,8 @@ package getWechatPushConfig import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/getWorkInfo/data.go b/iSolarCloud/AppService/getWorkInfo/data.go index b09a5198e..97f19c796 100644 --- a/iSolarCloud/AppService/getWorkInfo/data.go +++ b/iSolarCloud/AppService/getWorkInfo/data.go @@ -2,8 +2,8 @@ package getWorkInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/getWorkInfo/struct.go b/iSolarCloud/AppService/getWorkInfo/struct.go index 160fe3e1c..80ae36436 100644 --- a/iSolarCloud/AppService/getWorkInfo/struct.go +++ b/iSolarCloud/AppService/getWorkInfo/struct.go @@ -6,8 +6,8 @@ package getWorkInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/groupStringCheck/data.go b/iSolarCloud/AppService/groupStringCheck/data.go index 798f55684..dca839e10 100644 --- a/iSolarCloud/AppService/groupStringCheck/data.go +++ b/iSolarCloud/AppService/groupStringCheck/data.go @@ -2,8 +2,8 @@ package groupStringCheck import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/groupStringCheck/struct.go b/iSolarCloud/AppService/groupStringCheck/struct.go index 3970c4f94..a96f0951e 100644 --- a/iSolarCloud/AppService/groupStringCheck/struct.go +++ b/iSolarCloud/AppService/groupStringCheck/struct.go @@ -6,8 +6,8 @@ package groupStringCheck import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/handleDevByCommunicationSN/data.go b/iSolarCloud/AppService/handleDevByCommunicationSN/data.go index cb76030d7..92081a7a1 100644 --- a/iSolarCloud/AppService/handleDevByCommunicationSN/data.go +++ b/iSolarCloud/AppService/handleDevByCommunicationSN/data.go @@ -2,8 +2,8 @@ package handleDevByCommunicationSN import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/handleDevByCommunicationSN/struct.go b/iSolarCloud/AppService/handleDevByCommunicationSN/struct.go index 2b53090dc..144f461d1 100644 --- a/iSolarCloud/AppService/handleDevByCommunicationSN/struct.go +++ b/iSolarCloud/AppService/handleDevByCommunicationSN/struct.go @@ -6,8 +6,8 @@ package handleDevByCommunicationSN import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/householdResetPassBySN/data.go b/iSolarCloud/AppService/householdResetPassBySN/data.go index ef75fe20d..48bf967d8 100644 --- a/iSolarCloud/AppService/householdResetPassBySN/data.go +++ b/iSolarCloud/AppService/householdResetPassBySN/data.go @@ -2,8 +2,8 @@ package householdResetPassBySN import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/householdResetPassBySN/struct.go b/iSolarCloud/AppService/householdResetPassBySN/struct.go index ff425d65a..82a26fdb8 100644 --- a/iSolarCloud/AppService/householdResetPassBySN/struct.go +++ b/iSolarCloud/AppService/householdResetPassBySN/struct.go @@ -6,8 +6,8 @@ package householdResetPassBySN import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/immediatePayment/data.go b/iSolarCloud/AppService/immediatePayment/data.go index b3264170e..75845dcce 100644 --- a/iSolarCloud/AppService/immediatePayment/data.go +++ b/iSolarCloud/AppService/immediatePayment/data.go @@ -2,8 +2,8 @@ package immediatePayment import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/immediatePayment/struct.go b/iSolarCloud/AppService/immediatePayment/struct.go index 86bb04832..1e5b849a4 100644 --- a/iSolarCloud/AppService/immediatePayment/struct.go +++ b/iSolarCloud/AppService/immediatePayment/struct.go @@ -6,8 +6,8 @@ package immediatePayment import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/importExcelData/data.go b/iSolarCloud/AppService/importExcelData/data.go index 7fb4ce749..3c157d4f5 100644 --- a/iSolarCloud/AppService/importExcelData/data.go +++ b/iSolarCloud/AppService/importExcelData/data.go @@ -2,8 +2,8 @@ package importExcelData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/importExcelData/struct.go b/iSolarCloud/AppService/importExcelData/struct.go index 1a934f10b..1b68af6d0 100644 --- a/iSolarCloud/AppService/importExcelData/struct.go +++ b/iSolarCloud/AppService/importExcelData/struct.go @@ -6,8 +6,8 @@ package importExcelData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/incomeStatistics/data.go b/iSolarCloud/AppService/incomeStatistics/data.go index b5d16495e..96b77890e 100644 --- a/iSolarCloud/AppService/incomeStatistics/data.go +++ b/iSolarCloud/AppService/incomeStatistics/data.go @@ -2,8 +2,8 @@ package incomeStatistics import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/incomeStatistics/struct.go b/iSolarCloud/AppService/incomeStatistics/struct.go index cdb7495f2..b8aa7fc2e 100644 --- a/iSolarCloud/AppService/incomeStatistics/struct.go +++ b/iSolarCloud/AppService/incomeStatistics/struct.go @@ -6,8 +6,8 @@ package incomeStatistics import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/informPush/data.go b/iSolarCloud/AppService/informPush/data.go index 7bd051d85..a55e8369b 100644 --- a/iSolarCloud/AppService/informPush/data.go +++ b/iSolarCloud/AppService/informPush/data.go @@ -2,8 +2,8 @@ package informPush import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/informPush/struct.go b/iSolarCloud/AppService/informPush/struct.go index 0832db4c5..6d91435a5 100644 --- a/iSolarCloud/AppService/informPush/struct.go +++ b/iSolarCloud/AppService/informPush/struct.go @@ -6,8 +6,8 @@ package informPush import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/insertEmgOrgInfo/data.go b/iSolarCloud/AppService/insertEmgOrgInfo/data.go index ca25010f7..7771a972d 100644 --- a/iSolarCloud/AppService/insertEmgOrgInfo/data.go +++ b/iSolarCloud/AppService/insertEmgOrgInfo/data.go @@ -2,8 +2,8 @@ package insertEmgOrgInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/insertEmgOrgInfo/struct.go b/iSolarCloud/AppService/insertEmgOrgInfo/struct.go index 1a9f4964c..41f910763 100644 --- a/iSolarCloud/AppService/insertEmgOrgInfo/struct.go +++ b/iSolarCloud/AppService/insertEmgOrgInfo/struct.go @@ -6,8 +6,8 @@ package insertEmgOrgInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/insightSynDeviceStructure2Cloud/data.go b/iSolarCloud/AppService/insightSynDeviceStructure2Cloud/data.go index 0b532b09e..5c9257347 100644 --- a/iSolarCloud/AppService/insightSynDeviceStructure2Cloud/data.go +++ b/iSolarCloud/AppService/insightSynDeviceStructure2Cloud/data.go @@ -2,8 +2,8 @@ package insightSynDeviceStructure2Cloud import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/insightSynDeviceStructure2Cloud/struct.go b/iSolarCloud/AppService/insightSynDeviceStructure2Cloud/struct.go index e81193fd1..d8bfe9543 100644 --- a/iSolarCloud/AppService/insightSynDeviceStructure2Cloud/struct.go +++ b/iSolarCloud/AppService/insightSynDeviceStructure2Cloud/struct.go @@ -6,8 +6,8 @@ package insightSynDeviceStructure2Cloud import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/intoDataToHbase/data.go b/iSolarCloud/AppService/intoDataToHbase/data.go index af3237c88..d58be0d41 100644 --- a/iSolarCloud/AppService/intoDataToHbase/data.go +++ b/iSolarCloud/AppService/intoDataToHbase/data.go @@ -2,8 +2,8 @@ package intoDataToHbase import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/intoDataToHbase/struct.go b/iSolarCloud/AppService/intoDataToHbase/struct.go index 2424b0a46..321e3c60c 100644 --- a/iSolarCloud/AppService/intoDataToHbase/struct.go +++ b/iSolarCloud/AppService/intoDataToHbase/struct.go @@ -6,8 +6,8 @@ package intoDataToHbase import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/ipLocationQuery/data.go b/iSolarCloud/AppService/ipLocationQuery/data.go index c188dfcc8..d41cc7088 100644 --- a/iSolarCloud/AppService/ipLocationQuery/data.go +++ b/iSolarCloud/AppService/ipLocationQuery/data.go @@ -2,8 +2,8 @@ package ipLocationQuery import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/ipLocationQuery/struct.go b/iSolarCloud/AppService/ipLocationQuery/struct.go index 1bad8200d..a2a310e7e 100644 --- a/iSolarCloud/AppService/ipLocationQuery/struct.go +++ b/iSolarCloud/AppService/ipLocationQuery/struct.go @@ -6,8 +6,8 @@ package ipLocationQuery import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/isHave2GSn/data.go b/iSolarCloud/AppService/isHave2GSn/data.go index 0912831c4..12da2d8ac 100644 --- a/iSolarCloud/AppService/isHave2GSn/data.go +++ b/iSolarCloud/AppService/isHave2GSn/data.go @@ -2,8 +2,8 @@ package isHave2GSn import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/isHave2GSn/struct.go b/iSolarCloud/AppService/isHave2GSn/struct.go index 5810d90de..c661f916c 100644 --- a/iSolarCloud/AppService/isHave2GSn/struct.go +++ b/iSolarCloud/AppService/isHave2GSn/struct.go @@ -6,8 +6,8 @@ package isHave2GSn import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/judgeDevIsHasInitSetTemplate/data.go b/iSolarCloud/AppService/judgeDevIsHasInitSetTemplate/data.go index 4a1ccca3d..408322072 100644 --- a/iSolarCloud/AppService/judgeDevIsHasInitSetTemplate/data.go +++ b/iSolarCloud/AppService/judgeDevIsHasInitSetTemplate/data.go @@ -2,8 +2,8 @@ package judgeDevIsHasInitSetTemplate import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/judgeDevIsHasInitSetTemplate/struct.go b/iSolarCloud/AppService/judgeDevIsHasInitSetTemplate/struct.go index 5c1c47bf9..0932cd451 100644 --- a/iSolarCloud/AppService/judgeDevIsHasInitSetTemplate/struct.go +++ b/iSolarCloud/AppService/judgeDevIsHasInitSetTemplate/struct.go @@ -6,8 +6,8 @@ package judgeDevIsHasInitSetTemplate import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/judgeIsSettingMan/data.go b/iSolarCloud/AppService/judgeIsSettingMan/data.go index c03e76f17..f54e48601 100644 --- a/iSolarCloud/AppService/judgeIsSettingMan/data.go +++ b/iSolarCloud/AppService/judgeIsSettingMan/data.go @@ -2,8 +2,8 @@ package judgeIsSettingMan import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/judgeIsSettingMan/struct.go b/iSolarCloud/AppService/judgeIsSettingMan/struct.go index 9d8ff4e48..29714a08a 100644 --- a/iSolarCloud/AppService/judgeIsSettingMan/struct.go +++ b/iSolarCloud/AppService/judgeIsSettingMan/struct.go @@ -6,8 +6,8 @@ package judgeIsSettingMan import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/listOssFiles/data.go b/iSolarCloud/AppService/listOssFiles/data.go index df0c8dfd3..2cebd301b 100644 --- a/iSolarCloud/AppService/listOssFiles/data.go +++ b/iSolarCloud/AppService/listOssFiles/data.go @@ -2,8 +2,8 @@ package listOssFiles import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/listOssFiles/struct.go b/iSolarCloud/AppService/listOssFiles/struct.go index dd8d045d3..0780bcacd 100644 --- a/iSolarCloud/AppService/listOssFiles/struct.go +++ b/iSolarCloud/AppService/listOssFiles/struct.go @@ -6,8 +6,8 @@ package listOssFiles import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/loadAreaInfo/data.go b/iSolarCloud/AppService/loadAreaInfo/data.go index b5761540b..8ab81e70e 100644 --- a/iSolarCloud/AppService/loadAreaInfo/data.go +++ b/iSolarCloud/AppService/loadAreaInfo/data.go @@ -2,8 +2,8 @@ package loadAreaInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/loadAreaInfo/struct.go b/iSolarCloud/AppService/loadAreaInfo/struct.go index 59bdb6a86..7d7bb0368 100644 --- a/iSolarCloud/AppService/loadAreaInfo/struct.go +++ b/iSolarCloud/AppService/loadAreaInfo/struct.go @@ -6,8 +6,8 @@ package loadAreaInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/loadPowerStation/data.go b/iSolarCloud/AppService/loadPowerStation/data.go index 39f578b14..37ff89ba1 100644 --- a/iSolarCloud/AppService/loadPowerStation/data.go +++ b/iSolarCloud/AppService/loadPowerStation/data.go @@ -2,8 +2,8 @@ package loadPowerStation import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/loadPowerStation/struct.go b/iSolarCloud/AppService/loadPowerStation/struct.go index eea7b575e..b3e1c2a50 100644 --- a/iSolarCloud/AppService/loadPowerStation/struct.go +++ b/iSolarCloud/AppService/loadPowerStation/struct.go @@ -6,8 +6,8 @@ package loadPowerStation import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/login/auth.go b/iSolarCloud/AppService/login/auth.go index 92176a6a2..4a0e1749b 100644 --- a/iSolarCloud/AppService/login/auth.go +++ b/iSolarCloud/AppService/login/auth.go @@ -3,8 +3,8 @@ package login import ( "GoSungrow/Only" "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/output" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "errors" "fmt" "time" diff --git a/iSolarCloud/AppService/login/data.go b/iSolarCloud/AppService/login/data.go index d6ba7a458..012fc0568 100644 --- a/iSolarCloud/AppService/login/data.go +++ b/iSolarCloud/AppService/login/data.go @@ -2,8 +2,8 @@ package login import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "errors" "github.com/MickMake/GoUnify/Only" @@ -19,7 +19,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/login/struct.go b/iSolarCloud/AppService/login/struct.go index d520e4849..3cef9a90f 100644 --- a/iSolarCloud/AppService/login/struct.go +++ b/iSolarCloud/AppService/login/struct.go @@ -6,8 +6,8 @@ package login import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -37,7 +37,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -107,7 +107,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -187,18 +187,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -235,7 +235,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/loginByToken/data.go b/iSolarCloud/AppService/loginByToken/data.go index d4fd05a35..f4a00753c 100644 --- a/iSolarCloud/AppService/loginByToken/data.go +++ b/iSolarCloud/AppService/loginByToken/data.go @@ -2,8 +2,8 @@ package loginByToken import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/loginByToken/struct.go b/iSolarCloud/AppService/loginByToken/struct.go index b668e8fd7..3d8d918fb 100644 --- a/iSolarCloud/AppService/loginByToken/struct.go +++ b/iSolarCloud/AppService/loginByToken/struct.go @@ -6,8 +6,8 @@ package loginByToken import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/logout/data.go b/iSolarCloud/AppService/logout/data.go index dd417a755..1881b542b 100644 --- a/iSolarCloud/AppService/logout/data.go +++ b/iSolarCloud/AppService/logout/data.go @@ -2,8 +2,8 @@ package logout import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/logout/struct.go b/iSolarCloud/AppService/logout/struct.go index 94816cf01..df8966edd 100644 --- a/iSolarCloud/AppService/logout/struct.go +++ b/iSolarCloud/AppService/logout/struct.go @@ -6,8 +6,8 @@ package logout import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/mobilePhoneHasBound/data.go b/iSolarCloud/AppService/mobilePhoneHasBound/data.go index 14cbb4e4c..ad552069e 100644 --- a/iSolarCloud/AppService/mobilePhoneHasBound/data.go +++ b/iSolarCloud/AppService/mobilePhoneHasBound/data.go @@ -2,8 +2,8 @@ package mobilePhoneHasBound import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/mobilePhoneHasBound/struct.go b/iSolarCloud/AppService/mobilePhoneHasBound/struct.go index 2202efda0..dff87ef10 100644 --- a/iSolarCloud/AppService/mobilePhoneHasBound/struct.go +++ b/iSolarCloud/AppService/mobilePhoneHasBound/struct.go @@ -6,8 +6,8 @@ package mobilePhoneHasBound import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/modifiedDeviceInfo/data.go b/iSolarCloud/AppService/modifiedDeviceInfo/data.go index c415ec6b9..08059d463 100644 --- a/iSolarCloud/AppService/modifiedDeviceInfo/data.go +++ b/iSolarCloud/AppService/modifiedDeviceInfo/data.go @@ -2,8 +2,8 @@ package modifiedDeviceInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/modifiedDeviceInfo/struct.go b/iSolarCloud/AppService/modifiedDeviceInfo/struct.go index b99bed2a7..b7e56ef5f 100644 --- a/iSolarCloud/AppService/modifiedDeviceInfo/struct.go +++ b/iSolarCloud/AppService/modifiedDeviceInfo/struct.go @@ -6,8 +6,8 @@ package modifiedDeviceInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/modifyEmgOrgStruc/data.go b/iSolarCloud/AppService/modifyEmgOrgStruc/data.go index 22a2861a0..9fb273cc1 100644 --- a/iSolarCloud/AppService/modifyEmgOrgStruc/data.go +++ b/iSolarCloud/AppService/modifyEmgOrgStruc/data.go @@ -2,8 +2,8 @@ package modifyEmgOrgStruc import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/modifyEmgOrgStruc/struct.go b/iSolarCloud/AppService/modifyEmgOrgStruc/struct.go index fdc503a99..eecd68e48 100644 --- a/iSolarCloud/AppService/modifyEmgOrgStruc/struct.go +++ b/iSolarCloud/AppService/modifyEmgOrgStruc/struct.go @@ -6,8 +6,8 @@ package modifyEmgOrgStruc import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/modifyFaultPlan/data.go b/iSolarCloud/AppService/modifyFaultPlan/data.go index e2c885067..ead74afda 100644 --- a/iSolarCloud/AppService/modifyFaultPlan/data.go +++ b/iSolarCloud/AppService/modifyFaultPlan/data.go @@ -2,8 +2,8 @@ package modifyFaultPlan import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/modifyFaultPlan/struct.go b/iSolarCloud/AppService/modifyFaultPlan/struct.go index 684f1fe96..b2299f061 100644 --- a/iSolarCloud/AppService/modifyFaultPlan/struct.go +++ b/iSolarCloud/AppService/modifyFaultPlan/struct.go @@ -6,8 +6,8 @@ package modifyFaultPlan import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/modifyOnDutyInfo/data.go b/iSolarCloud/AppService/modifyOnDutyInfo/data.go index 47adaa156..414944121 100644 --- a/iSolarCloud/AppService/modifyOnDutyInfo/data.go +++ b/iSolarCloud/AppService/modifyOnDutyInfo/data.go @@ -2,8 +2,8 @@ package modifyOnDutyInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/modifyOnDutyInfo/struct.go b/iSolarCloud/AppService/modifyOnDutyInfo/struct.go index 02a2533c9..d86bd4be2 100644 --- a/iSolarCloud/AppService/modifyOnDutyInfo/struct.go +++ b/iSolarCloud/AppService/modifyOnDutyInfo/struct.go @@ -6,8 +6,8 @@ package modifyOnDutyInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/modifyPassword/data.go b/iSolarCloud/AppService/modifyPassword/data.go index fbf2e34de..00261db5b 100644 --- a/iSolarCloud/AppService/modifyPassword/data.go +++ b/iSolarCloud/AppService/modifyPassword/data.go @@ -2,8 +2,8 @@ package modifyPassword import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/modifyPassword/struct.go b/iSolarCloud/AppService/modifyPassword/struct.go index 8b81767ef..28ec7e0b0 100644 --- a/iSolarCloud/AppService/modifyPassword/struct.go +++ b/iSolarCloud/AppService/modifyPassword/struct.go @@ -6,8 +6,8 @@ package modifyPassword import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/modifyPersonalUnitList/data.go b/iSolarCloud/AppService/modifyPersonalUnitList/data.go index dc2f0b01c..96daa97f6 100644 --- a/iSolarCloud/AppService/modifyPersonalUnitList/data.go +++ b/iSolarCloud/AppService/modifyPersonalUnitList/data.go @@ -2,8 +2,8 @@ package modifyPersonalUnitList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/modifyPersonalUnitList/struct.go b/iSolarCloud/AppService/modifyPersonalUnitList/struct.go index a56ddad9e..ca9328868 100644 --- a/iSolarCloud/AppService/modifyPersonalUnitList/struct.go +++ b/iSolarCloud/AppService/modifyPersonalUnitList/struct.go @@ -6,8 +6,8 @@ package modifyPersonalUnitList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/modifyPsUser/data.go b/iSolarCloud/AppService/modifyPsUser/data.go index 5ff826373..6aad1cd76 100644 --- a/iSolarCloud/AppService/modifyPsUser/data.go +++ b/iSolarCloud/AppService/modifyPsUser/data.go @@ -2,8 +2,8 @@ package modifyPsUser import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/modifyPsUser/struct.go b/iSolarCloud/AppService/modifyPsUser/struct.go index 5dfedd06f..d411e0c31 100644 --- a/iSolarCloud/AppService/modifyPsUser/struct.go +++ b/iSolarCloud/AppService/modifyPsUser/struct.go @@ -6,8 +6,8 @@ package modifyPsUser import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/moduleLogParamSet/data.go b/iSolarCloud/AppService/moduleLogParamSet/data.go index 212bbcd62..cefd441fd 100644 --- a/iSolarCloud/AppService/moduleLogParamSet/data.go +++ b/iSolarCloud/AppService/moduleLogParamSet/data.go @@ -2,8 +2,8 @@ package moduleLogParamSet import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/moduleLogParamSet/struct.go b/iSolarCloud/AppService/moduleLogParamSet/struct.go index 9461a5214..c0cc9cdba 100644 --- a/iSolarCloud/AppService/moduleLogParamSet/struct.go +++ b/iSolarCloud/AppService/moduleLogParamSet/struct.go @@ -6,8 +6,8 @@ package moduleLogParamSet import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/operateOssFile/data.go b/iSolarCloud/AppService/operateOssFile/data.go index 327ff1831..f5ff9ac61 100644 --- a/iSolarCloud/AppService/operateOssFile/data.go +++ b/iSolarCloud/AppService/operateOssFile/data.go @@ -2,8 +2,8 @@ package operateOssFile import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/operateOssFile/struct.go b/iSolarCloud/AppService/operateOssFile/struct.go index 8af9a3a98..737be14f0 100644 --- a/iSolarCloud/AppService/operateOssFile/struct.go +++ b/iSolarCloud/AppService/operateOssFile/struct.go @@ -6,8 +6,8 @@ package operateOssFile import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/operationPowerRobotSweepStrategy/data.go b/iSolarCloud/AppService/operationPowerRobotSweepStrategy/data.go index 61ba4f63c..3ffd81773 100644 --- a/iSolarCloud/AppService/operationPowerRobotSweepStrategy/data.go +++ b/iSolarCloud/AppService/operationPowerRobotSweepStrategy/data.go @@ -2,8 +2,8 @@ package operationPowerRobotSweepStrategy import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/operationPowerRobotSweepStrategy/struct.go b/iSolarCloud/AppService/operationPowerRobotSweepStrategy/struct.go index 6c0680117..7cddec937 100644 --- a/iSolarCloud/AppService/operationPowerRobotSweepStrategy/struct.go +++ b/iSolarCloud/AppService/operationPowerRobotSweepStrategy/struct.go @@ -6,8 +6,8 @@ package operationPowerRobotSweepStrategy import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/orgPowerReport/data.go b/iSolarCloud/AppService/orgPowerReport/data.go index 0f6e2669c..9401de971 100644 --- a/iSolarCloud/AppService/orgPowerReport/data.go +++ b/iSolarCloud/AppService/orgPowerReport/data.go @@ -2,8 +2,8 @@ package orgPowerReport import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/orgPowerReport/struct.go b/iSolarCloud/AppService/orgPowerReport/struct.go index 0520354a0..83ddaaa3c 100644 --- a/iSolarCloud/AppService/orgPowerReport/struct.go +++ b/iSolarCloud/AppService/orgPowerReport/struct.go @@ -6,8 +6,8 @@ package orgPowerReport import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/paramSetTryAgain/data.go b/iSolarCloud/AppService/paramSetTryAgain/data.go index 0ff76fa98..bcaf78984 100644 --- a/iSolarCloud/AppService/paramSetTryAgain/data.go +++ b/iSolarCloud/AppService/paramSetTryAgain/data.go @@ -2,8 +2,8 @@ package paramSetTryAgain import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/paramSetTryAgain/struct.go b/iSolarCloud/AppService/paramSetTryAgain/struct.go index 93abc5d7b..96b9f9a6b 100644 --- a/iSolarCloud/AppService/paramSetTryAgain/struct.go +++ b/iSolarCloud/AppService/paramSetTryAgain/struct.go @@ -6,8 +6,8 @@ package paramSetTryAgain import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/paramSetting/data.go b/iSolarCloud/AppService/paramSetting/data.go index 336e4afc3..88fa29972 100644 --- a/iSolarCloud/AppService/paramSetting/data.go +++ b/iSolarCloud/AppService/paramSetting/data.go @@ -2,8 +2,8 @@ package paramSetting import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/paramSetting/struct.go b/iSolarCloud/AppService/paramSetting/struct.go index 77b000760..6ad61f3f3 100644 --- a/iSolarCloud/AppService/paramSetting/struct.go +++ b/iSolarCloud/AppService/paramSetting/struct.go @@ -6,8 +6,8 @@ package paramSetting import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/planPower/data.go b/iSolarCloud/AppService/planPower/data.go index 0cdce4139..036e6deec 100644 --- a/iSolarCloud/AppService/planPower/data.go +++ b/iSolarCloud/AppService/planPower/data.go @@ -2,8 +2,8 @@ package planPower import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/planPower/struct.go b/iSolarCloud/AppService/planPower/struct.go index 39c8b2da4..6a71256a6 100644 --- a/iSolarCloud/AppService/planPower/struct.go +++ b/iSolarCloud/AppService/planPower/struct.go @@ -6,8 +6,8 @@ package planPower import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/powerDevicePointList/data.go b/iSolarCloud/AppService/powerDevicePointList/data.go index 132408203..b65bdc644 100644 --- a/iSolarCloud/AppService/powerDevicePointList/data.go +++ b/iSolarCloud/AppService/powerDevicePointList/data.go @@ -2,8 +2,8 @@ package powerDevicePointList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -15,7 +15,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -55,7 +55,7 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsId.String() entries.StructToDataMap(*e, "system", nil) diff --git a/iSolarCloud/AppService/powerDevicePointList/struct.go b/iSolarCloud/AppService/powerDevicePointList/struct.go index 9bd2f15bd..7f152509f 100644 --- a/iSolarCloud/AppService/powerDevicePointList/struct.go +++ b/iSolarCloud/AppService/powerDevicePointList/struct.go @@ -6,8 +6,8 @@ package powerDevicePointList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/powerTrendChartData/data.go b/iSolarCloud/AppService/powerTrendChartData/data.go index 1d16e19a9..76bf2e425 100644 --- a/iSolarCloud/AppService/powerTrendChartData/data.go +++ b/iSolarCloud/AppService/powerTrendChartData/data.go @@ -2,8 +2,8 @@ package powerTrendChartData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/powerTrendChartData/struct.go b/iSolarCloud/AppService/powerTrendChartData/struct.go index 3642df26c..1f3739181 100644 --- a/iSolarCloud/AppService/powerTrendChartData/struct.go +++ b/iSolarCloud/AppService/powerTrendChartData/struct.go @@ -6,8 +6,8 @@ package powerTrendChartData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/psForcastInfo/data.go b/iSolarCloud/AppService/psForcastInfo/data.go index 7a05a9738..40ede20b7 100644 --- a/iSolarCloud/AppService/psForcastInfo/data.go +++ b/iSolarCloud/AppService/psForcastInfo/data.go @@ -2,8 +2,8 @@ package psForcastInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -17,7 +17,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -77,8 +77,8 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) - entries.StructToDataMap(*e, e.Request.PsId.String(), apiReflect.NewEndPointPath(e.Request.PsId.String())) + // pkg := reflection.GetName("", *e) + entries.StructToDataMap(*e, e.Request.PsId.String(), GoStruct.NewEndPointPath(e.Request.PsId.String())) // for _, v := range e.Response.ResultData.AreaForcastList { // entries.StructToDataMap(v, api.JoinWithDots(0, valueTypes.DateTimeLayoutDay, pkg, v.DateTime), e.Request.PsId.String(), valueTypes.NewDateTime("")) diff --git a/iSolarCloud/AppService/psForcastInfo/struct.go b/iSolarCloud/AppService/psForcastInfo/struct.go index 6d1618075..8325f780c 100644 --- a/iSolarCloud/AppService/psForcastInfo/struct.go +++ b/iSolarCloud/AppService/psForcastInfo/struct.go @@ -6,8 +6,8 @@ package psForcastInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/psHourPointsValue/data.go b/iSolarCloud/AppService/psHourPointsValue/data.go index 534d0327f..faec3955f 100644 --- a/iSolarCloud/AppService/psHourPointsValue/data.go +++ b/iSolarCloud/AppService/psHourPointsValue/data.go @@ -2,8 +2,8 @@ package psHourPointsValue import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -50,10 +50,10 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsId.String() - entries.StructToDataMap(*e, e.Request.PsId.String(), apiReflect.NewEndPointPath(e.Request.PsId.String())) + entries.StructToDataMap(*e, e.Request.PsId.String(), GoStruct.NewEndPointPath(e.Request.PsId.String())) } return entries diff --git a/iSolarCloud/AppService/psHourPointsValue/struct.go b/iSolarCloud/AppService/psHourPointsValue/struct.go index 8847c9875..ae44efbf3 100644 --- a/iSolarCloud/AppService/psHourPointsValue/struct.go +++ b/iSolarCloud/AppService/psHourPointsValue/struct.go @@ -6,8 +6,8 @@ package psHourPointsValue import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryAllPsIdAndName/data.go b/iSolarCloud/AppService/queryAllPsIdAndName/data.go index 21249351c..463aedb9d 100644 --- a/iSolarCloud/AppService/queryAllPsIdAndName/data.go +++ b/iSolarCloud/AppService/queryAllPsIdAndName/data.go @@ -2,8 +2,8 @@ package queryAllPsIdAndName import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -15,7 +15,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -27,7 +27,7 @@ type ResultData struct { PageList []struct { PsId valueTypes.PsId `json:"ps_id"` PsName valueTypes.String `json:"ps_name"` - } `json:"pageList" PointNameFromChild:"PsId" PointNameAppend:"false" PointNameAppend:"false" DataTable:"true"` + } `json:"pageList" PointId:"page_list" PointNameFromChild:"PsId" PointNameAppend:"false" PointNameAppend:"false" DataTable:"true"` } func (e *ResultData) IsValid() error { @@ -45,7 +45,7 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsId.String() entries.StructToDataMap(*e, "system", nil) diff --git a/iSolarCloud/AppService/queryAllPsIdAndName/struct.go b/iSolarCloud/AppService/queryAllPsIdAndName/struct.go index 46dd142d8..908c579cd 100644 --- a/iSolarCloud/AppService/queryAllPsIdAndName/struct.go +++ b/iSolarCloud/AppService/queryAllPsIdAndName/struct.go @@ -6,8 +6,8 @@ package queryAllPsIdAndName import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryBatchCreatePsTaskList/data.go b/iSolarCloud/AppService/queryBatchCreatePsTaskList/data.go index 9c59ffd2c..0de6ab26d 100644 --- a/iSolarCloud/AppService/queryBatchCreatePsTaskList/data.go +++ b/iSolarCloud/AppService/queryBatchCreatePsTaskList/data.go @@ -2,7 +2,7 @@ package queryBatchCreatePsTaskList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" + "GoSungrow/iSolarCloud/api/GoStruct" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -14,7 +14,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryBatchCreatePsTaskList/struct.go b/iSolarCloud/AppService/queryBatchCreatePsTaskList/struct.go index c5c24d0f7..acb57af7a 100644 --- a/iSolarCloud/AppService/queryBatchCreatePsTaskList/struct.go +++ b/iSolarCloud/AppService/queryBatchCreatePsTaskList/struct.go @@ -6,8 +6,8 @@ package queryBatchCreatePsTaskList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryBatchSpeedyAddPowerStationResult/data.go b/iSolarCloud/AppService/queryBatchSpeedyAddPowerStationResult/data.go index 2261f5bb6..8bbc41010 100644 --- a/iSolarCloud/AppService/queryBatchSpeedyAddPowerStationResult/data.go +++ b/iSolarCloud/AppService/queryBatchSpeedyAddPowerStationResult/data.go @@ -2,8 +2,8 @@ package queryBatchSpeedyAddPowerStationResult import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryBatchSpeedyAddPowerStationResult/struct.go b/iSolarCloud/AppService/queryBatchSpeedyAddPowerStationResult/struct.go index 6d449aec8..a6d3c5d63 100644 --- a/iSolarCloud/AppService/queryBatchSpeedyAddPowerStationResult/struct.go +++ b/iSolarCloud/AppService/queryBatchSpeedyAddPowerStationResult/struct.go @@ -6,8 +6,8 @@ package queryBatchSpeedyAddPowerStationResult import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryCardStatusCTCC/data.go b/iSolarCloud/AppService/queryCardStatusCTCC/data.go index 297f4dc26..81fef474a 100644 --- a/iSolarCloud/AppService/queryCardStatusCTCC/data.go +++ b/iSolarCloud/AppService/queryCardStatusCTCC/data.go @@ -2,8 +2,8 @@ package queryCardStatusCTCC import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryCardStatusCTCC/struct.go b/iSolarCloud/AppService/queryCardStatusCTCC/struct.go index f126c712a..feb197f5b 100644 --- a/iSolarCloud/AppService/queryCardStatusCTCC/struct.go +++ b/iSolarCloud/AppService/queryCardStatusCTCC/struct.go @@ -6,8 +6,8 @@ package queryCardStatusCTCC import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryChildAccountList/data.go b/iSolarCloud/AppService/queryChildAccountList/data.go index 262a125a2..f38835aa3 100644 --- a/iSolarCloud/AppService/queryChildAccountList/data.go +++ b/iSolarCloud/AppService/queryChildAccountList/data.go @@ -2,8 +2,8 @@ package queryChildAccountList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryChildAccountList/struct.go b/iSolarCloud/AppService/queryChildAccountList/struct.go index a253dabde..95ad07842 100644 --- a/iSolarCloud/AppService/queryChildAccountList/struct.go +++ b/iSolarCloud/AppService/queryChildAccountList/struct.go @@ -6,8 +6,8 @@ package queryChildAccountList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryCompensationRecordData/data.go b/iSolarCloud/AppService/queryCompensationRecordData/data.go index 567ebe2ed..43689ebfb 100644 --- a/iSolarCloud/AppService/queryCompensationRecordData/data.go +++ b/iSolarCloud/AppService/queryCompensationRecordData/data.go @@ -2,8 +2,8 @@ package queryCompensationRecordData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryCompensationRecordData/struct.go b/iSolarCloud/AppService/queryCompensationRecordData/struct.go index 437f74aa7..9021e7d9b 100644 --- a/iSolarCloud/AppService/queryCompensationRecordData/struct.go +++ b/iSolarCloud/AppService/queryCompensationRecordData/struct.go @@ -6,8 +6,8 @@ package queryCompensationRecordData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryCompensationRecordList/data.go b/iSolarCloud/AppService/queryCompensationRecordList/data.go index f2e0bc436..82fce08f3 100644 --- a/iSolarCloud/AppService/queryCompensationRecordList/data.go +++ b/iSolarCloud/AppService/queryCompensationRecordList/data.go @@ -2,8 +2,8 @@ package queryCompensationRecordList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryCompensationRecordList/struct.go b/iSolarCloud/AppService/queryCompensationRecordList/struct.go index a4d414877..d4c49a1c1 100644 --- a/iSolarCloud/AppService/queryCompensationRecordList/struct.go +++ b/iSolarCloud/AppService/queryCompensationRecordList/struct.go @@ -6,8 +6,8 @@ package queryCompensationRecordList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryComponent/data.go b/iSolarCloud/AppService/queryComponent/data.go index 94542b786..f1df35cce 100644 --- a/iSolarCloud/AppService/queryComponent/data.go +++ b/iSolarCloud/AppService/queryComponent/data.go @@ -2,8 +2,8 @@ package queryComponent import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryComponent/struct.go b/iSolarCloud/AppService/queryComponent/struct.go index 3dfd7b920..6c2a7a329 100644 --- a/iSolarCloud/AppService/queryComponent/struct.go +++ b/iSolarCloud/AppService/queryComponent/struct.go @@ -6,8 +6,8 @@ package queryComponent import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryComponentTechnicalParam/data.go b/iSolarCloud/AppService/queryComponentTechnicalParam/data.go index f26f1b842..3b5a8b592 100644 --- a/iSolarCloud/AppService/queryComponentTechnicalParam/data.go +++ b/iSolarCloud/AppService/queryComponentTechnicalParam/data.go @@ -2,8 +2,8 @@ package queryComponentTechnicalParam import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryComponentTechnicalParam/struct.go b/iSolarCloud/AppService/queryComponentTechnicalParam/struct.go index f843ad79e..ccb887a56 100644 --- a/iSolarCloud/AppService/queryComponentTechnicalParam/struct.go +++ b/iSolarCloud/AppService/queryComponentTechnicalParam/struct.go @@ -6,8 +6,8 @@ package queryComponentTechnicalParam import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryCountryGridAndRelation/data.go b/iSolarCloud/AppService/queryCountryGridAndRelation/data.go index a5036f1e5..f19ee0b93 100644 --- a/iSolarCloud/AppService/queryCountryGridAndRelation/data.go +++ b/iSolarCloud/AppService/queryCountryGridAndRelation/data.go @@ -2,8 +2,8 @@ package queryCountryGridAndRelation import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryCountryGridAndRelation/struct.go b/iSolarCloud/AppService/queryCountryGridAndRelation/struct.go index caaee9875..ff9a918fc 100644 --- a/iSolarCloud/AppService/queryCountryGridAndRelation/struct.go +++ b/iSolarCloud/AppService/queryCountryGridAndRelation/struct.go @@ -6,8 +6,8 @@ package queryCountryGridAndRelation import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryCountryList/data.go b/iSolarCloud/AppService/queryCountryList/data.go index ec52d1a86..b45bcb954 100644 --- a/iSolarCloud/AppService/queryCountryList/data.go +++ b/iSolarCloud/AppService/queryCountryList/data.go @@ -2,8 +2,8 @@ package queryCountryList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryCountryList/struct.go b/iSolarCloud/AppService/queryCountryList/struct.go index d4e1b7f22..0c05fbb9b 100644 --- a/iSolarCloud/AppService/queryCountryList/struct.go +++ b/iSolarCloud/AppService/queryCountryList/struct.go @@ -6,8 +6,8 @@ package queryCountryList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryCtrlTaskById/data.go b/iSolarCloud/AppService/queryCtrlTaskById/data.go index 12330be80..d746acab8 100644 --- a/iSolarCloud/AppService/queryCtrlTaskById/data.go +++ b/iSolarCloud/AppService/queryCtrlTaskById/data.go @@ -2,8 +2,8 @@ package queryCtrlTaskById import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryCtrlTaskById/struct.go b/iSolarCloud/AppService/queryCtrlTaskById/struct.go index e5cf0d0f1..9ab313a76 100644 --- a/iSolarCloud/AppService/queryCtrlTaskById/struct.go +++ b/iSolarCloud/AppService/queryCtrlTaskById/struct.go @@ -6,8 +6,8 @@ package queryCtrlTaskById import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryDeviceInfo/data.go b/iSolarCloud/AppService/queryDeviceInfo/data.go index 47a7840dc..14142a82f 100644 --- a/iSolarCloud/AppService/queryDeviceInfo/data.go +++ b/iSolarCloud/AppService/queryDeviceInfo/data.go @@ -2,8 +2,8 @@ package queryDeviceInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -17,7 +17,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -134,10 +134,10 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Response.ResultData.PsId.String() + "." + e.Response.ResultData.PsKey.String() - entries.StructToDataMap(*e, e.Response.ResultData.PsId.String(), apiReflect.NewEndPointPath(e.Response.ResultData.PsId.String())) + entries.StructToDataMap(*e, e.Response.ResultData.PsId.String(), GoStruct.NewEndPointPath(e.Response.ResultData.PsId.String())) } return entries diff --git a/iSolarCloud/AppService/queryDeviceInfo/struct.go b/iSolarCloud/AppService/queryDeviceInfo/struct.go index 661fbdde7..fcaaeffe7 100644 --- a/iSolarCloud/AppService/queryDeviceInfo/struct.go +++ b/iSolarCloud/AppService/queryDeviceInfo/struct.go @@ -6,8 +6,8 @@ package queryDeviceInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryDeviceInfoForApp/data.go b/iSolarCloud/AppService/queryDeviceInfoForApp/data.go index d3ba9ad09..8f01231f5 100644 --- a/iSolarCloud/AppService/queryDeviceInfoForApp/data.go +++ b/iSolarCloud/AppService/queryDeviceInfoForApp/data.go @@ -2,8 +2,8 @@ package queryDeviceInfoForApp import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -17,7 +17,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -134,10 +134,10 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Response.ResultData.PsId.String() + "." + e.Response.ResultData.PsKey.String() - entries.StructToDataMap(*e, e.Response.ResultData.PsId.String(), apiReflect.NewEndPointPath(e.Response.ResultData.PsId.String())) + entries.StructToDataMap(*e, e.Response.ResultData.PsId.String(), GoStruct.NewEndPointPath(e.Response.ResultData.PsId.String())) } return entries diff --git a/iSolarCloud/AppService/queryDeviceInfoForApp/struct.go b/iSolarCloud/AppService/queryDeviceInfoForApp/struct.go index 041f08b76..da07047b0 100644 --- a/iSolarCloud/AppService/queryDeviceInfoForApp/struct.go +++ b/iSolarCloud/AppService/queryDeviceInfoForApp/struct.go @@ -6,8 +6,8 @@ package queryDeviceInfoForApp import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryDeviceList/data.go b/iSolarCloud/AppService/queryDeviceList/data.go index d077317d4..4e4d46431 100644 --- a/iSolarCloud/AppService/queryDeviceList/data.go +++ b/iSolarCloud/AppService/queryDeviceList/data.go @@ -2,8 +2,9 @@ package queryDeviceList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" @@ -17,7 +18,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -135,8 +136,8 @@ type ResultData struct { UnitName valueTypes.String `json:"unit_name" PointId:"unit_name" PointUpdateFreq:"UpdateFreqBoot"` UUID valueTypes.Integer `json:"uuid" PointId:"uuid" PointUpdateFreq:"UpdateFreqBoot"` // Referenced by DeviceArea UUIDIndexCode valueTypes.String `json:"uuid_index_code" PointId:"uuid_index_code" PointUpdateFreq:"UpdateFreqBoot"` // Referenced by DeviceArea - } `json:"pageList" PointNameFromChild:"PsKey" PointNameAppend:"false" PointArrayFlatten:"false"` - RowCount valueTypes.Integer `json:"rowCount" PointIgnore:"true"` + } `json:"pageList" PointId:"page_list" PointNameFromChild:"PsKey" PointNameAppend:"false" PointArrayFlatten:"false"` + RowCount valueTypes.Integer `json:"rowCount" PointId:"row_count" PointIgnore:"true"` } type PointStruct struct { @@ -235,10 +236,10 @@ func (e *EndPoint) GetData() api.DataMap { // // var TotalEnergyConsumption VirtualPointStruct - // // pkg := apiReflect.GetName("", *e) + // // pkg := reflection.GetName("", *e) // name := api.JoinWithDots(0, "", pkg, e.Request.PsId) // dt := valueTypes.NewDateTime(valueTypes.Now) - entries.StructToDataMap(*e, e.Request.PsId.String(), apiReflect.NewEndPointPath(e.Request.PsId.String())) + entries.StructToDataMap(*e, e.Request.PsId.String(), GoStruct.NewEndPointPath(e.Request.PsId.String())) if len(entries.Map) == 0 { break @@ -293,7 +294,7 @@ func (e *EndPoint) GetEnergyStorageSystem(entries api.DataMap) { // // var TotalEnergyConsumption VirtualPointStruct - pkg := apiReflect.GetName("", *e) + pkg := reflection.GetName("", *e) var devices []string /* @@ -457,7 +458,7 @@ func (e *EndPoint) GetEnergyStorageSystem(entries api.DataMap) { func (e *EndPoint) GetCommunicationModule(entries api.DataMap) { for range Only.Once { - pkg := apiReflect.GetName("", *e) + pkg := reflection.GetName("", *e) var devices []string for _, device := range e.Response.ResultData.PageList { @@ -483,7 +484,7 @@ func (e *EndPoint) GetCommunicationModule(entries api.DataMap) { func (e *EndPoint) GetBattery(entries api.DataMap) { for range Only.Once { - pkg := apiReflect.GetName("", *e) + pkg := reflection.GetName("", *e) var devices []string for _, device := range e.Response.ResultData.PageList { diff --git a/iSolarCloud/AppService/queryDeviceList/struct.go b/iSolarCloud/AppService/queryDeviceList/struct.go index 8c95cd172..b6fad25b9 100644 --- a/iSolarCloud/AppService/queryDeviceList/struct.go +++ b/iSolarCloud/AppService/queryDeviceList/struct.go @@ -6,8 +6,8 @@ package queryDeviceList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryDeviceListByUserId/data.go b/iSolarCloud/AppService/queryDeviceListByUserId/data.go index 142fe5e55..c7f4b62b3 100644 --- a/iSolarCloud/AppService/queryDeviceListByUserId/data.go +++ b/iSolarCloud/AppService/queryDeviceListByUserId/data.go @@ -2,8 +2,8 @@ package queryDeviceListByUserId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -15,7 +15,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -25,7 +25,7 @@ func (rd RequestData) Help() string { type ResultData struct { List []interface{} `json:"list"` - RowCount valueTypes.Integer `json:"rowCount"` + RowCount valueTypes.Integer `json:"rowCount" PointId:"row_count"` } func (e *ResultData) IsValid() error { diff --git a/iSolarCloud/AppService/queryDeviceListByUserId/struct.go b/iSolarCloud/AppService/queryDeviceListByUserId/struct.go index 87b5f2403..679cf90d9 100644 --- a/iSolarCloud/AppService/queryDeviceListByUserId/struct.go +++ b/iSolarCloud/AppService/queryDeviceListByUserId/struct.go @@ -6,8 +6,8 @@ package queryDeviceListByUserId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryDeviceListForApp/data.go b/iSolarCloud/AppService/queryDeviceListForApp/data.go index 7d3dc9008..21d5c073e 100644 --- a/iSolarCloud/AppService/queryDeviceListForApp/data.go +++ b/iSolarCloud/AppService/queryDeviceListForApp/data.go @@ -2,8 +2,8 @@ package queryDeviceListForApp import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -70,8 +70,8 @@ type ResultData struct { Sn valueTypes.String `json:"sn" PointName:"Serial Number"` TypeName valueTypes.String `json:"type_name"` UUID valueTypes.Integer `json:"uuid"` - } `json:"pageList" PointNameFromChild:"PsKey" PointNameAppend:"false" PointArrayFlatten:"false" DataTable:"true"` - RowCount valueTypes.Integer `json:"rowCount" PointIgnore:"true"` + } `json:"pageList" PointId:"page_list" PointNameFromChild:"PsKey" PointNameAppend:"false" PointArrayFlatten:"false" DataTable:"true"` + RowCount valueTypes.Integer `json:"rowCount" PointId:"row_count" PointIgnore:"true"` } func (e *ResultData) IsValid() error { @@ -89,7 +89,7 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsId.String() entries.StructToDataMap(*e, e.Request.PsId.String(), nil) diff --git a/iSolarCloud/AppService/queryDeviceListForApp/struct.go b/iSolarCloud/AppService/queryDeviceListForApp/struct.go index 6d63bbf97..499d49ff5 100644 --- a/iSolarCloud/AppService/queryDeviceListForApp/struct.go +++ b/iSolarCloud/AppService/queryDeviceListForApp/struct.go @@ -6,8 +6,8 @@ package queryDeviceListForApp import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryDeviceModelTechnical/data.go b/iSolarCloud/AppService/queryDeviceModelTechnical/data.go index 39a6fdfe3..981c8c029 100644 --- a/iSolarCloud/AppService/queryDeviceModelTechnical/data.go +++ b/iSolarCloud/AppService/queryDeviceModelTechnical/data.go @@ -2,8 +2,8 @@ package queryDeviceModelTechnical import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryDeviceModelTechnical/struct.go b/iSolarCloud/AppService/queryDeviceModelTechnical/struct.go index 2de858aec..054030c6f 100644 --- a/iSolarCloud/AppService/queryDeviceModelTechnical/struct.go +++ b/iSolarCloud/AppService/queryDeviceModelTechnical/struct.go @@ -6,8 +6,8 @@ package queryDeviceModelTechnical import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryDevicePointDayMonthYearDataList/data.go b/iSolarCloud/AppService/queryDevicePointDayMonthYearDataList/data.go index 358de077c..4b3e5e321 100644 --- a/iSolarCloud/AppService/queryDevicePointDayMonthYearDataList/data.go +++ b/iSolarCloud/AppService/queryDevicePointDayMonthYearDataList/data.go @@ -2,8 +2,8 @@ package queryDevicePointDayMonthYearDataList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -21,7 +21,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -45,10 +45,10 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsKey.String() - entries.StructToDataMap(*e, e.Request.PsKey.String(), apiReflect.NewEndPointPath(e.Request.PsKey.String())) + entries.StructToDataMap(*e, e.Request.PsKey.String(), GoStruct.NewEndPointPath(e.Request.PsKey.String())) } return entries diff --git a/iSolarCloud/AppService/queryDevicePointDayMonthYearDataList/struct.go b/iSolarCloud/AppService/queryDevicePointDayMonthYearDataList/struct.go index 0eadb4fda..5998158dd 100644 --- a/iSolarCloud/AppService/queryDevicePointDayMonthYearDataList/struct.go +++ b/iSolarCloud/AppService/queryDevicePointDayMonthYearDataList/struct.go @@ -6,8 +6,8 @@ package queryDevicePointDayMonthYearDataList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryDevicePointMinuteDataList/data.go b/iSolarCloud/AppService/queryDevicePointMinuteDataList/data.go index 29cbedd7a..e59b120fc 100644 --- a/iSolarCloud/AppService/queryDevicePointMinuteDataList/data.go +++ b/iSolarCloud/AppService/queryDevicePointMinuteDataList/data.go @@ -2,8 +2,8 @@ package queryDevicePointMinuteDataList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -22,7 +22,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -47,10 +47,10 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsKey.String() - entries.StructToDataMap(*e, e.Request.PsKey.String(), apiReflect.NewEndPointPath(e.Request.PsKey.String())) + entries.StructToDataMap(*e, e.Request.PsKey.String(), GoStruct.NewEndPointPath(e.Request.PsKey.String())) } return entries diff --git a/iSolarCloud/AppService/queryDevicePointMinuteDataList/struct.go b/iSolarCloud/AppService/queryDevicePointMinuteDataList/struct.go index a55246798..add9c4121 100644 --- a/iSolarCloud/AppService/queryDevicePointMinuteDataList/struct.go +++ b/iSolarCloud/AppService/queryDevicePointMinuteDataList/struct.go @@ -6,8 +6,8 @@ package queryDevicePointMinuteDataList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryDevicePointsDayMonthYearDataList/data.go b/iSolarCloud/AppService/queryDevicePointsDayMonthYearDataList/data.go index 19f12c774..0ce23625e 100644 --- a/iSolarCloud/AppService/queryDevicePointsDayMonthYearDataList/data.go +++ b/iSolarCloud/AppService/queryDevicePointsDayMonthYearDataList/data.go @@ -2,8 +2,8 @@ package queryDevicePointsDayMonthYearDataList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryDevicePointsDayMonthYearDataList/struct.go b/iSolarCloud/AppService/queryDevicePointsDayMonthYearDataList/struct.go index 614d69b20..23dc31c7e 100644 --- a/iSolarCloud/AppService/queryDevicePointsDayMonthYearDataList/struct.go +++ b/iSolarCloud/AppService/queryDevicePointsDayMonthYearDataList/struct.go @@ -6,8 +6,8 @@ package queryDevicePointsDayMonthYearDataList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryDeviceRealTimeDataByPsKeys/data.go b/iSolarCloud/AppService/queryDeviceRealTimeDataByPsKeys/data.go index a8feedcbc..1b4702694 100644 --- a/iSolarCloud/AppService/queryDeviceRealTimeDataByPsKeys/data.go +++ b/iSolarCloud/AppService/queryDeviceRealTimeDataByPsKeys/data.go @@ -2,8 +2,8 @@ package queryDeviceRealTimeDataByPsKeys import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryDeviceRealTimeDataByPsKeys/struct.go b/iSolarCloud/AppService/queryDeviceRealTimeDataByPsKeys/struct.go index bfcde1679..275cea417 100644 --- a/iSolarCloud/AppService/queryDeviceRealTimeDataByPsKeys/struct.go +++ b/iSolarCloud/AppService/queryDeviceRealTimeDataByPsKeys/struct.go @@ -6,8 +6,8 @@ package queryDeviceRealTimeDataByPsKeys import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryDeviceRepairList/data.go b/iSolarCloud/AppService/queryDeviceRepairList/data.go index 8def37a71..b072b534b 100644 --- a/iSolarCloud/AppService/queryDeviceRepairList/data.go +++ b/iSolarCloud/AppService/queryDeviceRepairList/data.go @@ -2,8 +2,8 @@ package queryDeviceRepairList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryDeviceRepairList/struct.go b/iSolarCloud/AppService/queryDeviceRepairList/struct.go index ef3f1a569..5575b6d4d 100644 --- a/iSolarCloud/AppService/queryDeviceRepairList/struct.go +++ b/iSolarCloud/AppService/queryDeviceRepairList/struct.go @@ -6,8 +6,8 @@ package queryDeviceRepairList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryDeviceTypeInfoList/data.go b/iSolarCloud/AppService/queryDeviceTypeInfoList/data.go index 2588f1a20..bfc109d74 100644 --- a/iSolarCloud/AppService/queryDeviceTypeInfoList/data.go +++ b/iSolarCloud/AppService/queryDeviceTypeInfoList/data.go @@ -2,8 +2,8 @@ package queryDeviceTypeInfoList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryDeviceTypeInfoList/struct.go b/iSolarCloud/AppService/queryDeviceTypeInfoList/struct.go index 4916a456e..2c9adf40d 100644 --- a/iSolarCloud/AppService/queryDeviceTypeInfoList/struct.go +++ b/iSolarCloud/AppService/queryDeviceTypeInfoList/struct.go @@ -6,8 +6,8 @@ package queryDeviceTypeInfoList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryEnvironmentList/data.go b/iSolarCloud/AppService/queryEnvironmentList/data.go index 4e4a5db52..481860013 100644 --- a/iSolarCloud/AppService/queryEnvironmentList/data.go +++ b/iSolarCloud/AppService/queryEnvironmentList/data.go @@ -2,8 +2,8 @@ package queryEnvironmentList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryEnvironmentList/struct.go b/iSolarCloud/AppService/queryEnvironmentList/struct.go index f2f58637a..94cf89dc3 100644 --- a/iSolarCloud/AppService/queryEnvironmentList/struct.go +++ b/iSolarCloud/AppService/queryEnvironmentList/struct.go @@ -6,8 +6,8 @@ package queryEnvironmentList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryFaultList/data.go b/iSolarCloud/AppService/queryFaultList/data.go index 198c7483a..84cb67936 100644 --- a/iSolarCloud/AppService/queryFaultList/data.go +++ b/iSolarCloud/AppService/queryFaultList/data.go @@ -2,8 +2,8 @@ package queryFaultList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryFaultList/struct.go b/iSolarCloud/AppService/queryFaultList/struct.go index f0c15bfd9..29038fb29 100644 --- a/iSolarCloud/AppService/queryFaultList/struct.go +++ b/iSolarCloud/AppService/queryFaultList/struct.go @@ -6,8 +6,8 @@ package queryFaultList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryFaultPlanDetail/data.go b/iSolarCloud/AppService/queryFaultPlanDetail/data.go index c26a5c63d..443709b75 100644 --- a/iSolarCloud/AppService/queryFaultPlanDetail/data.go +++ b/iSolarCloud/AppService/queryFaultPlanDetail/data.go @@ -2,8 +2,8 @@ package queryFaultPlanDetail import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryFaultPlanDetail/struct.go b/iSolarCloud/AppService/queryFaultPlanDetail/struct.go index e502e49a9..90b2a10d0 100644 --- a/iSolarCloud/AppService/queryFaultPlanDetail/struct.go +++ b/iSolarCloud/AppService/queryFaultPlanDetail/struct.go @@ -6,8 +6,8 @@ package queryFaultPlanDetail import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryFaultRepairSteps/data.go b/iSolarCloud/AppService/queryFaultRepairSteps/data.go index 165e036ab..9f7e0f892 100644 --- a/iSolarCloud/AppService/queryFaultRepairSteps/data.go +++ b/iSolarCloud/AppService/queryFaultRepairSteps/data.go @@ -2,8 +2,8 @@ package queryFaultRepairSteps import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryFaultRepairSteps/struct.go b/iSolarCloud/AppService/queryFaultRepairSteps/struct.go index abaa93566..38cbe4922 100644 --- a/iSolarCloud/AppService/queryFaultRepairSteps/struct.go +++ b/iSolarCloud/AppService/queryFaultRepairSteps/struct.go @@ -6,8 +6,8 @@ package queryFaultRepairSteps import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryFaultTypeAndLevelByCode/data.go b/iSolarCloud/AppService/queryFaultTypeAndLevelByCode/data.go index c92098771..4c684e29b 100644 --- a/iSolarCloud/AppService/queryFaultTypeAndLevelByCode/data.go +++ b/iSolarCloud/AppService/queryFaultTypeAndLevelByCode/data.go @@ -2,8 +2,8 @@ package queryFaultTypeAndLevelByCode import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryFaultTypeAndLevelByCode/struct.go b/iSolarCloud/AppService/queryFaultTypeAndLevelByCode/struct.go index 0f5fdcb02..95289577b 100644 --- a/iSolarCloud/AppService/queryFaultTypeAndLevelByCode/struct.go +++ b/iSolarCloud/AppService/queryFaultTypeAndLevelByCode/struct.go @@ -6,8 +6,8 @@ package queryFaultTypeAndLevelByCode import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryFaultTypeByDevice/data.go b/iSolarCloud/AppService/queryFaultTypeByDevice/data.go index 1139443c8..285059620 100644 --- a/iSolarCloud/AppService/queryFaultTypeByDevice/data.go +++ b/iSolarCloud/AppService/queryFaultTypeByDevice/data.go @@ -2,8 +2,8 @@ package queryFaultTypeByDevice import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryFaultTypeByDevice/struct.go b/iSolarCloud/AppService/queryFaultTypeByDevice/struct.go index 256cda3c0..57c6829a3 100644 --- a/iSolarCloud/AppService/queryFaultTypeByDevice/struct.go +++ b/iSolarCloud/AppService/queryFaultTypeByDevice/struct.go @@ -6,8 +6,8 @@ package queryFaultTypeByDevice import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryFaultTypeByDevicePage/data.go b/iSolarCloud/AppService/queryFaultTypeByDevicePage/data.go index 21aa9f6b7..2b44977c7 100644 --- a/iSolarCloud/AppService/queryFaultTypeByDevicePage/data.go +++ b/iSolarCloud/AppService/queryFaultTypeByDevicePage/data.go @@ -2,8 +2,8 @@ package queryFaultTypeByDevicePage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryFaultTypeByDevicePage/struct.go b/iSolarCloud/AppService/queryFaultTypeByDevicePage/struct.go index 650272447..76278ce3f 100644 --- a/iSolarCloud/AppService/queryFaultTypeByDevicePage/struct.go +++ b/iSolarCloud/AppService/queryFaultTypeByDevicePage/struct.go @@ -6,8 +6,8 @@ package queryFaultTypeByDevicePage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryFirmwareFilesPage/data.go b/iSolarCloud/AppService/queryFirmwareFilesPage/data.go index ad3623650..bf045d3f0 100644 --- a/iSolarCloud/AppService/queryFirmwareFilesPage/data.go +++ b/iSolarCloud/AppService/queryFirmwareFilesPage/data.go @@ -2,8 +2,8 @@ package queryFirmwareFilesPage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryFirmwareFilesPage/struct.go b/iSolarCloud/AppService/queryFirmwareFilesPage/struct.go index 6388eb030..5b7ad66cf 100644 --- a/iSolarCloud/AppService/queryFirmwareFilesPage/struct.go +++ b/iSolarCloud/AppService/queryFirmwareFilesPage/struct.go @@ -6,8 +6,8 @@ package queryFirmwareFilesPage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryInfotoAlert/data.go b/iSolarCloud/AppService/queryInfotoAlert/data.go index 3bab67a51..4068ec5aa 100644 --- a/iSolarCloud/AppService/queryInfotoAlert/data.go +++ b/iSolarCloud/AppService/queryInfotoAlert/data.go @@ -2,8 +2,8 @@ package queryInfotoAlert import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryInfotoAlert/struct.go b/iSolarCloud/AppService/queryInfotoAlert/struct.go index d3d5b4772..7cc75a13f 100644 --- a/iSolarCloud/AppService/queryInfotoAlert/struct.go +++ b/iSolarCloud/AppService/queryInfotoAlert/struct.go @@ -6,8 +6,8 @@ package queryInfotoAlert import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryInverterModelList/data.go b/iSolarCloud/AppService/queryInverterModelList/data.go index 621ad67cd..dc983b3b6 100644 --- a/iSolarCloud/AppService/queryInverterModelList/data.go +++ b/iSolarCloud/AppService/queryInverterModelList/data.go @@ -2,8 +2,8 @@ package queryInverterModelList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryInverterModelList/struct.go b/iSolarCloud/AppService/queryInverterModelList/struct.go index 9e43a3688..2af163624 100644 --- a/iSolarCloud/AppService/queryInverterModelList/struct.go +++ b/iSolarCloud/AppService/queryInverterModelList/struct.go @@ -6,8 +6,8 @@ package queryInverterModelList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryInverterVersionList/data.go b/iSolarCloud/AppService/queryInverterVersionList/data.go index 12af4cc46..d1868b36e 100644 --- a/iSolarCloud/AppService/queryInverterVersionList/data.go +++ b/iSolarCloud/AppService/queryInverterVersionList/data.go @@ -2,8 +2,8 @@ package queryInverterVersionList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryInverterVersionList/struct.go b/iSolarCloud/AppService/queryInverterVersionList/struct.go index e4a099498..3852d8960 100644 --- a/iSolarCloud/AppService/queryInverterVersionList/struct.go +++ b/iSolarCloud/AppService/queryInverterVersionList/struct.go @@ -6,8 +6,8 @@ package queryInverterVersionList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryM2MCardInfoCMCC/data.go b/iSolarCloud/AppService/queryM2MCardInfoCMCC/data.go index aa6def1d0..35e8b7081 100644 --- a/iSolarCloud/AppService/queryM2MCardInfoCMCC/data.go +++ b/iSolarCloud/AppService/queryM2MCardInfoCMCC/data.go @@ -2,8 +2,8 @@ package queryM2MCardInfoCMCC import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryM2MCardInfoCMCC/struct.go b/iSolarCloud/AppService/queryM2MCardInfoCMCC/struct.go index 3cefd381b..53e6f2b20 100644 --- a/iSolarCloud/AppService/queryM2MCardInfoCMCC/struct.go +++ b/iSolarCloud/AppService/queryM2MCardInfoCMCC/struct.go @@ -6,8 +6,8 @@ package queryM2MCardInfoCMCC import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryM2MCardTermInfoCMCC/data.go b/iSolarCloud/AppService/queryM2MCardTermInfoCMCC/data.go index faa26fee8..f04873dc2 100644 --- a/iSolarCloud/AppService/queryM2MCardTermInfoCMCC/data.go +++ b/iSolarCloud/AppService/queryM2MCardTermInfoCMCC/data.go @@ -2,8 +2,8 @@ package queryM2MCardTermInfoCMCC import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryM2MCardTermInfoCMCC/struct.go b/iSolarCloud/AppService/queryM2MCardTermInfoCMCC/struct.go index be9d6c0c6..c408d1dfa 100644 --- a/iSolarCloud/AppService/queryM2MCardTermInfoCMCC/struct.go +++ b/iSolarCloud/AppService/queryM2MCardTermInfoCMCC/struct.go @@ -6,8 +6,8 @@ package queryM2MCardTermInfoCMCC import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryModelInfoByModelId/data.go b/iSolarCloud/AppService/queryModelInfoByModelId/data.go index c1a3833a1..6c6315af3 100644 --- a/iSolarCloud/AppService/queryModelInfoByModelId/data.go +++ b/iSolarCloud/AppService/queryModelInfoByModelId/data.go @@ -2,8 +2,8 @@ package queryModelInfoByModelId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryModelInfoByModelId/struct.go b/iSolarCloud/AppService/queryModelInfoByModelId/struct.go index 11645abc2..247a88ff1 100644 --- a/iSolarCloud/AppService/queryModelInfoByModelId/struct.go +++ b/iSolarCloud/AppService/queryModelInfoByModelId/struct.go @@ -6,8 +6,8 @@ package queryModelInfoByModelId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryMutiPointDataList/data.go b/iSolarCloud/AppService/queryMutiPointDataList/data.go index 7f8a57303..9d80ce3ea 100644 --- a/iSolarCloud/AppService/queryMutiPointDataList/data.go +++ b/iSolarCloud/AppService/queryMutiPointDataList/data.go @@ -2,9 +2,9 @@ package queryMutiPointDataList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -25,7 +25,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -170,18 +170,24 @@ func (e *EndPoint) GetPointDataTable(points api.TemplatePoints) output.Table { var table output.Table for range Only.Once { - table = output.NewTable() - table.SetTitle("") - table.SetJson([]byte(e.GetJsonData(false))) - table.SetRaw([]byte(e.GetJsonData(true))) - - e.Error = table.SetHeader( + table = output.NewTable( "Date/Time", "Point Id", "Point Name", "Value", "Units", ) + table.SetTitle("") + table.SetJson([]byte(e.GetJsonData(false))) + table.SetRaw([]byte(e.GetJsonData(true))) + + // e.Error = table.SetHeader( + // "Date/Time", + // "Point Id", + // "Point Name", + // "Value", + // "Units", + // ) if e.Error != nil { break } @@ -194,8 +200,7 @@ func (e *EndPoint) GetPointDataTable(points api.TemplatePoints) output.Table { for pointId, pointRef := range deviceRef.Points { for _, tim := range pointRef.Times { gp := points.GetPoint(deviceName, pointId) - _ = table.AddRow( - tim.Key.PrintFull(), + _ = table.AddRow(tim.Key.PrintFull(), fmt.Sprintf("%s.%s", deviceName, pointId), gp.Name, tim.Value, @@ -210,11 +215,11 @@ func (e *EndPoint) GetPointDataTable(points api.TemplatePoints) output.Table { table.InitGraph(output.GraphRequest { Title: "", - TimeColumn: output.SetInteger(1), - SearchColumn: output.SetInteger(2), - NameColumn: output.SetInteger(3), - ValueColumn: output.SetInteger(4), - UnitsColumn: output.SetInteger(5), + TimeColumn: output.SetString("Date/Time"), + SearchColumn: output.SetString("Point Id"), + NameColumn: output.SetString("Point Name"), + ValueColumn: output.SetString("Value"), + UnitsColumn: output.SetString("Units"), SearchString: output.SetString(""), MinLeftAxis: output.SetFloat(0), MaxLeftAxis: output.SetFloat(0), @@ -229,10 +234,10 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsId.String() - entries.StructToDataMap(*e, e.Request.PsId.String(), apiReflect.NewEndPointPath(e.Request.PsId.String())) + entries.StructToDataMap(*e, e.Request.PsId.String(), GoStruct.NewEndPointPath(e.Request.PsId.String())) // entries.StructToDataMap(*e, "system", nil) } diff --git a/iSolarCloud/AppService/queryMutiPointDataList/struct.go b/iSolarCloud/AppService/queryMutiPointDataList/struct.go index 6852decfa..b7570790f 100644 --- a/iSolarCloud/AppService/queryMutiPointDataList/struct.go +++ b/iSolarCloud/AppService/queryMutiPointDataList/struct.go @@ -6,8 +6,8 @@ package queryMutiPointDataList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryNoticeList/data.go b/iSolarCloud/AppService/queryNoticeList/data.go index 895dca9ee..0507beed3 100644 --- a/iSolarCloud/AppService/queryNoticeList/data.go +++ b/iSolarCloud/AppService/queryNoticeList/data.go @@ -2,8 +2,8 @@ package queryNoticeList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryNoticeList/struct.go b/iSolarCloud/AppService/queryNoticeList/struct.go index 77febf472..d9b0965ea 100644 --- a/iSolarCloud/AppService/queryNoticeList/struct.go +++ b/iSolarCloud/AppService/queryNoticeList/struct.go @@ -6,8 +6,8 @@ package queryNoticeList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryNumberOfRenewalReminders/data.go b/iSolarCloud/AppService/queryNumberOfRenewalReminders/data.go index 1b295b11e..e997b247d 100644 --- a/iSolarCloud/AppService/queryNumberOfRenewalReminders/data.go +++ b/iSolarCloud/AppService/queryNumberOfRenewalReminders/data.go @@ -2,8 +2,8 @@ package queryNumberOfRenewalReminders import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryNumberOfRenewalReminders/struct.go b/iSolarCloud/AppService/queryNumberOfRenewalReminders/struct.go index 4d3660fae..eb0a3c996 100644 --- a/iSolarCloud/AppService/queryNumberOfRenewalReminders/struct.go +++ b/iSolarCloud/AppService/queryNumberOfRenewalReminders/struct.go @@ -6,8 +6,8 @@ package queryNumberOfRenewalReminders import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryOperRules/data.go b/iSolarCloud/AppService/queryOperRules/data.go index 496ad91a7..f8a8143f1 100644 --- a/iSolarCloud/AppService/queryOperRules/data.go +++ b/iSolarCloud/AppService/queryOperRules/data.go @@ -2,8 +2,8 @@ package queryOperRules import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryOperRules/struct.go b/iSolarCloud/AppService/queryOperRules/struct.go index 70123b81f..4774a5915 100644 --- a/iSolarCloud/AppService/queryOperRules/struct.go +++ b/iSolarCloud/AppService/queryOperRules/struct.go @@ -6,8 +6,8 @@ package queryOperRules import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryOrderList/data.go b/iSolarCloud/AppService/queryOrderList/data.go index 03d1e7ce0..6299e46e2 100644 --- a/iSolarCloud/AppService/queryOrderList/data.go +++ b/iSolarCloud/AppService/queryOrderList/data.go @@ -2,8 +2,8 @@ package queryOrderList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryOrderList/struct.go b/iSolarCloud/AppService/queryOrderList/struct.go index 414a6e84a..98f9aa1a4 100644 --- a/iSolarCloud/AppService/queryOrderList/struct.go +++ b/iSolarCloud/AppService/queryOrderList/struct.go @@ -6,8 +6,8 @@ package queryOrderList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryOrderStep/data.go b/iSolarCloud/AppService/queryOrderStep/data.go index 3b0a31d4d..5df5ddd71 100644 --- a/iSolarCloud/AppService/queryOrderStep/data.go +++ b/iSolarCloud/AppService/queryOrderStep/data.go @@ -2,8 +2,8 @@ package queryOrderStep import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryOrderStep/struct.go b/iSolarCloud/AppService/queryOrderStep/struct.go index 1658b9779..d4fa2f071 100644 --- a/iSolarCloud/AppService/queryOrderStep/struct.go +++ b/iSolarCloud/AppService/queryOrderStep/struct.go @@ -6,8 +6,8 @@ package queryOrderStep import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryOrgGenerationReport/data.go b/iSolarCloud/AppService/queryOrgGenerationReport/data.go index f0d7d66c6..b3f346f91 100644 --- a/iSolarCloud/AppService/queryOrgGenerationReport/data.go +++ b/iSolarCloud/AppService/queryOrgGenerationReport/data.go @@ -2,8 +2,8 @@ package queryOrgGenerationReport import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryOrgGenerationReport/struct.go b/iSolarCloud/AppService/queryOrgGenerationReport/struct.go index 2ad6f64fd..a55442f59 100644 --- a/iSolarCloud/AppService/queryOrgGenerationReport/struct.go +++ b/iSolarCloud/AppService/queryOrgGenerationReport/struct.go @@ -6,8 +6,8 @@ package queryOrgGenerationReport import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryOrgInfoList/data.go b/iSolarCloud/AppService/queryOrgInfoList/data.go index ec6e25131..e6d31c033 100644 --- a/iSolarCloud/AppService/queryOrgInfoList/data.go +++ b/iSolarCloud/AppService/queryOrgInfoList/data.go @@ -2,8 +2,8 @@ package queryOrgInfoList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryOrgInfoList/struct.go b/iSolarCloud/AppService/queryOrgInfoList/struct.go index ec16bcff5..870e2bcff 100644 --- a/iSolarCloud/AppService/queryOrgInfoList/struct.go +++ b/iSolarCloud/AppService/queryOrgInfoList/struct.go @@ -6,8 +6,8 @@ package queryOrgInfoList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryOrgPowerElecPercent/data.go b/iSolarCloud/AppService/queryOrgPowerElecPercent/data.go index c4533d6a1..2b02a09fc 100644 --- a/iSolarCloud/AppService/queryOrgPowerElecPercent/data.go +++ b/iSolarCloud/AppService/queryOrgPowerElecPercent/data.go @@ -2,8 +2,8 @@ package queryOrgPowerElecPercent import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryOrgPowerElecPercent/struct.go b/iSolarCloud/AppService/queryOrgPowerElecPercent/struct.go index 9f0fc96c9..efd0da781 100644 --- a/iSolarCloud/AppService/queryOrgPowerElecPercent/struct.go +++ b/iSolarCloud/AppService/queryOrgPowerElecPercent/struct.go @@ -6,8 +6,8 @@ package queryOrgPowerElecPercent import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryOrgPsCompensationRecordList/data.go b/iSolarCloud/AppService/queryOrgPsCompensationRecordList/data.go index b5fba9c0a..47f06ce54 100644 --- a/iSolarCloud/AppService/queryOrgPsCompensationRecordList/data.go +++ b/iSolarCloud/AppService/queryOrgPsCompensationRecordList/data.go @@ -2,8 +2,8 @@ package queryOrgPsCompensationRecordList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryOrgPsCompensationRecordList/struct.go b/iSolarCloud/AppService/queryOrgPsCompensationRecordList/struct.go index e52d6fafc..1a5ae019b 100644 --- a/iSolarCloud/AppService/queryOrgPsCompensationRecordList/struct.go +++ b/iSolarCloud/AppService/queryOrgPsCompensationRecordList/struct.go @@ -6,8 +6,8 @@ package queryOrgPsCompensationRecordList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryParamSettingTask/data.go b/iSolarCloud/AppService/queryParamSettingTask/data.go index ef0844a1a..6bc41fc10 100644 --- a/iSolarCloud/AppService/queryParamSettingTask/data.go +++ b/iSolarCloud/AppService/queryParamSettingTask/data.go @@ -2,8 +2,8 @@ package queryParamSettingTask import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -17,7 +17,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryParamSettingTask/struct.go b/iSolarCloud/AppService/queryParamSettingTask/struct.go index 253f0fb6f..16cc1ff61 100644 --- a/iSolarCloud/AppService/queryParamSettingTask/struct.go +++ b/iSolarCloud/AppService/queryParamSettingTask/struct.go @@ -6,8 +6,8 @@ package queryParamSettingTask import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryPersonalUnitList/data.go b/iSolarCloud/AppService/queryPersonalUnitList/data.go index ad9fb37f8..d92276eb2 100644 --- a/iSolarCloud/AppService/queryPersonalUnitList/data.go +++ b/iSolarCloud/AppService/queryPersonalUnitList/data.go @@ -2,8 +2,8 @@ package queryPersonalUnitList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryPersonalUnitList/struct.go b/iSolarCloud/AppService/queryPersonalUnitList/struct.go index 58605e97f..e82116a51 100644 --- a/iSolarCloud/AppService/queryPersonalUnitList/struct.go +++ b/iSolarCloud/AppService/queryPersonalUnitList/struct.go @@ -6,8 +6,8 @@ package queryPersonalUnitList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryPointDataTopOne/data.go b/iSolarCloud/AppService/queryPointDataTopOne/data.go index b97608ca6..0750297bf 100644 --- a/iSolarCloud/AppService/queryPointDataTopOne/data.go +++ b/iSolarCloud/AppService/queryPointDataTopOne/data.go @@ -2,8 +2,8 @@ package queryPointDataTopOne import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryPointDataTopOne/struct.go b/iSolarCloud/AppService/queryPointDataTopOne/struct.go index be9676e31..2bdb4d745 100644 --- a/iSolarCloud/AppService/queryPointDataTopOne/struct.go +++ b/iSolarCloud/AppService/queryPointDataTopOne/struct.go @@ -6,8 +6,8 @@ package queryPointDataTopOne import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryPowerStationInfo/data.go b/iSolarCloud/AppService/queryPowerStationInfo/data.go index 33f047011..e8512e723 100644 --- a/iSolarCloud/AppService/queryPowerStationInfo/data.go +++ b/iSolarCloud/AppService/queryPowerStationInfo/data.go @@ -3,8 +3,8 @@ package queryPowerStationInfo import ( "GoSungrow/iSolarCloud/Common" "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -18,7 +18,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -149,10 +149,10 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsId.String() + "." + e.Response.ResultData.PsKey.String() - entries.StructToDataMap(*e, e.Request.PsId.String(), apiReflect.NewEndPointPath(e.Request.PsId.String())) + entries.StructToDataMap(*e, e.Request.PsId.String(), GoStruct.NewEndPointPath(e.Request.PsId.String())) } return entries diff --git a/iSolarCloud/AppService/queryPowerStationInfo/struct.go b/iSolarCloud/AppService/queryPowerStationInfo/struct.go index cee79f00d..9128a2d0b 100644 --- a/iSolarCloud/AppService/queryPowerStationInfo/struct.go +++ b/iSolarCloud/AppService/queryPowerStationInfo/struct.go @@ -6,8 +6,8 @@ package queryPowerStationInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryPsAreaByUserIdAndAreaCode/data.go b/iSolarCloud/AppService/queryPsAreaByUserIdAndAreaCode/data.go index 51a1674c6..7235c6c29 100644 --- a/iSolarCloud/AppService/queryPsAreaByUserIdAndAreaCode/data.go +++ b/iSolarCloud/AppService/queryPsAreaByUserIdAndAreaCode/data.go @@ -2,8 +2,8 @@ package queryPsAreaByUserIdAndAreaCode import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryPsAreaByUserIdAndAreaCode/struct.go b/iSolarCloud/AppService/queryPsAreaByUserIdAndAreaCode/struct.go index d751c2405..340a27eef 100644 --- a/iSolarCloud/AppService/queryPsAreaByUserIdAndAreaCode/struct.go +++ b/iSolarCloud/AppService/queryPsAreaByUserIdAndAreaCode/struct.go @@ -6,8 +6,8 @@ package queryPsAreaByUserIdAndAreaCode import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryPsCompensationRecordList/data.go b/iSolarCloud/AppService/queryPsCompensationRecordList/data.go index 9a9f6de88..af9763eef 100644 --- a/iSolarCloud/AppService/queryPsCompensationRecordList/data.go +++ b/iSolarCloud/AppService/queryPsCompensationRecordList/data.go @@ -2,8 +2,8 @@ package queryPsCompensationRecordList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryPsCompensationRecordList/struct.go b/iSolarCloud/AppService/queryPsCompensationRecordList/struct.go index 0b6638010..dafc1611b 100644 --- a/iSolarCloud/AppService/queryPsCompensationRecordList/struct.go +++ b/iSolarCloud/AppService/queryPsCompensationRecordList/struct.go @@ -6,8 +6,8 @@ package queryPsCompensationRecordList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryPsDataByDate/data.go b/iSolarCloud/AppService/queryPsDataByDate/data.go index be3cccb26..3f9ab5dbb 100644 --- a/iSolarCloud/AppService/queryPsDataByDate/data.go +++ b/iSolarCloud/AppService/queryPsDataByDate/data.go @@ -2,8 +2,8 @@ package queryPsDataByDate import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryPsDataByDate/struct.go b/iSolarCloud/AppService/queryPsDataByDate/struct.go index e236caf32..9ee16bef9 100644 --- a/iSolarCloud/AppService/queryPsDataByDate/struct.go +++ b/iSolarCloud/AppService/queryPsDataByDate/struct.go @@ -6,8 +6,8 @@ package queryPsDataByDate import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryPsIdList/data.go b/iSolarCloud/AppService/queryPsIdList/data.go index 656767f17..7082f59ce 100644 --- a/iSolarCloud/AppService/queryPsIdList/data.go +++ b/iSolarCloud/AppService/queryPsIdList/data.go @@ -2,8 +2,8 @@ package queryPsIdList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -42,7 +42,7 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsId.String() entries.StructToDataMap(*e, "system", nil) diff --git a/iSolarCloud/AppService/queryPsIdList/struct.go b/iSolarCloud/AppService/queryPsIdList/struct.go index bd6cc4ebd..6c21d1231 100644 --- a/iSolarCloud/AppService/queryPsIdList/struct.go +++ b/iSolarCloud/AppService/queryPsIdList/struct.go @@ -6,8 +6,8 @@ package queryPsIdList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryPsListByUserIdAndAreaCode/data.go b/iSolarCloud/AppService/queryPsListByUserIdAndAreaCode/data.go index dfef43c73..765012bb5 100644 --- a/iSolarCloud/AppService/queryPsListByUserIdAndAreaCode/data.go +++ b/iSolarCloud/AppService/queryPsListByUserIdAndAreaCode/data.go @@ -2,8 +2,8 @@ package queryPsListByUserIdAndAreaCode import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryPsListByUserIdAndAreaCode/struct.go b/iSolarCloud/AppService/queryPsListByUserIdAndAreaCode/struct.go index 8bae8c910..87ab07efa 100644 --- a/iSolarCloud/AppService/queryPsListByUserIdAndAreaCode/struct.go +++ b/iSolarCloud/AppService/queryPsListByUserIdAndAreaCode/struct.go @@ -6,8 +6,8 @@ package queryPsListByUserIdAndAreaCode import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryPsNameByPsId/data.go b/iSolarCloud/AppService/queryPsNameByPsId/data.go index 34eae5488..2f98ec21b 100644 --- a/iSolarCloud/AppService/queryPsNameByPsId/data.go +++ b/iSolarCloud/AppService/queryPsNameByPsId/data.go @@ -2,8 +2,8 @@ package queryPsNameByPsId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -38,7 +38,7 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsId.String() entries.StructToDataMap(*e, "system", nil) diff --git a/iSolarCloud/AppService/queryPsNameByPsId/struct.go b/iSolarCloud/AppService/queryPsNameByPsId/struct.go index 5288aa6b7..656719dc7 100644 --- a/iSolarCloud/AppService/queryPsNameByPsId/struct.go +++ b/iSolarCloud/AppService/queryPsNameByPsId/struct.go @@ -6,8 +6,8 @@ package queryPsNameByPsId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryPsPrByDate/data.go b/iSolarCloud/AppService/queryPsPrByDate/data.go index 7b04ada8b..f8ee515cc 100644 --- a/iSolarCloud/AppService/queryPsPrByDate/data.go +++ b/iSolarCloud/AppService/queryPsPrByDate/data.go @@ -2,8 +2,8 @@ package queryPsPrByDate import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryPsPrByDate/struct.go b/iSolarCloud/AppService/queryPsPrByDate/struct.go index ed5ae7363..fc6a93ceb 100644 --- a/iSolarCloud/AppService/queryPsPrByDate/struct.go +++ b/iSolarCloud/AppService/queryPsPrByDate/struct.go @@ -6,8 +6,8 @@ package queryPsPrByDate import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryPsProfit/data.go b/iSolarCloud/AppService/queryPsProfit/data.go index f6da33355..d00ef9c70 100644 --- a/iSolarCloud/AppService/queryPsProfit/data.go +++ b/iSolarCloud/AppService/queryPsProfit/data.go @@ -2,8 +2,8 @@ package queryPsProfit import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -18,7 +18,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -80,10 +80,10 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsId.String() - entries.StructToDataMap(*e, e.Request.PsId.String(), apiReflect.NewEndPointPath(e.Request.PsId.String())) + entries.StructToDataMap(*e, e.Request.PsId.String(), GoStruct.NewEndPointPath(e.Request.PsId.String())) } return entries diff --git a/iSolarCloud/AppService/queryPsProfit/struct.go b/iSolarCloud/AppService/queryPsProfit/struct.go index a3ae32e48..e2f7c95c4 100644 --- a/iSolarCloud/AppService/queryPsProfit/struct.go +++ b/iSolarCloud/AppService/queryPsProfit/struct.go @@ -6,8 +6,8 @@ package queryPsProfit import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryPsReportComparativeAnalysisOfPowerGeneration/data.go b/iSolarCloud/AppService/queryPsReportComparativeAnalysisOfPowerGeneration/data.go index a887031c4..3d4bcc88f 100644 --- a/iSolarCloud/AppService/queryPsReportComparativeAnalysisOfPowerGeneration/data.go +++ b/iSolarCloud/AppService/queryPsReportComparativeAnalysisOfPowerGeneration/data.go @@ -2,8 +2,8 @@ package queryPsReportComparativeAnalysisOfPowerGeneration import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryPsReportComparativeAnalysisOfPowerGeneration/struct.go b/iSolarCloud/AppService/queryPsReportComparativeAnalysisOfPowerGeneration/struct.go index d3190cb6a..a2d5c6ddc 100644 --- a/iSolarCloud/AppService/queryPsReportComparativeAnalysisOfPowerGeneration/struct.go +++ b/iSolarCloud/AppService/queryPsReportComparativeAnalysisOfPowerGeneration/struct.go @@ -6,8 +6,8 @@ package queryPsReportComparativeAnalysisOfPowerGeneration import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryPsStructureList/data.go b/iSolarCloud/AppService/queryPsStructureList/data.go index da783c4fa..d3189a3d9 100644 --- a/iSolarCloud/AppService/queryPsStructureList/data.go +++ b/iSolarCloud/AppService/queryPsStructureList/data.go @@ -2,8 +2,8 @@ package queryPsStructureList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryPsStructureList/struct.go b/iSolarCloud/AppService/queryPsStructureList/struct.go index 06f11459c..4d1b7ce0e 100644 --- a/iSolarCloud/AppService/queryPsStructureList/struct.go +++ b/iSolarCloud/AppService/queryPsStructureList/struct.go @@ -6,8 +6,8 @@ package queryPsStructureList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryPuuidsByCommandTotalId/data.go b/iSolarCloud/AppService/queryPuuidsByCommandTotalId/data.go index 24adb910d..f9d84c282 100644 --- a/iSolarCloud/AppService/queryPuuidsByCommandTotalId/data.go +++ b/iSolarCloud/AppService/queryPuuidsByCommandTotalId/data.go @@ -2,8 +2,8 @@ package queryPuuidsByCommandTotalId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryPuuidsByCommandTotalId/struct.go b/iSolarCloud/AppService/queryPuuidsByCommandTotalId/struct.go index 90d0c4ba9..79d129f6d 100644 --- a/iSolarCloud/AppService/queryPuuidsByCommandTotalId/struct.go +++ b/iSolarCloud/AppService/queryPuuidsByCommandTotalId/struct.go @@ -6,8 +6,8 @@ package queryPuuidsByCommandTotalId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryPuuidsByCommandTotalId2/data.go b/iSolarCloud/AppService/queryPuuidsByCommandTotalId2/data.go index 252d584e2..41278409b 100644 --- a/iSolarCloud/AppService/queryPuuidsByCommandTotalId2/data.go +++ b/iSolarCloud/AppService/queryPuuidsByCommandTotalId2/data.go @@ -2,8 +2,8 @@ package queryPuuidsByCommandTotalId2 import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryPuuidsByCommandTotalId2/struct.go b/iSolarCloud/AppService/queryPuuidsByCommandTotalId2/struct.go index 2f855260f..2f390bff8 100644 --- a/iSolarCloud/AppService/queryPuuidsByCommandTotalId2/struct.go +++ b/iSolarCloud/AppService/queryPuuidsByCommandTotalId2/struct.go @@ -6,8 +6,8 @@ package queryPuuidsByCommandTotalId2 import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryRepairRuleList/data.go b/iSolarCloud/AppService/queryRepairRuleList/data.go index 0e377d94f..c3f9e7620 100644 --- a/iSolarCloud/AppService/queryRepairRuleList/data.go +++ b/iSolarCloud/AppService/queryRepairRuleList/data.go @@ -2,8 +2,8 @@ package queryRepairRuleList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryRepairRuleList/struct.go b/iSolarCloud/AppService/queryRepairRuleList/struct.go index 0f3d926d3..d8dc9ff1e 100644 --- a/iSolarCloud/AppService/queryRepairRuleList/struct.go +++ b/iSolarCloud/AppService/queryRepairRuleList/struct.go @@ -6,8 +6,8 @@ package queryRepairRuleList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryReportListForManagementPage/data.go b/iSolarCloud/AppService/queryReportListForManagementPage/data.go index 7a75ed1a6..5ee192677 100644 --- a/iSolarCloud/AppService/queryReportListForManagementPage/data.go +++ b/iSolarCloud/AppService/queryReportListForManagementPage/data.go @@ -2,8 +2,8 @@ package queryReportListForManagementPage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryReportListForManagementPage/struct.go b/iSolarCloud/AppService/queryReportListForManagementPage/struct.go index be3d449be..4f41c8032 100644 --- a/iSolarCloud/AppService/queryReportListForManagementPage/struct.go +++ b/iSolarCloud/AppService/queryReportListForManagementPage/struct.go @@ -6,8 +6,8 @@ package queryReportListForManagementPage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryReportMsg/data.go b/iSolarCloud/AppService/queryReportMsg/data.go index 988768bf5..695d287ff 100644 --- a/iSolarCloud/AppService/queryReportMsg/data.go +++ b/iSolarCloud/AppService/queryReportMsg/data.go @@ -2,8 +2,8 @@ package queryReportMsg import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryReportMsg/struct.go b/iSolarCloud/AppService/queryReportMsg/struct.go index ecefa6a8c..dceba41a8 100644 --- a/iSolarCloud/AppService/queryReportMsg/struct.go +++ b/iSolarCloud/AppService/queryReportMsg/struct.go @@ -6,8 +6,8 @@ package queryReportMsg import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/querySharingPs/data.go b/iSolarCloud/AppService/querySharingPs/data.go index 51146279c..384ba635f 100644 --- a/iSolarCloud/AppService/querySharingPs/data.go +++ b/iSolarCloud/AppService/querySharingPs/data.go @@ -2,8 +2,8 @@ package querySharingPs import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/querySharingPs/struct.go b/iSolarCloud/AppService/querySharingPs/struct.go index 77b144cc4..d6eb9b060 100644 --- a/iSolarCloud/AppService/querySharingPs/struct.go +++ b/iSolarCloud/AppService/querySharingPs/struct.go @@ -6,8 +6,8 @@ package querySharingPs import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/querySysAdvancedParam/data.go b/iSolarCloud/AppService/querySysAdvancedParam/data.go index 441c30e78..e0e0f4468 100644 --- a/iSolarCloud/AppService/querySysAdvancedParam/data.go +++ b/iSolarCloud/AppService/querySysAdvancedParam/data.go @@ -2,8 +2,8 @@ package querySysAdvancedParam import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/querySysAdvancedParam/struct.go b/iSolarCloud/AppService/querySysAdvancedParam/struct.go index 43a1ae06d..ae48fa82a 100644 --- a/iSolarCloud/AppService/querySysAdvancedParam/struct.go +++ b/iSolarCloud/AppService/querySysAdvancedParam/struct.go @@ -6,8 +6,8 @@ package querySysAdvancedParam import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryTimeBySN/data.go b/iSolarCloud/AppService/queryTimeBySN/data.go index a8422ea06..2d76ace05 100644 --- a/iSolarCloud/AppService/queryTimeBySN/data.go +++ b/iSolarCloud/AppService/queryTimeBySN/data.go @@ -2,8 +2,8 @@ package queryTimeBySN import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryTimeBySN/struct.go b/iSolarCloud/AppService/queryTimeBySN/struct.go index 80c1984ce..2b315aa18 100644 --- a/iSolarCloud/AppService/queryTimeBySN/struct.go +++ b/iSolarCloud/AppService/queryTimeBySN/struct.go @@ -6,8 +6,8 @@ package queryTimeBySN import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryTrafficByDateCTCC/data.go b/iSolarCloud/AppService/queryTrafficByDateCTCC/data.go index adc4a6347..2e135966b 100644 --- a/iSolarCloud/AppService/queryTrafficByDateCTCC/data.go +++ b/iSolarCloud/AppService/queryTrafficByDateCTCC/data.go @@ -2,8 +2,8 @@ package queryTrafficByDateCTCC import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryTrafficByDateCTCC/struct.go b/iSolarCloud/AppService/queryTrafficByDateCTCC/struct.go index a0158b68c..790d6dd55 100644 --- a/iSolarCloud/AppService/queryTrafficByDateCTCC/struct.go +++ b/iSolarCloud/AppService/queryTrafficByDateCTCC/struct.go @@ -6,8 +6,8 @@ package queryTrafficByDateCTCC import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryTrafficCTCC/data.go b/iSolarCloud/AppService/queryTrafficCTCC/data.go index 389e164c4..9b889be92 100644 --- a/iSolarCloud/AppService/queryTrafficCTCC/data.go +++ b/iSolarCloud/AppService/queryTrafficCTCC/data.go @@ -2,8 +2,8 @@ package queryTrafficCTCC import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryTrafficCTCC/struct.go b/iSolarCloud/AppService/queryTrafficCTCC/struct.go index 532fa400a..1ea512018 100644 --- a/iSolarCloud/AppService/queryTrafficCTCC/struct.go +++ b/iSolarCloud/AppService/queryTrafficCTCC/struct.go @@ -6,8 +6,8 @@ package queryTrafficCTCC import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryUnitList/data.go b/iSolarCloud/AppService/queryUnitList/data.go index 3fdcb9577..9cfe831d2 100644 --- a/iSolarCloud/AppService/queryUnitList/data.go +++ b/iSolarCloud/AppService/queryUnitList/data.go @@ -2,21 +2,20 @@ package queryUnitList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" - "github.com/MickMake/GoUnify/Only" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" + "github.com/MickMake/GoUnify/Only" ) const Url = "/v1/userService/queryUnitList" const Disabled = false type RequestData struct { - // DeviceType valueTypes.String `json:"device_type" required:"true"` } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -25,49 +24,24 @@ func (rd RequestData) Help() string { } type ResultData []struct { - IsBasicUnit valueTypes.Bool `json:"is_basic_unit"` - TargetUnit string `json:"target_unit"` - UnitConverId valueTypes.Integer `json:"unit_conver_id"` - UnitName string `json:"unit_name"` - UnitType valueTypes.Integer `json:"unit_type"` + GoStruct GoStruct.GoStruct `json:"GoStruct" DataTable:"true" DataTableSortOn:"UnitConvertId"` + + UnitConvertId valueTypes.Integer `json:"unit_conver_id" PointId:"unit_convert_id"` + UnitName valueTypes.String `json:"unit_name"` + UnitType valueTypes.Integer `json:"unit_type"` + IsBasicUnit valueTypes.Bool `json:"is_basic_unit"` + TargetUnit valueTypes.String `json:"target_unit"` } func (e *ResultData) IsValid() error { var err error - //switch { - //case e.Dummy == "": - // break - //default: - // err = errors.New(fmt.Sprintf("unknown error '%s'", e.Dummy)) - //} return err } -//type DecodeResultData ResultData -// -//func (e *ResultData) UnmarshalJSON(data []byte) error { -// var err error -// -// for range Only.Once { -// if len(data) == 0 { -// break -// } -// var pd DecodeResultData -// -// // Store ResultData -// _ = json.Unmarshal(data, &pd) -// e.Dummy = pd.Dummy -// } -// -// return err -//} - func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() - for range Only.Once { entries.StructToDataMap(*e, "system", nil) } - - return entries + return entries.StructToDataMap(*e, "system", nil) } diff --git a/iSolarCloud/AppService/queryUnitList/struct.go b/iSolarCloud/AppService/queryUnitList/struct.go index 9292f548c..a5a1c31df 100644 --- a/iSolarCloud/AppService/queryUnitList/struct.go +++ b/iSolarCloud/AppService/queryUnitList/struct.go @@ -6,8 +6,8 @@ package queryUnitList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryUnitUuidBytotalId/data.go b/iSolarCloud/AppService/queryUnitUuidBytotalId/data.go index 0c5e4ffc3..34aa8997b 100644 --- a/iSolarCloud/AppService/queryUnitUuidBytotalId/data.go +++ b/iSolarCloud/AppService/queryUnitUuidBytotalId/data.go @@ -2,8 +2,8 @@ package queryUnitUuidBytotalId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryUnitUuidBytotalId/struct.go b/iSolarCloud/AppService/queryUnitUuidBytotalId/struct.go index e32f6c266..656b6b63b 100644 --- a/iSolarCloud/AppService/queryUnitUuidBytotalId/struct.go +++ b/iSolarCloud/AppService/queryUnitUuidBytotalId/struct.go @@ -6,8 +6,8 @@ package queryUnitUuidBytotalId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryUserBtnPri/data.go b/iSolarCloud/AppService/queryUserBtnPri/data.go index bc89c2137..9e5470744 100644 --- a/iSolarCloud/AppService/queryUserBtnPri/data.go +++ b/iSolarCloud/AppService/queryUserBtnPri/data.go @@ -2,8 +2,8 @@ package queryUserBtnPri import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryUserBtnPri/struct.go b/iSolarCloud/AppService/queryUserBtnPri/struct.go index 62938c171..b56f4f43e 100644 --- a/iSolarCloud/AppService/queryUserBtnPri/struct.go +++ b/iSolarCloud/AppService/queryUserBtnPri/struct.go @@ -6,8 +6,8 @@ package queryUserBtnPri import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryUserByUserIds/data.go b/iSolarCloud/AppService/queryUserByUserIds/data.go index 61f98ad65..1ec005788 100644 --- a/iSolarCloud/AppService/queryUserByUserIds/data.go +++ b/iSolarCloud/AppService/queryUserByUserIds/data.go @@ -2,8 +2,8 @@ package queryUserByUserIds import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryUserByUserIds/struct.go b/iSolarCloud/AppService/queryUserByUserIds/struct.go index 81acadfb4..625b77f20 100644 --- a/iSolarCloud/AppService/queryUserByUserIds/struct.go +++ b/iSolarCloud/AppService/queryUserByUserIds/struct.go @@ -6,8 +6,8 @@ package queryUserByUserIds import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryUserExtensionAttribute/data.go b/iSolarCloud/AppService/queryUserExtensionAttribute/data.go index 178006d2b..fc1a409da 100644 --- a/iSolarCloud/AppService/queryUserExtensionAttribute/data.go +++ b/iSolarCloud/AppService/queryUserExtensionAttribute/data.go @@ -2,8 +2,8 @@ package queryUserExtensionAttribute import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryUserExtensionAttribute/struct.go b/iSolarCloud/AppService/queryUserExtensionAttribute/struct.go index e14cdef55..889261d5c 100644 --- a/iSolarCloud/AppService/queryUserExtensionAttribute/struct.go +++ b/iSolarCloud/AppService/queryUserExtensionAttribute/struct.go @@ -6,8 +6,8 @@ package queryUserExtensionAttribute import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryUserForStep/data.go b/iSolarCloud/AppService/queryUserForStep/data.go index 2666f00d2..183ad5d52 100644 --- a/iSolarCloud/AppService/queryUserForStep/data.go +++ b/iSolarCloud/AppService/queryUserForStep/data.go @@ -2,8 +2,8 @@ package queryUserForStep import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryUserForStep/struct.go b/iSolarCloud/AppService/queryUserForStep/struct.go index fc68999a0..28cbd4bfc 100644 --- a/iSolarCloud/AppService/queryUserForStep/struct.go +++ b/iSolarCloud/AppService/queryUserForStep/struct.go @@ -6,8 +6,8 @@ package queryUserForStep import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryUserList/data.go b/iSolarCloud/AppService/queryUserList/data.go index 7358a0087..f27b23a41 100644 --- a/iSolarCloud/AppService/queryUserList/data.go +++ b/iSolarCloud/AppService/queryUserList/data.go @@ -2,8 +2,8 @@ package queryUserList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -15,7 +15,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryUserList/struct.go b/iSolarCloud/AppService/queryUserList/struct.go index 37703aab3..f690a4e44 100644 --- a/iSolarCloud/AppService/queryUserList/struct.go +++ b/iSolarCloud/AppService/queryUserList/struct.go @@ -6,8 +6,8 @@ package queryUserList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryUserProcessPri/data.go b/iSolarCloud/AppService/queryUserProcessPri/data.go index 2fb22ec1d..9cc9bb6ad 100644 --- a/iSolarCloud/AppService/queryUserProcessPri/data.go +++ b/iSolarCloud/AppService/queryUserProcessPri/data.go @@ -2,8 +2,8 @@ package queryUserProcessPri import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryUserProcessPri/struct.go b/iSolarCloud/AppService/queryUserProcessPri/struct.go index 2dddca616..6558f1bba 100644 --- a/iSolarCloud/AppService/queryUserProcessPri/struct.go +++ b/iSolarCloud/AppService/queryUserProcessPri/struct.go @@ -6,8 +6,8 @@ package queryUserProcessPri import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryUserWechatBindRel/data.go b/iSolarCloud/AppService/queryUserWechatBindRel/data.go index 7c27250cd..a3415ce4f 100644 --- a/iSolarCloud/AppService/queryUserWechatBindRel/data.go +++ b/iSolarCloud/AppService/queryUserWechatBindRel/data.go @@ -2,8 +2,8 @@ package queryUserWechatBindRel import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryUserWechatBindRel/struct.go b/iSolarCloud/AppService/queryUserWechatBindRel/struct.go index a4b8f3c15..c6b5e20f9 100644 --- a/iSolarCloud/AppService/queryUserWechatBindRel/struct.go +++ b/iSolarCloud/AppService/queryUserWechatBindRel/struct.go @@ -6,8 +6,8 @@ package queryUserWechatBindRel import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/queryUuidByTotalIdAndUuid/data.go b/iSolarCloud/AppService/queryUuidByTotalIdAndUuid/data.go index fa8168189..3cbaa449e 100644 --- a/iSolarCloud/AppService/queryUuidByTotalIdAndUuid/data.go +++ b/iSolarCloud/AppService/queryUuidByTotalIdAndUuid/data.go @@ -2,8 +2,8 @@ package queryUuidByTotalIdAndUuid import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/queryUuidByTotalIdAndUuid/struct.go b/iSolarCloud/AppService/queryUuidByTotalIdAndUuid/struct.go index 6256187cc..99acd8e94 100644 --- a/iSolarCloud/AppService/queryUuidByTotalIdAndUuid/struct.go +++ b/iSolarCloud/AppService/queryUuidByTotalIdAndUuid/struct.go @@ -6,8 +6,8 @@ package queryUuidByTotalIdAndUuid import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/rechargeOrderSetMeal/data.go b/iSolarCloud/AppService/rechargeOrderSetMeal/data.go index 8f9f8920a..fc602b288 100644 --- a/iSolarCloud/AppService/rechargeOrderSetMeal/data.go +++ b/iSolarCloud/AppService/rechargeOrderSetMeal/data.go @@ -2,8 +2,8 @@ package rechargeOrderSetMeal import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/rechargeOrderSetMeal/struct.go b/iSolarCloud/AppService/rechargeOrderSetMeal/struct.go index c15c2e654..3b5e63bb9 100644 --- a/iSolarCloud/AppService/rechargeOrderSetMeal/struct.go +++ b/iSolarCloud/AppService/rechargeOrderSetMeal/struct.go @@ -6,8 +6,8 @@ package rechargeOrderSetMeal import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/renewSendReportConfirmEmail/data.go b/iSolarCloud/AppService/renewSendReportConfirmEmail/data.go index 637ba0025..b113298b0 100644 --- a/iSolarCloud/AppService/renewSendReportConfirmEmail/data.go +++ b/iSolarCloud/AppService/renewSendReportConfirmEmail/data.go @@ -2,8 +2,8 @@ package renewSendReportConfirmEmail import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/renewSendReportConfirmEmail/struct.go b/iSolarCloud/AppService/renewSendReportConfirmEmail/struct.go index 0c4913e0d..5ec634963 100644 --- a/iSolarCloud/AppService/renewSendReportConfirmEmail/struct.go +++ b/iSolarCloud/AppService/renewSendReportConfirmEmail/struct.go @@ -6,8 +6,8 @@ package renewSendReportConfirmEmail import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/reportList/data.go b/iSolarCloud/AppService/reportList/data.go index 5dc54a8f6..23865f5c8 100644 --- a/iSolarCloud/AppService/reportList/data.go +++ b/iSolarCloud/AppService/reportList/data.go @@ -3,8 +3,8 @@ package reportList import ( "GoSungrow/iSolarCloud/Common" "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -18,7 +18,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -191,10 +191,10 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsId.String() - entries.StructToDataMap(*e, e.Request.PsId.String(), apiReflect.NewEndPointPath(e.Request.PsId.String())) + entries.StructToDataMap(*e, e.Request.PsId.String(), GoStruct.NewEndPointPath(e.Request.PsId.String())) } return entries diff --git a/iSolarCloud/AppService/reportList/struct.go b/iSolarCloud/AppService/reportList/struct.go index b70b6a3a0..9d4e74783 100644 --- a/iSolarCloud/AppService/reportList/struct.go +++ b/iSolarCloud/AppService/reportList/struct.go @@ -6,8 +6,8 @@ package reportList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/saveCustomerEmployee/data.go b/iSolarCloud/AppService/saveCustomerEmployee/data.go index 2fc46dbce..7ef323930 100644 --- a/iSolarCloud/AppService/saveCustomerEmployee/data.go +++ b/iSolarCloud/AppService/saveCustomerEmployee/data.go @@ -2,8 +2,8 @@ package saveCustomerEmployee import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/saveCustomerEmployee/struct.go b/iSolarCloud/AppService/saveCustomerEmployee/struct.go index 21d3bcf59..009cded94 100644 --- a/iSolarCloud/AppService/saveCustomerEmployee/struct.go +++ b/iSolarCloud/AppService/saveCustomerEmployee/struct.go @@ -6,8 +6,8 @@ package saveCustomerEmployee import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/saveDevSimList/data.go b/iSolarCloud/AppService/saveDevSimList/data.go index f85f636bb..4d362a1f0 100644 --- a/iSolarCloud/AppService/saveDevSimList/data.go +++ b/iSolarCloud/AppService/saveDevSimList/data.go @@ -2,8 +2,8 @@ package saveDevSimList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/saveDevSimList/struct.go b/iSolarCloud/AppService/saveDevSimList/struct.go index 6f21c12f8..472f6db39 100644 --- a/iSolarCloud/AppService/saveDevSimList/struct.go +++ b/iSolarCloud/AppService/saveDevSimList/struct.go @@ -6,8 +6,8 @@ package saveDevSimList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/saveDeviceAccountBatchData/data.go b/iSolarCloud/AppService/saveDeviceAccountBatchData/data.go index 4f7849e8b..edfafd67c 100644 --- a/iSolarCloud/AppService/saveDeviceAccountBatchData/data.go +++ b/iSolarCloud/AppService/saveDeviceAccountBatchData/data.go @@ -2,8 +2,8 @@ package saveDeviceAccountBatchData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/saveDeviceAccountBatchData/struct.go b/iSolarCloud/AppService/saveDeviceAccountBatchData/struct.go index 5237325b6..a4317c53e 100644 --- a/iSolarCloud/AppService/saveDeviceAccountBatchData/struct.go +++ b/iSolarCloud/AppService/saveDeviceAccountBatchData/struct.go @@ -6,8 +6,8 @@ package saveDeviceAccountBatchData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/saveEnviromentIncomeInfos/data.go b/iSolarCloud/AppService/saveEnviromentIncomeInfos/data.go index 07458763b..d507de16d 100644 --- a/iSolarCloud/AppService/saveEnviromentIncomeInfos/data.go +++ b/iSolarCloud/AppService/saveEnviromentIncomeInfos/data.go @@ -2,8 +2,8 @@ package saveEnviromentIncomeInfos import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/saveEnviromentIncomeInfos/struct.go b/iSolarCloud/AppService/saveEnviromentIncomeInfos/struct.go index 50206bc67..eb2eb7539 100644 --- a/iSolarCloud/AppService/saveEnviromentIncomeInfos/struct.go +++ b/iSolarCloud/AppService/saveEnviromentIncomeInfos/struct.go @@ -6,8 +6,8 @@ package saveEnviromentIncomeInfos import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/saveEnvironmentCurve/data.go b/iSolarCloud/AppService/saveEnvironmentCurve/data.go index 68c038c01..98a3fbf47 100644 --- a/iSolarCloud/AppService/saveEnvironmentCurve/data.go +++ b/iSolarCloud/AppService/saveEnvironmentCurve/data.go @@ -2,8 +2,8 @@ package saveEnvironmentCurve import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/saveEnvironmentCurve/struct.go b/iSolarCloud/AppService/saveEnvironmentCurve/struct.go index 1ed17d33b..a5cffe524 100644 --- a/iSolarCloud/AppService/saveEnvironmentCurve/struct.go +++ b/iSolarCloud/AppService/saveEnvironmentCurve/struct.go @@ -6,8 +6,8 @@ package saveEnvironmentCurve import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/saveFirmwareFile/data.go b/iSolarCloud/AppService/saveFirmwareFile/data.go index b3c6bbad0..de64da5f0 100644 --- a/iSolarCloud/AppService/saveFirmwareFile/data.go +++ b/iSolarCloud/AppService/saveFirmwareFile/data.go @@ -2,8 +2,8 @@ package saveFirmwareFile import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/saveFirmwareFile/struct.go b/iSolarCloud/AppService/saveFirmwareFile/struct.go index b8cca6a18..3a650ac20 100644 --- a/iSolarCloud/AppService/saveFirmwareFile/struct.go +++ b/iSolarCloud/AppService/saveFirmwareFile/struct.go @@ -6,8 +6,8 @@ package saveFirmwareFile import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/saveIncomeSettingInfos/data.go b/iSolarCloud/AppService/saveIncomeSettingInfos/data.go index 09c4537a7..c06837b45 100644 --- a/iSolarCloud/AppService/saveIncomeSettingInfos/data.go +++ b/iSolarCloud/AppService/saveIncomeSettingInfos/data.go @@ -2,8 +2,8 @@ package saveIncomeSettingInfos import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/saveIncomeSettingInfos/struct.go b/iSolarCloud/AppService/saveIncomeSettingInfos/struct.go index 3169e1672..7f620968e 100644 --- a/iSolarCloud/AppService/saveIncomeSettingInfos/struct.go +++ b/iSolarCloud/AppService/saveIncomeSettingInfos/struct.go @@ -6,8 +6,8 @@ package saveIncomeSettingInfos import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/saveOrUpdateGroupStringCheckRule/data.go b/iSolarCloud/AppService/saveOrUpdateGroupStringCheckRule/data.go index bde55e501..da2d9cebd 100644 --- a/iSolarCloud/AppService/saveOrUpdateGroupStringCheckRule/data.go +++ b/iSolarCloud/AppService/saveOrUpdateGroupStringCheckRule/data.go @@ -2,8 +2,8 @@ package saveOrUpdateGroupStringCheckRule import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/saveOrUpdateGroupStringCheckRule/struct.go b/iSolarCloud/AppService/saveOrUpdateGroupStringCheckRule/struct.go index d09079e6e..0c9a73892 100644 --- a/iSolarCloud/AppService/saveOrUpdateGroupStringCheckRule/struct.go +++ b/iSolarCloud/AppService/saveOrUpdateGroupStringCheckRule/struct.go @@ -6,8 +6,8 @@ package saveOrUpdateGroupStringCheckRule import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/saveParamModel/data.go b/iSolarCloud/AppService/saveParamModel/data.go index 1862efdc9..c9ad3aacf 100644 --- a/iSolarCloud/AppService/saveParamModel/data.go +++ b/iSolarCloud/AppService/saveParamModel/data.go @@ -2,8 +2,8 @@ package saveParamModel import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/saveParamModel/struct.go b/iSolarCloud/AppService/saveParamModel/struct.go index 039f0574f..9bac9bc62 100644 --- a/iSolarCloud/AppService/saveParamModel/struct.go +++ b/iSolarCloud/AppService/saveParamModel/struct.go @@ -6,8 +6,8 @@ package saveParamModel import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/savePowerCharges/data.go b/iSolarCloud/AppService/savePowerCharges/data.go index 22b227b7e..cd58b5230 100644 --- a/iSolarCloud/AppService/savePowerCharges/data.go +++ b/iSolarCloud/AppService/savePowerCharges/data.go @@ -2,8 +2,8 @@ package savePowerCharges import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/savePowerCharges/struct.go b/iSolarCloud/AppService/savePowerCharges/struct.go index 1ddc26f28..87c0aaaa3 100644 --- a/iSolarCloud/AppService/savePowerCharges/struct.go +++ b/iSolarCloud/AppService/savePowerCharges/struct.go @@ -6,8 +6,8 @@ package savePowerCharges import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/savePowerDevicePoint/data.go b/iSolarCloud/AppService/savePowerDevicePoint/data.go index 28ed38bc8..4cb29503e 100644 --- a/iSolarCloud/AppService/savePowerDevicePoint/data.go +++ b/iSolarCloud/AppService/savePowerDevicePoint/data.go @@ -2,8 +2,8 @@ package savePowerDevicePoint import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/savePowerDevicePoint/struct.go b/iSolarCloud/AppService/savePowerDevicePoint/struct.go index e1b3f5f03..499ba8d53 100644 --- a/iSolarCloud/AppService/savePowerDevicePoint/struct.go +++ b/iSolarCloud/AppService/savePowerDevicePoint/struct.go @@ -6,8 +6,8 @@ package savePowerDevicePoint import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/savePowerRobotInfo/data.go b/iSolarCloud/AppService/savePowerRobotInfo/data.go index 15e1c4109..8094e1024 100644 --- a/iSolarCloud/AppService/savePowerRobotInfo/data.go +++ b/iSolarCloud/AppService/savePowerRobotInfo/data.go @@ -2,8 +2,8 @@ package savePowerRobotInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/savePowerRobotInfo/struct.go b/iSolarCloud/AppService/savePowerRobotInfo/struct.go index 37fea39f8..730026ad0 100644 --- a/iSolarCloud/AppService/savePowerRobotInfo/struct.go +++ b/iSolarCloud/AppService/savePowerRobotInfo/struct.go @@ -6,8 +6,8 @@ package savePowerRobotInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/savePowerRobotSweepAttr/data.go b/iSolarCloud/AppService/savePowerRobotSweepAttr/data.go index 9156b5036..1c3a29997 100644 --- a/iSolarCloud/AppService/savePowerRobotSweepAttr/data.go +++ b/iSolarCloud/AppService/savePowerRobotSweepAttr/data.go @@ -2,8 +2,8 @@ package savePowerRobotSweepAttr import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/savePowerRobotSweepAttr/struct.go b/iSolarCloud/AppService/savePowerRobotSweepAttr/struct.go index 0dba16eb0..cd7abb1a7 100644 --- a/iSolarCloud/AppService/savePowerRobotSweepAttr/struct.go +++ b/iSolarCloud/AppService/savePowerRobotSweepAttr/struct.go @@ -6,8 +6,8 @@ package savePowerRobotSweepAttr import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/savePowerSettingCharges/data.go b/iSolarCloud/AppService/savePowerSettingCharges/data.go index 18cf38da5..109b4bc8e 100644 --- a/iSolarCloud/AppService/savePowerSettingCharges/data.go +++ b/iSolarCloud/AppService/savePowerSettingCharges/data.go @@ -2,8 +2,8 @@ package savePowerSettingCharges import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/savePowerSettingCharges/struct.go b/iSolarCloud/AppService/savePowerSettingCharges/struct.go index 4c5cdef51..cfa17666f 100644 --- a/iSolarCloud/AppService/savePowerSettingCharges/struct.go +++ b/iSolarCloud/AppService/savePowerSettingCharges/struct.go @@ -6,8 +6,8 @@ package savePowerSettingCharges import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/savePowerSettingInfo/data.go b/iSolarCloud/AppService/savePowerSettingInfo/data.go index 7e0eece4b..0c69e1a5b 100644 --- a/iSolarCloud/AppService/savePowerSettingInfo/data.go +++ b/iSolarCloud/AppService/savePowerSettingInfo/data.go @@ -2,8 +2,8 @@ package savePowerSettingInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/savePowerSettingInfo/struct.go b/iSolarCloud/AppService/savePowerSettingInfo/struct.go index 595d41703..cd249bd69 100644 --- a/iSolarCloud/AppService/savePowerSettingInfo/struct.go +++ b/iSolarCloud/AppService/savePowerSettingInfo/struct.go @@ -6,8 +6,8 @@ package savePowerSettingInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/saveProductionBatchData/data.go b/iSolarCloud/AppService/saveProductionBatchData/data.go index 320ccae77..fb6dcedce 100644 --- a/iSolarCloud/AppService/saveProductionBatchData/data.go +++ b/iSolarCloud/AppService/saveProductionBatchData/data.go @@ -2,8 +2,8 @@ package saveProductionBatchData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/saveProductionBatchData/struct.go b/iSolarCloud/AppService/saveProductionBatchData/struct.go index 124807659..5dba9b7a0 100644 --- a/iSolarCloud/AppService/saveProductionBatchData/struct.go +++ b/iSolarCloud/AppService/saveProductionBatchData/struct.go @@ -6,8 +6,8 @@ package saveProductionBatchData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/saveRechargeOrderObj/data.go b/iSolarCloud/AppService/saveRechargeOrderObj/data.go index 289043597..c51e2209a 100644 --- a/iSolarCloud/AppService/saveRechargeOrderObj/data.go +++ b/iSolarCloud/AppService/saveRechargeOrderObj/data.go @@ -2,8 +2,8 @@ package saveRechargeOrderObj import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/saveRechargeOrderObj/struct.go b/iSolarCloud/AppService/saveRechargeOrderObj/struct.go index c13fbf834..ba315cc1b 100644 --- a/iSolarCloud/AppService/saveRechargeOrderObj/struct.go +++ b/iSolarCloud/AppService/saveRechargeOrderObj/struct.go @@ -6,8 +6,8 @@ package saveRechargeOrderObj import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/saveRechargeOrderOtherInfo/data.go b/iSolarCloud/AppService/saveRechargeOrderOtherInfo/data.go index 45080c79a..498bff13d 100644 --- a/iSolarCloud/AppService/saveRechargeOrderOtherInfo/data.go +++ b/iSolarCloud/AppService/saveRechargeOrderOtherInfo/data.go @@ -2,8 +2,8 @@ package saveRechargeOrderOtherInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/saveRechargeOrderOtherInfo/struct.go b/iSolarCloud/AppService/saveRechargeOrderOtherInfo/struct.go index 098f975c0..58a8bd6f6 100644 --- a/iSolarCloud/AppService/saveRechargeOrderOtherInfo/struct.go +++ b/iSolarCloud/AppService/saveRechargeOrderOtherInfo/struct.go @@ -6,8 +6,8 @@ package saveRechargeOrderOtherInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/saveRepair/data.go b/iSolarCloud/AppService/saveRepair/data.go index 05b3d12d1..937cdef9a 100644 --- a/iSolarCloud/AppService/saveRepair/data.go +++ b/iSolarCloud/AppService/saveRepair/data.go @@ -2,8 +2,8 @@ package saveRepair import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/saveRepair/struct.go b/iSolarCloud/AppService/saveRepair/struct.go index b25e050e9..2ccde14b7 100644 --- a/iSolarCloud/AppService/saveRepair/struct.go +++ b/iSolarCloud/AppService/saveRepair/struct.go @@ -6,8 +6,8 @@ package saveRepair import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/saveReportExportColumns/data.go b/iSolarCloud/AppService/saveReportExportColumns/data.go index b595f6176..5a6329544 100644 --- a/iSolarCloud/AppService/saveReportExportColumns/data.go +++ b/iSolarCloud/AppService/saveReportExportColumns/data.go @@ -2,8 +2,8 @@ package saveReportExportColumns import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/saveReportExportColumns/struct.go b/iSolarCloud/AppService/saveReportExportColumns/struct.go index 89df2f819..e8fa6c053 100644 --- a/iSolarCloud/AppService/saveReportExportColumns/struct.go +++ b/iSolarCloud/AppService/saveReportExportColumns/struct.go @@ -6,8 +6,8 @@ package saveReportExportColumns import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/saveSetParam/data.go b/iSolarCloud/AppService/saveSetParam/data.go index c7681d28f..8083f8093 100644 --- a/iSolarCloud/AppService/saveSetParam/data.go +++ b/iSolarCloud/AppService/saveSetParam/data.go @@ -2,8 +2,8 @@ package saveSetParam import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/saveSetParam/struct.go b/iSolarCloud/AppService/saveSetParam/struct.go index c4573d77b..2a328d207 100644 --- a/iSolarCloud/AppService/saveSetParam/struct.go +++ b/iSolarCloud/AppService/saveSetParam/struct.go @@ -6,8 +6,8 @@ package saveSetParam import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/saveSysUserMsg/data.go b/iSolarCloud/AppService/saveSysUserMsg/data.go index 78776dc94..f7363961c 100644 --- a/iSolarCloud/AppService/saveSysUserMsg/data.go +++ b/iSolarCloud/AppService/saveSysUserMsg/data.go @@ -2,8 +2,8 @@ package saveSysUserMsg import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/saveSysUserMsg/struct.go b/iSolarCloud/AppService/saveSysUserMsg/struct.go index 8649b9b02..3e3d792c4 100644 --- a/iSolarCloud/AppService/saveSysUserMsg/struct.go +++ b/iSolarCloud/AppService/saveSysUserMsg/struct.go @@ -6,8 +6,8 @@ package saveSysUserMsg import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/saveTemplate/data.go b/iSolarCloud/AppService/saveTemplate/data.go index 3f38c98db..d0e26efe4 100644 --- a/iSolarCloud/AppService/saveTemplate/data.go +++ b/iSolarCloud/AppService/saveTemplate/data.go @@ -2,8 +2,8 @@ package saveTemplate import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/saveTemplate/struct.go b/iSolarCloud/AppService/saveTemplate/struct.go index d3b950584..e69457bb0 100644 --- a/iSolarCloud/AppService/saveTemplate/struct.go +++ b/iSolarCloud/AppService/saveTemplate/struct.go @@ -6,8 +6,8 @@ package saveTemplate import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/searchM2MMonthFlowCMCC/data.go b/iSolarCloud/AppService/searchM2MMonthFlowCMCC/data.go index 9fcddb0f7..dc299fb50 100644 --- a/iSolarCloud/AppService/searchM2MMonthFlowCMCC/data.go +++ b/iSolarCloud/AppService/searchM2MMonthFlowCMCC/data.go @@ -2,8 +2,8 @@ package searchM2MMonthFlowCMCC import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/searchM2MMonthFlowCMCC/struct.go b/iSolarCloud/AppService/searchM2MMonthFlowCMCC/struct.go index e86ac5a35..b775612b2 100644 --- a/iSolarCloud/AppService/searchM2MMonthFlowCMCC/struct.go +++ b/iSolarCloud/AppService/searchM2MMonthFlowCMCC/struct.go @@ -6,8 +6,8 @@ package searchM2MMonthFlowCMCC import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/selectSysTranslationNames/data.go b/iSolarCloud/AppService/selectSysTranslationNames/data.go index 2438dd570..f4590682f 100644 --- a/iSolarCloud/AppService/selectSysTranslationNames/data.go +++ b/iSolarCloud/AppService/selectSysTranslationNames/data.go @@ -2,8 +2,8 @@ package selectSysTranslationNames import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/selectSysTranslationNames/struct.go b/iSolarCloud/AppService/selectSysTranslationNames/struct.go index b16ecf629..2906af3e1 100644 --- a/iSolarCloud/AppService/selectSysTranslationNames/struct.go +++ b/iSolarCloud/AppService/selectSysTranslationNames/struct.go @@ -6,8 +6,8 @@ package selectSysTranslationNames import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/sendPsTimeZoneInstruction/data.go b/iSolarCloud/AppService/sendPsTimeZoneInstruction/data.go index 81d70887e..962a39d8f 100644 --- a/iSolarCloud/AppService/sendPsTimeZoneInstruction/data.go +++ b/iSolarCloud/AppService/sendPsTimeZoneInstruction/data.go @@ -2,8 +2,8 @@ package sendPsTimeZoneInstruction import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/sendPsTimeZoneInstruction/struct.go b/iSolarCloud/AppService/sendPsTimeZoneInstruction/struct.go index 3c738e94c..ce76a2226 100644 --- a/iSolarCloud/AppService/sendPsTimeZoneInstruction/struct.go +++ b/iSolarCloud/AppService/sendPsTimeZoneInstruction/struct.go @@ -6,8 +6,8 @@ package sendPsTimeZoneInstruction import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/setUpFormulaFaultAnalyse/data.go b/iSolarCloud/AppService/setUpFormulaFaultAnalyse/data.go index d082508a4..6adba3a49 100644 --- a/iSolarCloud/AppService/setUpFormulaFaultAnalyse/data.go +++ b/iSolarCloud/AppService/setUpFormulaFaultAnalyse/data.go @@ -2,8 +2,8 @@ package setUpFormulaFaultAnalyse import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/setUpFormulaFaultAnalyse/struct.go b/iSolarCloud/AppService/setUpFormulaFaultAnalyse/struct.go index 7c3f8496c..6e017c6e5 100644 --- a/iSolarCloud/AppService/setUpFormulaFaultAnalyse/struct.go +++ b/iSolarCloud/AppService/setUpFormulaFaultAnalyse/struct.go @@ -6,8 +6,8 @@ package setUpFormulaFaultAnalyse import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/setUserGDPRAttrs/data.go b/iSolarCloud/AppService/setUserGDPRAttrs/data.go index f71ca83dd..35e9fa834 100644 --- a/iSolarCloud/AppService/setUserGDPRAttrs/data.go +++ b/iSolarCloud/AppService/setUserGDPRAttrs/data.go @@ -2,8 +2,8 @@ package setUserGDPRAttrs import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/setUserGDPRAttrs/struct.go b/iSolarCloud/AppService/setUserGDPRAttrs/struct.go index f54b6bbf3..407d5f80a 100644 --- a/iSolarCloud/AppService/setUserGDPRAttrs/struct.go +++ b/iSolarCloud/AppService/setUserGDPRAttrs/struct.go @@ -6,8 +6,8 @@ package setUserGDPRAttrs import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/settingNotice/data.go b/iSolarCloud/AppService/settingNotice/data.go index 97cdddc1d..c67b39b0f 100644 --- a/iSolarCloud/AppService/settingNotice/data.go +++ b/iSolarCloud/AppService/settingNotice/data.go @@ -2,8 +2,8 @@ package settingNotice import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/settingNotice/struct.go b/iSolarCloud/AppService/settingNotice/struct.go index 3cd01fa7d..7591144b6 100644 --- a/iSolarCloud/AppService/settingNotice/struct.go +++ b/iSolarCloud/AppService/settingNotice/struct.go @@ -6,8 +6,8 @@ package settingNotice import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/shareMyPs/data.go b/iSolarCloud/AppService/shareMyPs/data.go index 6fcd3fc99..3a7833163 100644 --- a/iSolarCloud/AppService/shareMyPs/data.go +++ b/iSolarCloud/AppService/shareMyPs/data.go @@ -2,8 +2,8 @@ package shareMyPs import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/shareMyPs/struct.go b/iSolarCloud/AppService/shareMyPs/struct.go index 1224d26f7..f82278f28 100644 --- a/iSolarCloud/AppService/shareMyPs/struct.go +++ b/iSolarCloud/AppService/shareMyPs/struct.go @@ -6,8 +6,8 @@ package shareMyPs import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/sharePsBySN/data.go b/iSolarCloud/AppService/sharePsBySN/data.go index 600407a48..5576c0fc3 100644 --- a/iSolarCloud/AppService/sharePsBySN/data.go +++ b/iSolarCloud/AppService/sharePsBySN/data.go @@ -2,8 +2,8 @@ package sharePsBySN import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/sharePsBySN/struct.go b/iSolarCloud/AppService/sharePsBySN/struct.go index 6a04010c2..ce89bdd7d 100644 --- a/iSolarCloud/AppService/sharePsBySN/struct.go +++ b/iSolarCloud/AppService/sharePsBySN/struct.go @@ -6,8 +6,8 @@ package sharePsBySN import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/showInverterByUnit/data.go b/iSolarCloud/AppService/showInverterByUnit/data.go index c3d26b9f6..a51049df1 100644 --- a/iSolarCloud/AppService/showInverterByUnit/data.go +++ b/iSolarCloud/AppService/showInverterByUnit/data.go @@ -2,10 +2,10 @@ package showInverterByUnit import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" - "github.com/MickMake/GoUnify/Only" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" + "github.com/MickMake/GoUnify/Only" ) const Url = "/v1/devService/showInverterByUnit" @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -24,9 +24,14 @@ func (rd RequestData) Help() string { return ret } - -type ResultData struct { - Dummy valueTypes.String `json:"dummy"` +type ResultData []struct { + AndName valueTypes.String `json:"and_name"` + AndUUID valueTypes.Integer `json:"and_uuid"` + DeviceType valueTypes.Integer `json:"device_type"` + InverterInfo valueTypes.String `json:"inverterinfo" PointId:"inverter_info"` + Name valueTypes.String `json:"name"` + UnitName valueTypes.String `json:"unit_name"` + UnitUUID valueTypes.Integer `json:"unit_uuid"` } func (e *ResultData) IsValid() error { @@ -34,25 +39,6 @@ func (e *ResultData) IsValid() error { return err } -//type DecodeResultData ResultData -// -//func (e *ResultData) UnmarshalJSON(data []byte) error { -// var err error -// -// for range Only.Once { -// if len(data) == 0 { -// break -// } -// var pd DecodeResultData -// -// // Store ResultData -// _ = json.Unmarshal(data, &pd) -// e.Dummy = pd.Dummy -// } -// -// return err -//} - func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() diff --git a/iSolarCloud/AppService/showInverterByUnit/struct.go b/iSolarCloud/AppService/showInverterByUnit/struct.go index 586168a80..6df968855 100644 --- a/iSolarCloud/AppService/showInverterByUnit/struct.go +++ b/iSolarCloud/AppService/showInverterByUnit/struct.go @@ -6,8 +6,8 @@ package showInverterByUnit import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/showOnlineUsers/data.go b/iSolarCloud/AppService/showOnlineUsers/data.go index e9a449b62..c45dbe427 100644 --- a/iSolarCloud/AppService/showOnlineUsers/data.go +++ b/iSolarCloud/AppService/showOnlineUsers/data.go @@ -2,8 +2,8 @@ package showOnlineUsers import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/showOnlineUsers/struct.go b/iSolarCloud/AppService/showOnlineUsers/struct.go index 979eadad9..49bc566cc 100644 --- a/iSolarCloud/AppService/showOnlineUsers/struct.go +++ b/iSolarCloud/AppService/showOnlineUsers/struct.go @@ -6,8 +6,8 @@ package showOnlineUsers import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/showWarning/data.go b/iSolarCloud/AppService/showWarning/data.go index ca7b90aa3..23bd96f12 100644 --- a/iSolarCloud/AppService/showWarning/data.go +++ b/iSolarCloud/AppService/showWarning/data.go @@ -2,8 +2,8 @@ package showWarning import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/showWarning/struct.go b/iSolarCloud/AppService/showWarning/struct.go index e688fc8ff..70ca027ed 100644 --- a/iSolarCloud/AppService/showWarning/struct.go +++ b/iSolarCloud/AppService/showWarning/struct.go @@ -6,8 +6,8 @@ package showWarning import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/snIsExist/data.go b/iSolarCloud/AppService/snIsExist/data.go index 2f0d8abff..42874856c 100644 --- a/iSolarCloud/AppService/snIsExist/data.go +++ b/iSolarCloud/AppService/snIsExist/data.go @@ -2,8 +2,8 @@ package snIsExist import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/snIsExist/struct.go b/iSolarCloud/AppService/snIsExist/struct.go index f97ece946..df103ec4f 100644 --- a/iSolarCloud/AppService/snIsExist/struct.go +++ b/iSolarCloud/AppService/snIsExist/struct.go @@ -6,8 +6,8 @@ package snIsExist import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/snsIsExist/data.go b/iSolarCloud/AppService/snsIsExist/data.go index e21f49d67..0146caa1b 100644 --- a/iSolarCloud/AppService/snsIsExist/data.go +++ b/iSolarCloud/AppService/snsIsExist/data.go @@ -2,8 +2,8 @@ package snsIsExist import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/snsIsExist/struct.go b/iSolarCloud/AppService/snsIsExist/struct.go index 564d65f63..86bb1c352 100644 --- a/iSolarCloud/AppService/snsIsExist/struct.go +++ b/iSolarCloud/AppService/snsIsExist/struct.go @@ -6,8 +6,8 @@ package snsIsExist import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/speedyAddPowerStation/data.go b/iSolarCloud/AppService/speedyAddPowerStation/data.go index 5388198d8..c55bce2d4 100644 --- a/iSolarCloud/AppService/speedyAddPowerStation/data.go +++ b/iSolarCloud/AppService/speedyAddPowerStation/data.go @@ -2,8 +2,8 @@ package speedyAddPowerStation import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/speedyAddPowerStation/struct.go b/iSolarCloud/AppService/speedyAddPowerStation/struct.go index 8255129ab..5ed5e5478 100644 --- a/iSolarCloud/AppService/speedyAddPowerStation/struct.go +++ b/iSolarCloud/AppService/speedyAddPowerStation/struct.go @@ -6,8 +6,8 @@ package speedyAddPowerStation import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/stationDeviceHistoryDataList/data.go b/iSolarCloud/AppService/stationDeviceHistoryDataList/data.go index 5bac9b25f..dd28a471b 100644 --- a/iSolarCloud/AppService/stationDeviceHistoryDataList/data.go +++ b/iSolarCloud/AppService/stationDeviceHistoryDataList/data.go @@ -2,8 +2,8 @@ package stationDeviceHistoryDataList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/stationDeviceHistoryDataList/struct.go b/iSolarCloud/AppService/stationDeviceHistoryDataList/struct.go index 907ac30bd..25cce3770 100644 --- a/iSolarCloud/AppService/stationDeviceHistoryDataList/struct.go +++ b/iSolarCloud/AppService/stationDeviceHistoryDataList/struct.go @@ -6,8 +6,8 @@ package stationDeviceHistoryDataList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/stationUnitsList/data.go b/iSolarCloud/AppService/stationUnitsList/data.go index da5984385..b956e6cdf 100644 --- a/iSolarCloud/AppService/stationUnitsList/data.go +++ b/iSolarCloud/AppService/stationUnitsList/data.go @@ -2,8 +2,8 @@ package stationUnitsList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/stationUnitsList/struct.go b/iSolarCloud/AppService/stationUnitsList/struct.go index 0d519a472..e3b9fafbc 100644 --- a/iSolarCloud/AppService/stationUnitsList/struct.go +++ b/iSolarCloud/AppService/stationUnitsList/struct.go @@ -6,8 +6,8 @@ package stationUnitsList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/stationsDiscreteData/data.go b/iSolarCloud/AppService/stationsDiscreteData/data.go index 870a524af..81f240e06 100644 --- a/iSolarCloud/AppService/stationsDiscreteData/data.go +++ b/iSolarCloud/AppService/stationsDiscreteData/data.go @@ -2,8 +2,8 @@ package stationsDiscreteData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/stationsDiscreteData/struct.go b/iSolarCloud/AppService/stationsDiscreteData/struct.go index 909325884..7340c3fff 100644 --- a/iSolarCloud/AppService/stationsDiscreteData/struct.go +++ b/iSolarCloud/AppService/stationsDiscreteData/struct.go @@ -6,8 +6,8 @@ package stationsDiscreteData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/stationsIncomeList/data.go b/iSolarCloud/AppService/stationsIncomeList/data.go index 1dcf68e75..b27a3160c 100644 --- a/iSolarCloud/AppService/stationsIncomeList/data.go +++ b/iSolarCloud/AppService/stationsIncomeList/data.go @@ -2,8 +2,8 @@ package stationsIncomeList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/stationsIncomeList/struct.go b/iSolarCloud/AppService/stationsIncomeList/struct.go index 6c1f98332..26bca9889 100644 --- a/iSolarCloud/AppService/stationsIncomeList/struct.go +++ b/iSolarCloud/AppService/stationsIncomeList/struct.go @@ -6,8 +6,8 @@ package stationsIncomeList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/stationsPointReport/data.go b/iSolarCloud/AppService/stationsPointReport/data.go index 8b00396fe..cb873053f 100644 --- a/iSolarCloud/AppService/stationsPointReport/data.go +++ b/iSolarCloud/AppService/stationsPointReport/data.go @@ -2,8 +2,8 @@ package stationsPointReport import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/stationsPointReport/struct.go b/iSolarCloud/AppService/stationsPointReport/struct.go index e494dfb7f..9d6ab04a7 100644 --- a/iSolarCloud/AppService/stationsPointReport/struct.go +++ b/iSolarCloud/AppService/stationsPointReport/struct.go @@ -6,8 +6,8 @@ package stationsPointReport import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/stationsYearPlanReport/data.go b/iSolarCloud/AppService/stationsYearPlanReport/data.go index ee078e9f8..1c84361bc 100644 --- a/iSolarCloud/AppService/stationsYearPlanReport/data.go +++ b/iSolarCloud/AppService/stationsYearPlanReport/data.go @@ -2,8 +2,8 @@ package stationsYearPlanReport import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/stationsYearPlanReport/struct.go b/iSolarCloud/AppService/stationsYearPlanReport/struct.go index bd5d142be..77efa5253 100644 --- a/iSolarCloud/AppService/stationsYearPlanReport/struct.go +++ b/iSolarCloud/AppService/stationsYearPlanReport/struct.go @@ -6,8 +6,8 @@ package stationsYearPlanReport import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/struct.go b/iSolarCloud/AppService/struct.go index fa66b6575..13eb211b4 100644 --- a/iSolarCloud/AppService/struct.go +++ b/iSolarCloud/AppService/struct.go @@ -576,7 +576,7 @@ import ( "GoSungrow/iSolarCloud/AppService/userMailHasBound" "GoSungrow/iSolarCloud/AppService/userRegister" "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" "fmt" ) diff --git a/iSolarCloud/AppService/sureAndImportSelettlementData/data.go b/iSolarCloud/AppService/sureAndImportSelettlementData/data.go index 41cd1b96c..6e410fa5b 100644 --- a/iSolarCloud/AppService/sureAndImportSelettlementData/data.go +++ b/iSolarCloud/AppService/sureAndImportSelettlementData/data.go @@ -2,8 +2,8 @@ package sureAndImportSelettlementData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/sureAndImportSelettlementData/struct.go b/iSolarCloud/AppService/sureAndImportSelettlementData/struct.go index 437421548..0e3323405 100644 --- a/iSolarCloud/AppService/sureAndImportSelettlementData/struct.go +++ b/iSolarCloud/AppService/sureAndImportSelettlementData/struct.go @@ -6,8 +6,8 @@ package sureAndImportSelettlementData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/sweepDevParamSet/data.go b/iSolarCloud/AppService/sweepDevParamSet/data.go index f6b8d276e..5a24b1eed 100644 --- a/iSolarCloud/AppService/sweepDevParamSet/data.go +++ b/iSolarCloud/AppService/sweepDevParamSet/data.go @@ -2,8 +2,8 @@ package sweepDevParamSet import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/sweepDevParamSet/struct.go b/iSolarCloud/AppService/sweepDevParamSet/struct.go index 0694cf3e4..2a7b89375 100644 --- a/iSolarCloud/AppService/sweepDevParamSet/struct.go +++ b/iSolarCloud/AppService/sweepDevParamSet/struct.go @@ -6,8 +6,8 @@ package sweepDevParamSet import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/sweepDevRunControl/data.go b/iSolarCloud/AppService/sweepDevRunControl/data.go index fc031b587..025fe655b 100644 --- a/iSolarCloud/AppService/sweepDevRunControl/data.go +++ b/iSolarCloud/AppService/sweepDevRunControl/data.go @@ -2,8 +2,8 @@ package sweepDevRunControl import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/sweepDevRunControl/struct.go b/iSolarCloud/AppService/sweepDevRunControl/struct.go index 40f9d1f0b..cd775e92b 100644 --- a/iSolarCloud/AppService/sweepDevRunControl/struct.go +++ b/iSolarCloud/AppService/sweepDevRunControl/struct.go @@ -6,8 +6,8 @@ package sweepDevRunControl import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/sweepDevStrategyIssue/data.go b/iSolarCloud/AppService/sweepDevStrategyIssue/data.go index 07125a11e..b909538c1 100644 --- a/iSolarCloud/AppService/sweepDevStrategyIssue/data.go +++ b/iSolarCloud/AppService/sweepDevStrategyIssue/data.go @@ -2,8 +2,8 @@ package sweepDevStrategyIssue import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/sweepDevStrategyIssue/struct.go b/iSolarCloud/AppService/sweepDevStrategyIssue/struct.go index 81475333e..f2c8f2525 100644 --- a/iSolarCloud/AppService/sweepDevStrategyIssue/struct.go +++ b/iSolarCloud/AppService/sweepDevStrategyIssue/struct.go @@ -6,8 +6,8 @@ package sweepDevStrategyIssue import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/sysTimeZoneList/data.go b/iSolarCloud/AppService/sysTimeZoneList/data.go index 6fcfe3b76..972faf8c0 100644 --- a/iSolarCloud/AppService/sysTimeZoneList/data.go +++ b/iSolarCloud/AppService/sysTimeZoneList/data.go @@ -2,8 +2,8 @@ package sysTimeZoneList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/sysTimeZoneList/struct.go b/iSolarCloud/AppService/sysTimeZoneList/struct.go index 4adc509b2..248c9e089 100644 --- a/iSolarCloud/AppService/sysTimeZoneList/struct.go +++ b/iSolarCloud/AppService/sysTimeZoneList/struct.go @@ -6,8 +6,8 @@ package sysTimeZoneList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/unLockUser/data.go b/iSolarCloud/AppService/unLockUser/data.go index b76096c63..830105ee4 100644 --- a/iSolarCloud/AppService/unLockUser/data.go +++ b/iSolarCloud/AppService/unLockUser/data.go @@ -2,8 +2,8 @@ package unLockUser import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/unLockUser/struct.go b/iSolarCloud/AppService/unLockUser/struct.go index 67e075762..b9059890f 100644 --- a/iSolarCloud/AppService/unLockUser/struct.go +++ b/iSolarCloud/AppService/unLockUser/struct.go @@ -6,8 +6,8 @@ package unLockUser import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/unlockChildAccount/data.go b/iSolarCloud/AppService/unlockChildAccount/data.go index cbc6d6156..356ce0200 100644 --- a/iSolarCloud/AppService/unlockChildAccount/data.go +++ b/iSolarCloud/AppService/unlockChildAccount/data.go @@ -2,8 +2,8 @@ package unlockChildAccount import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/unlockChildAccount/struct.go b/iSolarCloud/AppService/unlockChildAccount/struct.go index f73b1fc00..39cbe3361 100644 --- a/iSolarCloud/AppService/unlockChildAccount/struct.go +++ b/iSolarCloud/AppService/unlockChildAccount/struct.go @@ -6,8 +6,8 @@ package unlockChildAccount import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/updateCommunicationModuleState/data.go b/iSolarCloud/AppService/updateCommunicationModuleState/data.go index e1bc1b683..5bc92860a 100644 --- a/iSolarCloud/AppService/updateCommunicationModuleState/data.go +++ b/iSolarCloud/AppService/updateCommunicationModuleState/data.go @@ -2,8 +2,8 @@ package updateCommunicationModuleState import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/updateCommunicationModuleState/struct.go b/iSolarCloud/AppService/updateCommunicationModuleState/struct.go index b573a5c5b..f25ecb354 100644 --- a/iSolarCloud/AppService/updateCommunicationModuleState/struct.go +++ b/iSolarCloud/AppService/updateCommunicationModuleState/struct.go @@ -6,8 +6,8 @@ package updateCommunicationModuleState import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/updateDevInstalledPower/data.go b/iSolarCloud/AppService/updateDevInstalledPower/data.go index c9cbe2246..02465fdde 100644 --- a/iSolarCloud/AppService/updateDevInstalledPower/data.go +++ b/iSolarCloud/AppService/updateDevInstalledPower/data.go @@ -2,8 +2,8 @@ package updateDevInstalledPower import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/updateDevInstalledPower/struct.go b/iSolarCloud/AppService/updateDevInstalledPower/struct.go index 92b29c1f3..9078aa13b 100644 --- a/iSolarCloud/AppService/updateDevInstalledPower/struct.go +++ b/iSolarCloud/AppService/updateDevInstalledPower/struct.go @@ -6,8 +6,8 @@ package updateDevInstalledPower import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/updateFault/data.go b/iSolarCloud/AppService/updateFault/data.go index 6af3e7b9f..e5fdddbdc 100644 --- a/iSolarCloud/AppService/updateFault/data.go +++ b/iSolarCloud/AppService/updateFault/data.go @@ -2,8 +2,8 @@ package updateFault import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/updateFault/struct.go b/iSolarCloud/AppService/updateFault/struct.go index 6cb216927..d85dc237f 100644 --- a/iSolarCloud/AppService/updateFault/struct.go +++ b/iSolarCloud/AppService/updateFault/struct.go @@ -6,8 +6,8 @@ package updateFault import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/updateFaultData/data.go b/iSolarCloud/AppService/updateFaultData/data.go index 6f5242f87..d6ccec48f 100644 --- a/iSolarCloud/AppService/updateFaultData/data.go +++ b/iSolarCloud/AppService/updateFaultData/data.go @@ -2,8 +2,8 @@ package updateFaultData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/updateFaultData/struct.go b/iSolarCloud/AppService/updateFaultData/struct.go index 307d58207..19143dc9a 100644 --- a/iSolarCloud/AppService/updateFaultData/struct.go +++ b/iSolarCloud/AppService/updateFaultData/struct.go @@ -6,8 +6,8 @@ package updateFaultData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/updateFaultMsgByFaultCode/data.go b/iSolarCloud/AppService/updateFaultMsgByFaultCode/data.go index d8ed60ef8..5e3e02611 100644 --- a/iSolarCloud/AppService/updateFaultMsgByFaultCode/data.go +++ b/iSolarCloud/AppService/updateFaultMsgByFaultCode/data.go @@ -2,8 +2,8 @@ package updateFaultMsgByFaultCode import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/updateFaultMsgByFaultCode/struct.go b/iSolarCloud/AppService/updateFaultMsgByFaultCode/struct.go index 843c5cffc..e065dd955 100644 --- a/iSolarCloud/AppService/updateFaultMsgByFaultCode/struct.go +++ b/iSolarCloud/AppService/updateFaultMsgByFaultCode/struct.go @@ -6,8 +6,8 @@ package updateFaultMsgByFaultCode import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/updateFaultStatus/data.go b/iSolarCloud/AppService/updateFaultStatus/data.go index f615a7f1f..6866d857d 100644 --- a/iSolarCloud/AppService/updateFaultStatus/data.go +++ b/iSolarCloud/AppService/updateFaultStatus/data.go @@ -2,8 +2,8 @@ package updateFaultStatus import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/updateFaultStatus/struct.go b/iSolarCloud/AppService/updateFaultStatus/struct.go index c6f27b95f..e6f041b08 100644 --- a/iSolarCloud/AppService/updateFaultStatus/struct.go +++ b/iSolarCloud/AppService/updateFaultStatus/struct.go @@ -6,8 +6,8 @@ package updateFaultStatus import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/updateHouseholdWorkOrder/data.go b/iSolarCloud/AppService/updateHouseholdWorkOrder/data.go index c721dd64d..a35e3aa45 100644 --- a/iSolarCloud/AppService/updateHouseholdWorkOrder/data.go +++ b/iSolarCloud/AppService/updateHouseholdWorkOrder/data.go @@ -2,8 +2,8 @@ package updateHouseholdWorkOrder import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/updateHouseholdWorkOrder/struct.go b/iSolarCloud/AppService/updateHouseholdWorkOrder/struct.go index c83cf1146..7cc1b69a6 100644 --- a/iSolarCloud/AppService/updateHouseholdWorkOrder/struct.go +++ b/iSolarCloud/AppService/updateHouseholdWorkOrder/struct.go @@ -6,8 +6,8 @@ package updateHouseholdWorkOrder import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/updateInverterSn2ModuleSn/data.go b/iSolarCloud/AppService/updateInverterSn2ModuleSn/data.go index ca28921f6..9c1510ad1 100644 --- a/iSolarCloud/AppService/updateInverterSn2ModuleSn/data.go +++ b/iSolarCloud/AppService/updateInverterSn2ModuleSn/data.go @@ -2,8 +2,8 @@ package updateInverterSn2ModuleSn import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/updateInverterSn2ModuleSn/struct.go b/iSolarCloud/AppService/updateInverterSn2ModuleSn/struct.go index 6bd61f09d..05926a087 100644 --- a/iSolarCloud/AppService/updateInverterSn2ModuleSn/struct.go +++ b/iSolarCloud/AppService/updateInverterSn2ModuleSn/struct.go @@ -6,8 +6,8 @@ package updateInverterSn2ModuleSn import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/updateOperateTicketAttachmentId/data.go b/iSolarCloud/AppService/updateOperateTicketAttachmentId/data.go index 63ad683a0..acc5befda 100644 --- a/iSolarCloud/AppService/updateOperateTicketAttachmentId/data.go +++ b/iSolarCloud/AppService/updateOperateTicketAttachmentId/data.go @@ -2,8 +2,8 @@ package updateOperateTicketAttachmentId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/updateOperateTicketAttachmentId/struct.go b/iSolarCloud/AppService/updateOperateTicketAttachmentId/struct.go index 9d8e25fc6..bbe40062b 100644 --- a/iSolarCloud/AppService/updateOperateTicketAttachmentId/struct.go +++ b/iSolarCloud/AppService/updateOperateTicketAttachmentId/struct.go @@ -6,8 +6,8 @@ package updateOperateTicketAttachmentId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/updateOrderDeviceByCustomerService/data.go b/iSolarCloud/AppService/updateOrderDeviceByCustomerService/data.go index 18b6abc3c..5d9c21349 100644 --- a/iSolarCloud/AppService/updateOrderDeviceByCustomerService/data.go +++ b/iSolarCloud/AppService/updateOrderDeviceByCustomerService/data.go @@ -2,8 +2,8 @@ package updateOrderDeviceByCustomerService import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/updateOrderDeviceByCustomerService/struct.go b/iSolarCloud/AppService/updateOrderDeviceByCustomerService/struct.go index 3766acdc8..c03859171 100644 --- a/iSolarCloud/AppService/updateOrderDeviceByCustomerService/struct.go +++ b/iSolarCloud/AppService/updateOrderDeviceByCustomerService/struct.go @@ -6,8 +6,8 @@ package updateOrderDeviceByCustomerService import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/updateOwnerFaultConfig/data.go b/iSolarCloud/AppService/updateOwnerFaultConfig/data.go index 346f00efc..ebe276dfd 100644 --- a/iSolarCloud/AppService/updateOwnerFaultConfig/data.go +++ b/iSolarCloud/AppService/updateOwnerFaultConfig/data.go @@ -2,8 +2,8 @@ package updateOwnerFaultConfig import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/updateOwnerFaultConfig/struct.go b/iSolarCloud/AppService/updateOwnerFaultConfig/struct.go index 48ad3a865..2c411a008 100644 --- a/iSolarCloud/AppService/updateOwnerFaultConfig/struct.go +++ b/iSolarCloud/AppService/updateOwnerFaultConfig/struct.go @@ -6,8 +6,8 @@ package updateOwnerFaultConfig import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/updateParamSettingSysMsg/data.go b/iSolarCloud/AppService/updateParamSettingSysMsg/data.go index 69b6bf530..22127429f 100644 --- a/iSolarCloud/AppService/updateParamSettingSysMsg/data.go +++ b/iSolarCloud/AppService/updateParamSettingSysMsg/data.go @@ -2,8 +2,8 @@ package updateParamSettingSysMsg import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/updateParamSettingSysMsg/struct.go b/iSolarCloud/AppService/updateParamSettingSysMsg/struct.go index 8b5c369e4..8b22b1116 100644 --- a/iSolarCloud/AppService/updateParamSettingSysMsg/struct.go +++ b/iSolarCloud/AppService/updateParamSettingSysMsg/struct.go @@ -6,8 +6,8 @@ package updateParamSettingSysMsg import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/updatePlatformLevelFaultLevel/data.go b/iSolarCloud/AppService/updatePlatformLevelFaultLevel/data.go index 80991a953..f06bc0c6d 100644 --- a/iSolarCloud/AppService/updatePlatformLevelFaultLevel/data.go +++ b/iSolarCloud/AppService/updatePlatformLevelFaultLevel/data.go @@ -2,8 +2,8 @@ package updatePlatformLevelFaultLevel import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/updatePlatformLevelFaultLevel/struct.go b/iSolarCloud/AppService/updatePlatformLevelFaultLevel/struct.go index 6eb6aedc6..33464f44b 100644 --- a/iSolarCloud/AppService/updatePlatformLevelFaultLevel/struct.go +++ b/iSolarCloud/AppService/updatePlatformLevelFaultLevel/struct.go @@ -6,8 +6,8 @@ package updatePlatformLevelFaultLevel import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/updatePowerDevicePoint/data.go b/iSolarCloud/AppService/updatePowerDevicePoint/data.go index 09dfe95fe..33838eb3a 100644 --- a/iSolarCloud/AppService/updatePowerDevicePoint/data.go +++ b/iSolarCloud/AppService/updatePowerDevicePoint/data.go @@ -2,8 +2,8 @@ package updatePowerDevicePoint import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/updatePowerDevicePoint/struct.go b/iSolarCloud/AppService/updatePowerDevicePoint/struct.go index 1a9adcf72..af3535780 100644 --- a/iSolarCloud/AppService/updatePowerDevicePoint/struct.go +++ b/iSolarCloud/AppService/updatePowerDevicePoint/struct.go @@ -6,8 +6,8 @@ package updatePowerDevicePoint import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/updatePowerRobotInfo/data.go b/iSolarCloud/AppService/updatePowerRobotInfo/data.go index 952ea31f6..c786fcd1a 100644 --- a/iSolarCloud/AppService/updatePowerRobotInfo/data.go +++ b/iSolarCloud/AppService/updatePowerRobotInfo/data.go @@ -2,8 +2,8 @@ package updatePowerRobotInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/updatePowerRobotInfo/struct.go b/iSolarCloud/AppService/updatePowerRobotInfo/struct.go index d9fcfc229..5f2e10cfe 100644 --- a/iSolarCloud/AppService/updatePowerRobotInfo/struct.go +++ b/iSolarCloud/AppService/updatePowerRobotInfo/struct.go @@ -6,8 +6,8 @@ package updatePowerRobotInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/updatePowerRobotSweepAttr/data.go b/iSolarCloud/AppService/updatePowerRobotSweepAttr/data.go index edb6da0c4..012bf7a62 100644 --- a/iSolarCloud/AppService/updatePowerRobotSweepAttr/data.go +++ b/iSolarCloud/AppService/updatePowerRobotSweepAttr/data.go @@ -2,8 +2,8 @@ package updatePowerRobotSweepAttr import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/updatePowerRobotSweepAttr/struct.go b/iSolarCloud/AppService/updatePowerRobotSweepAttr/struct.go index 8255f5814..3e2cfbf35 100644 --- a/iSolarCloud/AppService/updatePowerRobotSweepAttr/struct.go +++ b/iSolarCloud/AppService/updatePowerRobotSweepAttr/struct.go @@ -6,8 +6,8 @@ package updatePowerRobotSweepAttr import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/updatePowerStationForHousehold/data.go b/iSolarCloud/AppService/updatePowerStationForHousehold/data.go index f83fce52a..560a48c1c 100644 --- a/iSolarCloud/AppService/updatePowerStationForHousehold/data.go +++ b/iSolarCloud/AppService/updatePowerStationForHousehold/data.go @@ -2,8 +2,8 @@ package updatePowerStationForHousehold import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/updatePowerStationForHousehold/struct.go b/iSolarCloud/AppService/updatePowerStationForHousehold/struct.go index bf32a501e..dc854dc09 100644 --- a/iSolarCloud/AppService/updatePowerStationForHousehold/struct.go +++ b/iSolarCloud/AppService/updatePowerStationForHousehold/struct.go @@ -6,8 +6,8 @@ package updatePowerStationForHousehold import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/updatePowerStationInfo/data.go b/iSolarCloud/AppService/updatePowerStationInfo/data.go index 0a8e38b5e..1d10e0b64 100644 --- a/iSolarCloud/AppService/updatePowerStationInfo/data.go +++ b/iSolarCloud/AppService/updatePowerStationInfo/data.go @@ -2,8 +2,8 @@ package updatePowerStationInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/updatePowerStationInfo/struct.go b/iSolarCloud/AppService/updatePowerStationInfo/struct.go index 913cd577e..f52a5e193 100644 --- a/iSolarCloud/AppService/updatePowerStationInfo/struct.go +++ b/iSolarCloud/AppService/updatePowerStationInfo/struct.go @@ -6,8 +6,8 @@ package updatePowerStationInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/updatePowerUserInfo/data.go b/iSolarCloud/AppService/updatePowerUserInfo/data.go index 2d979b052..348d5fedd 100644 --- a/iSolarCloud/AppService/updatePowerUserInfo/data.go +++ b/iSolarCloud/AppService/updatePowerUserInfo/data.go @@ -2,8 +2,8 @@ package updatePowerUserInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/updatePowerUserInfo/struct.go b/iSolarCloud/AppService/updatePowerUserInfo/struct.go index ca63a5c20..2475183df 100644 --- a/iSolarCloud/AppService/updatePowerUserInfo/struct.go +++ b/iSolarCloud/AppService/updatePowerUserInfo/struct.go @@ -6,8 +6,8 @@ package updatePowerUserInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/updateReportConfigByEmailAddr/data.go b/iSolarCloud/AppService/updateReportConfigByEmailAddr/data.go index 43e0a83e7..98b87d283 100644 --- a/iSolarCloud/AppService/updateReportConfigByEmailAddr/data.go +++ b/iSolarCloud/AppService/updateReportConfigByEmailAddr/data.go @@ -2,8 +2,8 @@ package updateReportConfigByEmailAddr import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/updateReportConfigByEmailAddr/struct.go b/iSolarCloud/AppService/updateReportConfigByEmailAddr/struct.go index 7d410d8c0..a5132ec56 100644 --- a/iSolarCloud/AppService/updateReportConfigByEmailAddr/struct.go +++ b/iSolarCloud/AppService/updateReportConfigByEmailAddr/struct.go @@ -6,8 +6,8 @@ package updateReportConfigByEmailAddr import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/updateShareAttr/data.go b/iSolarCloud/AppService/updateShareAttr/data.go index ff432d3e6..13b2d9272 100644 --- a/iSolarCloud/AppService/updateShareAttr/data.go +++ b/iSolarCloud/AppService/updateShareAttr/data.go @@ -2,8 +2,8 @@ package updateShareAttr import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/updateShareAttr/struct.go b/iSolarCloud/AppService/updateShareAttr/struct.go index 63586d64a..fe3c80b9a 100644 --- a/iSolarCloud/AppService/updateShareAttr/struct.go +++ b/iSolarCloud/AppService/updateShareAttr/struct.go @@ -6,8 +6,8 @@ package updateShareAttr import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/updateSnIsSureFlag/data.go b/iSolarCloud/AppService/updateSnIsSureFlag/data.go index 13c089b31..685bc9273 100644 --- a/iSolarCloud/AppService/updateSnIsSureFlag/data.go +++ b/iSolarCloud/AppService/updateSnIsSureFlag/data.go @@ -2,8 +2,8 @@ package updateSnIsSureFlag import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/updateSnIsSureFlag/struct.go b/iSolarCloud/AppService/updateSnIsSureFlag/struct.go index f1e0b67ba..0211a93cf 100644 --- a/iSolarCloud/AppService/updateSnIsSureFlag/struct.go +++ b/iSolarCloud/AppService/updateSnIsSureFlag/struct.go @@ -6,8 +6,8 @@ package updateSnIsSureFlag import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/updateStationPics/data.go b/iSolarCloud/AppService/updateStationPics/data.go index f773b4ac1..0bf111e4d 100644 --- a/iSolarCloud/AppService/updateStationPics/data.go +++ b/iSolarCloud/AppService/updateStationPics/data.go @@ -2,8 +2,8 @@ package updateStationPics import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/updateStationPics/struct.go b/iSolarCloud/AppService/updateStationPics/struct.go index 33e13e427..f137679c2 100644 --- a/iSolarCloud/AppService/updateStationPics/struct.go +++ b/iSolarCloud/AppService/updateStationPics/struct.go @@ -6,8 +6,8 @@ package updateStationPics import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/updateSysAdvancedParam/data.go b/iSolarCloud/AppService/updateSysAdvancedParam/data.go index ac2e78a3f..106946ef1 100644 --- a/iSolarCloud/AppService/updateSysAdvancedParam/data.go +++ b/iSolarCloud/AppService/updateSysAdvancedParam/data.go @@ -2,8 +2,8 @@ package updateSysAdvancedParam import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/updateSysAdvancedParam/struct.go b/iSolarCloud/AppService/updateSysAdvancedParam/struct.go index 57c7b8368..ce96f568c 100644 --- a/iSolarCloud/AppService/updateSysAdvancedParam/struct.go +++ b/iSolarCloud/AppService/updateSysAdvancedParam/struct.go @@ -6,8 +6,8 @@ package updateSysAdvancedParam import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/updateSysOrgNew/data.go b/iSolarCloud/AppService/updateSysOrgNew/data.go index d73c88de6..b09c50990 100644 --- a/iSolarCloud/AppService/updateSysOrgNew/data.go +++ b/iSolarCloud/AppService/updateSysOrgNew/data.go @@ -2,8 +2,8 @@ package updateSysOrgNew import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/updateSysOrgNew/struct.go b/iSolarCloud/AppService/updateSysOrgNew/struct.go index 327728928..8cb8e5b2d 100644 --- a/iSolarCloud/AppService/updateSysOrgNew/struct.go +++ b/iSolarCloud/AppService/updateSysOrgNew/struct.go @@ -6,8 +6,8 @@ package updateSysOrgNew import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/updateTemplate/data.go b/iSolarCloud/AppService/updateTemplate/data.go index 675683c38..fa4668a53 100644 --- a/iSolarCloud/AppService/updateTemplate/data.go +++ b/iSolarCloud/AppService/updateTemplate/data.go @@ -2,8 +2,8 @@ package updateTemplate import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/updateTemplate/struct.go b/iSolarCloud/AppService/updateTemplate/struct.go index 60118d40c..c970cb5b2 100644 --- a/iSolarCloud/AppService/updateTemplate/struct.go +++ b/iSolarCloud/AppService/updateTemplate/struct.go @@ -6,8 +6,8 @@ package updateTemplate import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/updateUinfoNetEaseUser/data.go b/iSolarCloud/AppService/updateUinfoNetEaseUser/data.go index 3439458df..f13ef50e9 100644 --- a/iSolarCloud/AppService/updateUinfoNetEaseUser/data.go +++ b/iSolarCloud/AppService/updateUinfoNetEaseUser/data.go @@ -2,8 +2,8 @@ package updateUinfoNetEaseUser import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/updateUinfoNetEaseUser/struct.go b/iSolarCloud/AppService/updateUinfoNetEaseUser/struct.go index 4cdc87cef..d1b59a0ab 100644 --- a/iSolarCloud/AppService/updateUinfoNetEaseUser/struct.go +++ b/iSolarCloud/AppService/updateUinfoNetEaseUser/struct.go @@ -6,8 +6,8 @@ package updateUinfoNetEaseUser import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/updateUserExtensionAttribute/data.go b/iSolarCloud/AppService/updateUserExtensionAttribute/data.go index ba5bb82e2..ffc31f460 100644 --- a/iSolarCloud/AppService/updateUserExtensionAttribute/data.go +++ b/iSolarCloud/AppService/updateUserExtensionAttribute/data.go @@ -2,8 +2,8 @@ package updateUserExtensionAttribute import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/updateUserExtensionAttribute/struct.go b/iSolarCloud/AppService/updateUserExtensionAttribute/struct.go index c7d265415..0354bdaf5 100644 --- a/iSolarCloud/AppService/updateUserExtensionAttribute/struct.go +++ b/iSolarCloud/AppService/updateUserExtensionAttribute/struct.go @@ -6,8 +6,8 @@ package updateUserExtensionAttribute import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/updateUserLanguage/data.go b/iSolarCloud/AppService/updateUserLanguage/data.go index 4c1926a3c..d4ffd5d2e 100644 --- a/iSolarCloud/AppService/updateUserLanguage/data.go +++ b/iSolarCloud/AppService/updateUserLanguage/data.go @@ -2,8 +2,8 @@ package updateUserLanguage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/updateUserLanguage/struct.go b/iSolarCloud/AppService/updateUserLanguage/struct.go index 9c12ec84e..9291ac9a0 100644 --- a/iSolarCloud/AppService/updateUserLanguage/struct.go +++ b/iSolarCloud/AppService/updateUserLanguage/struct.go @@ -6,8 +6,8 @@ package updateUserLanguage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/updateUserPosition/data.go b/iSolarCloud/AppService/updateUserPosition/data.go index 308095ccf..3fb85a746 100644 --- a/iSolarCloud/AppService/updateUserPosition/data.go +++ b/iSolarCloud/AppService/updateUserPosition/data.go @@ -2,8 +2,8 @@ package updateUserPosition import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/updateUserPosition/struct.go b/iSolarCloud/AppService/updateUserPosition/struct.go index e1c58d09d..9c170f84e 100644 --- a/iSolarCloud/AppService/updateUserPosition/struct.go +++ b/iSolarCloud/AppService/updateUserPosition/struct.go @@ -6,8 +6,8 @@ package updateUserPosition import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/updateUserUpOrg/data.go b/iSolarCloud/AppService/updateUserUpOrg/data.go index 36ef24714..0613a73da 100644 --- a/iSolarCloud/AppService/updateUserUpOrg/data.go +++ b/iSolarCloud/AppService/updateUserUpOrg/data.go @@ -2,8 +2,8 @@ package updateUserUpOrg import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/updateUserUpOrg/struct.go b/iSolarCloud/AppService/updateUserUpOrg/struct.go index d051055b2..69442741b 100644 --- a/iSolarCloud/AppService/updateUserUpOrg/struct.go +++ b/iSolarCloud/AppService/updateUserUpOrg/struct.go @@ -6,8 +6,8 @@ package updateUserUpOrg import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/upgrade/data.go b/iSolarCloud/AppService/upgrade/data.go index b8dc0926e..266c212a0 100644 --- a/iSolarCloud/AppService/upgrade/data.go +++ b/iSolarCloud/AppService/upgrade/data.go @@ -2,8 +2,8 @@ package upgrade import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/upgrade/struct.go b/iSolarCloud/AppService/upgrade/struct.go index f8bdaa9f9..afc4f3edc 100644 --- a/iSolarCloud/AppService/upgrade/struct.go +++ b/iSolarCloud/AppService/upgrade/struct.go @@ -6,8 +6,8 @@ package upgrade import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/upgrate/data.go b/iSolarCloud/AppService/upgrate/data.go index c67b0000f..e06a608f1 100644 --- a/iSolarCloud/AppService/upgrate/data.go +++ b/iSolarCloud/AppService/upgrate/data.go @@ -2,8 +2,8 @@ package upgrate import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/upgrate/struct.go b/iSolarCloud/AppService/upgrate/struct.go index c8e3d59a8..a1c5b5f8a 100644 --- a/iSolarCloud/AppService/upgrate/struct.go +++ b/iSolarCloud/AppService/upgrate/struct.go @@ -6,8 +6,8 @@ package upgrate import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/uploadFileToOss/data.go b/iSolarCloud/AppService/uploadFileToOss/data.go index 4e6ed4202..87128af6d 100644 --- a/iSolarCloud/AppService/uploadFileToOss/data.go +++ b/iSolarCloud/AppService/uploadFileToOss/data.go @@ -2,8 +2,8 @@ package uploadFileToOss import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/uploadFileToOss/struct.go b/iSolarCloud/AppService/uploadFileToOss/struct.go index 7b5c9eeff..f1ab2adda 100644 --- a/iSolarCloud/AppService/uploadFileToOss/struct.go +++ b/iSolarCloud/AppService/uploadFileToOss/struct.go @@ -6,8 +6,8 @@ package uploadFileToOss import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/userAgreeGdprProtocol/data.go b/iSolarCloud/AppService/userAgreeGdprProtocol/data.go index 1ecfff568..33b3976b4 100644 --- a/iSolarCloud/AppService/userAgreeGdprProtocol/data.go +++ b/iSolarCloud/AppService/userAgreeGdprProtocol/data.go @@ -2,8 +2,8 @@ package userAgreeGdprProtocol import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/userAgreeGdprProtocol/struct.go b/iSolarCloud/AppService/userAgreeGdprProtocol/struct.go index 679107934..8551caa59 100644 --- a/iSolarCloud/AppService/userAgreeGdprProtocol/struct.go +++ b/iSolarCloud/AppService/userAgreeGdprProtocol/struct.go @@ -6,8 +6,8 @@ package userAgreeGdprProtocol import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/userInfoUniqueCheck/data.go b/iSolarCloud/AppService/userInfoUniqueCheck/data.go index d44ff150f..8dd7f890c 100644 --- a/iSolarCloud/AppService/userInfoUniqueCheck/data.go +++ b/iSolarCloud/AppService/userInfoUniqueCheck/data.go @@ -2,8 +2,8 @@ package userInfoUniqueCheck import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/userInfoUniqueCheck/struct.go b/iSolarCloud/AppService/userInfoUniqueCheck/struct.go index ba26eef37..4013e7a34 100644 --- a/iSolarCloud/AppService/userInfoUniqueCheck/struct.go +++ b/iSolarCloud/AppService/userInfoUniqueCheck/struct.go @@ -6,8 +6,8 @@ package userInfoUniqueCheck import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/userMailHasBound/data.go b/iSolarCloud/AppService/userMailHasBound/data.go index b10635e8b..f3f712d31 100644 --- a/iSolarCloud/AppService/userMailHasBound/data.go +++ b/iSolarCloud/AppService/userMailHasBound/data.go @@ -2,8 +2,8 @@ package userMailHasBound import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/userMailHasBound/struct.go b/iSolarCloud/AppService/userMailHasBound/struct.go index e9d0e0309..77131a35d 100644 --- a/iSolarCloud/AppService/userMailHasBound/struct.go +++ b/iSolarCloud/AppService/userMailHasBound/struct.go @@ -6,8 +6,8 @@ package userMailHasBound import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/AppService/userRegister/data.go b/iSolarCloud/AppService/userRegister/data.go index f23ecf845..3c031aaaf 100644 --- a/iSolarCloud/AppService/userRegister/data.go +++ b/iSolarCloud/AppService/userRegister/data.go @@ -2,8 +2,8 @@ package userRegister import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/AppService/userRegister/struct.go b/iSolarCloud/AppService/userRegister/struct.go index 7bc8dc8e6..c303d9c76 100644 --- a/iSolarCloud/AppService/userRegister/struct.go +++ b/iSolarCloud/AppService/userRegister/struct.go @@ -6,8 +6,8 @@ package userRegister import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/MttvScreenService/accumEnergyPsKpiData/data.go b/iSolarCloud/MttvScreenService/accumEnergyPsKpiData/data.go index e0f7e3d23..304938248 100644 --- a/iSolarCloud/MttvScreenService/accumEnergyPsKpiData/data.go +++ b/iSolarCloud/MttvScreenService/accumEnergyPsKpiData/data.go @@ -2,8 +2,8 @@ package accumEnergyPsKpiData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/MttvScreenService/accumEnergyPsKpiData/struct.go b/iSolarCloud/MttvScreenService/accumEnergyPsKpiData/struct.go index 7198a42bd..894b91156 100644 --- a/iSolarCloud/MttvScreenService/accumEnergyPsKpiData/struct.go +++ b/iSolarCloud/MttvScreenService/accumEnergyPsKpiData/struct.go @@ -6,8 +6,8 @@ package accumEnergyPsKpiData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/MttvScreenService/addBuildProgressing/data.go b/iSolarCloud/MttvScreenService/addBuildProgressing/data.go index 8dd635a96..963ab6046 100644 --- a/iSolarCloud/MttvScreenService/addBuildProgressing/data.go +++ b/iSolarCloud/MttvScreenService/addBuildProgressing/data.go @@ -2,8 +2,8 @@ package addBuildProgressing import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/MttvScreenService/addBuildProgressing/struct.go b/iSolarCloud/MttvScreenService/addBuildProgressing/struct.go index 98543730f..2154c191b 100644 --- a/iSolarCloud/MttvScreenService/addBuildProgressing/struct.go +++ b/iSolarCloud/MttvScreenService/addBuildProgressing/struct.go @@ -6,8 +6,8 @@ package addBuildProgressing import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/MttvScreenService/deleteBuildProgressing/data.go b/iSolarCloud/MttvScreenService/deleteBuildProgressing/data.go index 47ead1270..067359d67 100644 --- a/iSolarCloud/MttvScreenService/deleteBuildProgressing/data.go +++ b/iSolarCloud/MttvScreenService/deleteBuildProgressing/data.go @@ -2,8 +2,8 @@ package deleteBuildProgressing import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/MttvScreenService/deleteBuildProgressing/struct.go b/iSolarCloud/MttvScreenService/deleteBuildProgressing/struct.go index 1e7259f46..ce97d8614 100644 --- a/iSolarCloud/MttvScreenService/deleteBuildProgressing/struct.go +++ b/iSolarCloud/MttvScreenService/deleteBuildProgressing/struct.go @@ -6,8 +6,8 @@ package deleteBuildProgressing import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/MttvScreenService/energyEquivalentHoursRanking/data.go b/iSolarCloud/MttvScreenService/energyEquivalentHoursRanking/data.go index 5b7bbd02f..8eb32f53f 100644 --- a/iSolarCloud/MttvScreenService/energyEquivalentHoursRanking/data.go +++ b/iSolarCloud/MttvScreenService/energyEquivalentHoursRanking/data.go @@ -2,8 +2,8 @@ package energyEquivalentHoursRanking import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/MttvScreenService/energyEquivalentHoursRanking/struct.go b/iSolarCloud/MttvScreenService/energyEquivalentHoursRanking/struct.go index 2936e705b..f35ed02ff 100644 --- a/iSolarCloud/MttvScreenService/energyEquivalentHoursRanking/struct.go +++ b/iSolarCloud/MttvScreenService/energyEquivalentHoursRanking/struct.go @@ -6,8 +6,8 @@ package energyEquivalentHoursRanking import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/MttvScreenService/energyGetRankBySortName/data.go b/iSolarCloud/MttvScreenService/energyGetRankBySortName/data.go index 3e3034917..26d185dd5 100644 --- a/iSolarCloud/MttvScreenService/energyGetRankBySortName/data.go +++ b/iSolarCloud/MttvScreenService/energyGetRankBySortName/data.go @@ -2,8 +2,8 @@ package energyGetRankBySortName import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/MttvScreenService/energyGetRankBySortName/struct.go b/iSolarCloud/MttvScreenService/energyGetRankBySortName/struct.go index d7bd245e8..b9782c854 100644 --- a/iSolarCloud/MttvScreenService/energyGetRankBySortName/struct.go +++ b/iSolarCloud/MttvScreenService/energyGetRankBySortName/struct.go @@ -6,8 +6,8 @@ package energyGetRankBySortName import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/MttvScreenService/energyPovertyAlleviation/data.go b/iSolarCloud/MttvScreenService/energyPovertyAlleviation/data.go index a7bef66e9..ca128f7a7 100644 --- a/iSolarCloud/MttvScreenService/energyPovertyAlleviation/data.go +++ b/iSolarCloud/MttvScreenService/energyPovertyAlleviation/data.go @@ -2,8 +2,8 @@ package energyPovertyAlleviation import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/MttvScreenService/energyPovertyAlleviation/struct.go b/iSolarCloud/MttvScreenService/energyPovertyAlleviation/struct.go index 70bff60a1..dbdc291f7 100644 --- a/iSolarCloud/MttvScreenService/energyPovertyAlleviation/struct.go +++ b/iSolarCloud/MttvScreenService/energyPovertyAlleviation/struct.go @@ -6,8 +6,8 @@ package energyPovertyAlleviation import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/MttvScreenService/energyPowerGenerationTrends/data.go b/iSolarCloud/MttvScreenService/energyPowerGenerationTrends/data.go index 96c2e8e0a..42adda38c 100644 --- a/iSolarCloud/MttvScreenService/energyPowerGenerationTrends/data.go +++ b/iSolarCloud/MttvScreenService/energyPowerGenerationTrends/data.go @@ -2,8 +2,8 @@ package energyPowerGenerationTrends import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/MttvScreenService/energyPowerGenerationTrends/struct.go b/iSolarCloud/MttvScreenService/energyPowerGenerationTrends/struct.go index 0fd30f991..d82fd215d 100644 --- a/iSolarCloud/MttvScreenService/energyPowerGenerationTrends/struct.go +++ b/iSolarCloud/MttvScreenService/energyPowerGenerationTrends/struct.go @@ -6,8 +6,8 @@ package energyPowerGenerationTrends import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/MttvScreenService/findSingleStationPR/data.go b/iSolarCloud/MttvScreenService/findSingleStationPR/data.go index 78c7a16ea..c0bc5a256 100644 --- a/iSolarCloud/MttvScreenService/findSingleStationPR/data.go +++ b/iSolarCloud/MttvScreenService/findSingleStationPR/data.go @@ -2,8 +2,8 @@ package findSingleStationPR import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/MttvScreenService/findSingleStationPR/struct.go b/iSolarCloud/MttvScreenService/findSingleStationPR/struct.go index 2d5b48b11..478a49683 100644 --- a/iSolarCloud/MttvScreenService/findSingleStationPR/struct.go +++ b/iSolarCloud/MttvScreenService/findSingleStationPR/struct.go @@ -6,8 +6,8 @@ package findSingleStationPR import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/MttvScreenService/getCapabilityTrend/data.go b/iSolarCloud/MttvScreenService/getCapabilityTrend/data.go index 089aa0d7b..d9269efd6 100644 --- a/iSolarCloud/MttvScreenService/getCapabilityTrend/data.go +++ b/iSolarCloud/MttvScreenService/getCapabilityTrend/data.go @@ -2,8 +2,8 @@ package getCapabilityTrend import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/MttvScreenService/getCapabilityTrend/struct.go b/iSolarCloud/MttvScreenService/getCapabilityTrend/struct.go index 0b69eca72..0c6fc5f96 100644 --- a/iSolarCloud/MttvScreenService/getCapabilityTrend/struct.go +++ b/iSolarCloud/MttvScreenService/getCapabilityTrend/struct.go @@ -6,8 +6,8 @@ package getCapabilityTrend import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/MttvScreenService/getKpiByUserIdAndAreaCode/data.go b/iSolarCloud/MttvScreenService/getKpiByUserIdAndAreaCode/data.go index ce696cfd5..2bdcd55ff 100644 --- a/iSolarCloud/MttvScreenService/getKpiByUserIdAndAreaCode/data.go +++ b/iSolarCloud/MttvScreenService/getKpiByUserIdAndAreaCode/data.go @@ -2,8 +2,8 @@ package getKpiByUserIdAndAreaCode import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/MttvScreenService/getKpiByUserIdAndAreaCode/struct.go b/iSolarCloud/MttvScreenService/getKpiByUserIdAndAreaCode/struct.go index 26ceca7e5..94cc689f5 100644 --- a/iSolarCloud/MttvScreenService/getKpiByUserIdAndAreaCode/struct.go +++ b/iSolarCloud/MttvScreenService/getKpiByUserIdAndAreaCode/struct.go @@ -6,8 +6,8 @@ package getKpiByUserIdAndAreaCode import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/MttvScreenService/getMapByUser/data.go b/iSolarCloud/MttvScreenService/getMapByUser/data.go index 882a6ba43..84ad0148a 100644 --- a/iSolarCloud/MttvScreenService/getMapByUser/data.go +++ b/iSolarCloud/MttvScreenService/getMapByUser/data.go @@ -2,8 +2,8 @@ package getMapByUser import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/MttvScreenService/getMapByUser/struct.go b/iSolarCloud/MttvScreenService/getMapByUser/struct.go index a8f1da273..4ca00f8a4 100644 --- a/iSolarCloud/MttvScreenService/getMapByUser/struct.go +++ b/iSolarCloud/MttvScreenService/getMapByUser/struct.go @@ -6,8 +6,8 @@ package getMapByUser import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/MttvScreenService/getOrgProByUserId/data.go b/iSolarCloud/MttvScreenService/getOrgProByUserId/data.go index 64a011c5f..1691a623f 100644 --- a/iSolarCloud/MttvScreenService/getOrgProByUserId/data.go +++ b/iSolarCloud/MttvScreenService/getOrgProByUserId/data.go @@ -2,8 +2,8 @@ package getOrgProByUserId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/MttvScreenService/getOrgProByUserId/struct.go b/iSolarCloud/MttvScreenService/getOrgProByUserId/struct.go index aa65f4782..24f184412 100644 --- a/iSolarCloud/MttvScreenService/getOrgProByUserId/struct.go +++ b/iSolarCloud/MttvScreenService/getOrgProByUserId/struct.go @@ -6,8 +6,8 @@ package getOrgProByUserId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/MttvScreenService/getPlanAndActualPower/data.go b/iSolarCloud/MttvScreenService/getPlanAndActualPower/data.go index dd4a2b67d..65989a9d0 100644 --- a/iSolarCloud/MttvScreenService/getPlanAndActualPower/data.go +++ b/iSolarCloud/MttvScreenService/getPlanAndActualPower/data.go @@ -2,8 +2,8 @@ package getPlanAndActualPower import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/MttvScreenService/getPlanAndActualPower/struct.go b/iSolarCloud/MttvScreenService/getPlanAndActualPower/struct.go index c0df6251c..a96b882b2 100644 --- a/iSolarCloud/MttvScreenService/getPlanAndActualPower/struct.go +++ b/iSolarCloud/MttvScreenService/getPlanAndActualPower/struct.go @@ -6,8 +6,8 @@ package getPlanAndActualPower import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/MttvScreenService/getPsDeviceListValue/data.go b/iSolarCloud/MttvScreenService/getPsDeviceListValue/data.go index 0bbfd6416..54e126754 100644 --- a/iSolarCloud/MttvScreenService/getPsDeviceListValue/data.go +++ b/iSolarCloud/MttvScreenService/getPsDeviceListValue/data.go @@ -2,8 +2,8 @@ package getPsDeviceListValue import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/MttvScreenService/getPsDeviceListValue/struct.go b/iSolarCloud/MttvScreenService/getPsDeviceListValue/struct.go index 717cd2ab6..b0f22e2ea 100644 --- a/iSolarCloud/MttvScreenService/getPsDeviceListValue/struct.go +++ b/iSolarCloud/MttvScreenService/getPsDeviceListValue/struct.go @@ -6,8 +6,8 @@ package getPsDeviceListValue import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/MttvScreenService/getPsInfoWithJoinGridByPsId/data.go b/iSolarCloud/MttvScreenService/getPsInfoWithJoinGridByPsId/data.go index bf85040c9..ed3644c95 100644 --- a/iSolarCloud/MttvScreenService/getPsInfoWithJoinGridByPsId/data.go +++ b/iSolarCloud/MttvScreenService/getPsInfoWithJoinGridByPsId/data.go @@ -2,8 +2,8 @@ package getPsInfoWithJoinGridByPsId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/MttvScreenService/getPsInfoWithJoinGridByPsId/struct.go b/iSolarCloud/MttvScreenService/getPsInfoWithJoinGridByPsId/struct.go index 27d3c8d08..6d4156356 100644 --- a/iSolarCloud/MttvScreenService/getPsInfoWithJoinGridByPsId/struct.go +++ b/iSolarCloud/MttvScreenService/getPsInfoWithJoinGridByPsId/struct.go @@ -6,8 +6,8 @@ package getPsInfoWithJoinGridByPsId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/MttvScreenService/getPsKpiForHoursByPsId/data.go b/iSolarCloud/MttvScreenService/getPsKpiForHoursByPsId/data.go index a1c7a9b48..5c2f84032 100644 --- a/iSolarCloud/MttvScreenService/getPsKpiForHoursByPsId/data.go +++ b/iSolarCloud/MttvScreenService/getPsKpiForHoursByPsId/data.go @@ -2,8 +2,8 @@ package getPsKpiForHoursByPsId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/MttvScreenService/getPsKpiForHoursByPsId/struct.go b/iSolarCloud/MttvScreenService/getPsKpiForHoursByPsId/struct.go index c650c7e79..55edbd342 100644 --- a/iSolarCloud/MttvScreenService/getPsKpiForHoursByPsId/struct.go +++ b/iSolarCloud/MttvScreenService/getPsKpiForHoursByPsId/struct.go @@ -6,8 +6,8 @@ package getPsKpiForHoursByPsId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/MttvScreenService/getPsListByMapId/data.go b/iSolarCloud/MttvScreenService/getPsListByMapId/data.go index 2042b345e..c5fa8dca9 100644 --- a/iSolarCloud/MttvScreenService/getPsListByMapId/data.go +++ b/iSolarCloud/MttvScreenService/getPsListByMapId/data.go @@ -2,8 +2,8 @@ package getPsListByMapId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/MttvScreenService/getPsListByMapId/struct.go b/iSolarCloud/MttvScreenService/getPsListByMapId/struct.go index 0207f909d..ed8d1c7fc 100644 --- a/iSolarCloud/MttvScreenService/getPsListByMapId/struct.go +++ b/iSolarCloud/MttvScreenService/getPsListByMapId/struct.go @@ -6,8 +6,8 @@ package getPsListByMapId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/MttvScreenService/getPsListByUserIdAndAreaCode/data.go b/iSolarCloud/MttvScreenService/getPsListByUserIdAndAreaCode/data.go index 80a69eeea..b2278c219 100644 --- a/iSolarCloud/MttvScreenService/getPsListByUserIdAndAreaCode/data.go +++ b/iSolarCloud/MttvScreenService/getPsListByUserIdAndAreaCode/data.go @@ -2,8 +2,8 @@ package getPsListByUserIdAndAreaCode import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/MttvScreenService/getPsListByUserIdAndAreaCode/struct.go b/iSolarCloud/MttvScreenService/getPsListByUserIdAndAreaCode/struct.go index 45143182a..45ef3ea9f 100644 --- a/iSolarCloud/MttvScreenService/getPsListByUserIdAndAreaCode/struct.go +++ b/iSolarCloud/MttvScreenService/getPsListByUserIdAndAreaCode/struct.go @@ -6,8 +6,8 @@ package getPsListByUserIdAndAreaCode import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/MttvScreenService/getTheoryAndActualPower/data.go b/iSolarCloud/MttvScreenService/getTheoryAndActualPower/data.go index 4f994af92..b7849784a 100644 --- a/iSolarCloud/MttvScreenService/getTheoryAndActualPower/data.go +++ b/iSolarCloud/MttvScreenService/getTheoryAndActualPower/data.go @@ -2,8 +2,8 @@ package getTheoryAndActualPower import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/MttvScreenService/getTheoryAndActualPower/struct.go b/iSolarCloud/MttvScreenService/getTheoryAndActualPower/struct.go index 8fe5f43e7..7bfaf4b6c 100644 --- a/iSolarCloud/MttvScreenService/getTheoryAndActualPower/struct.go +++ b/iSolarCloud/MttvScreenService/getTheoryAndActualPower/struct.go @@ -6,8 +6,8 @@ package getTheoryAndActualPower import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/MttvScreenService/nextLevelOrgList/data.go b/iSolarCloud/MttvScreenService/nextLevelOrgList/data.go index ee1c3f8a0..96cea850e 100644 --- a/iSolarCloud/MttvScreenService/nextLevelOrgList/data.go +++ b/iSolarCloud/MttvScreenService/nextLevelOrgList/data.go @@ -2,8 +2,8 @@ package nextLevelOrgList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/MttvScreenService/nextLevelOrgList/struct.go b/iSolarCloud/MttvScreenService/nextLevelOrgList/struct.go index 162afca9b..e6d25a4c7 100644 --- a/iSolarCloud/MttvScreenService/nextLevelOrgList/struct.go +++ b/iSolarCloud/MttvScreenService/nextLevelOrgList/struct.go @@ -6,8 +6,8 @@ package nextLevelOrgList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/MttvScreenService/nextLevelOrgStatisticalDataList/data.go b/iSolarCloud/MttvScreenService/nextLevelOrgStatisticalDataList/data.go index 7ce26363c..468dfc5e8 100644 --- a/iSolarCloud/MttvScreenService/nextLevelOrgStatisticalDataList/data.go +++ b/iSolarCloud/MttvScreenService/nextLevelOrgStatisticalDataList/data.go @@ -2,8 +2,8 @@ package nextLevelOrgStatisticalDataList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/MttvScreenService/nextLevelOrgStatisticalDataList/struct.go b/iSolarCloud/MttvScreenService/nextLevelOrgStatisticalDataList/struct.go index 3bae9518c..21a8ddef3 100644 --- a/iSolarCloud/MttvScreenService/nextLevelOrgStatisticalDataList/struct.go +++ b/iSolarCloud/MttvScreenService/nextLevelOrgStatisticalDataList/struct.go @@ -6,8 +6,8 @@ package nextLevelOrgStatisticalDataList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/MttvScreenService/orgPowerReport/data.go b/iSolarCloud/MttvScreenService/orgPowerReport/data.go index 0f6e2669c..9401de971 100644 --- a/iSolarCloud/MttvScreenService/orgPowerReport/data.go +++ b/iSolarCloud/MttvScreenService/orgPowerReport/data.go @@ -2,8 +2,8 @@ package orgPowerReport import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/MttvScreenService/orgPowerReport/struct.go b/iSolarCloud/MttvScreenService/orgPowerReport/struct.go index 0520354a0..83ddaaa3c 100644 --- a/iSolarCloud/MttvScreenService/orgPowerReport/struct.go +++ b/iSolarCloud/MttvScreenService/orgPowerReport/struct.go @@ -6,8 +6,8 @@ package orgPowerReport import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/MttvScreenService/queryBuildProgressing/data.go b/iSolarCloud/MttvScreenService/queryBuildProgressing/data.go index 6865a8ee8..fae3befc4 100644 --- a/iSolarCloud/MttvScreenService/queryBuildProgressing/data.go +++ b/iSolarCloud/MttvScreenService/queryBuildProgressing/data.go @@ -2,8 +2,8 @@ package queryBuildProgressing import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/MttvScreenService/queryBuildProgressing/struct.go b/iSolarCloud/MttvScreenService/queryBuildProgressing/struct.go index e57de8ad6..68a484883 100644 --- a/iSolarCloud/MttvScreenService/queryBuildProgressing/struct.go +++ b/iSolarCloud/MttvScreenService/queryBuildProgressing/struct.go @@ -6,8 +6,8 @@ package queryBuildProgressing import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/MttvScreenService/queryBuildProgressingNew/data.go b/iSolarCloud/MttvScreenService/queryBuildProgressingNew/data.go index 320fab65f..139ce64a1 100644 --- a/iSolarCloud/MttvScreenService/queryBuildProgressingNew/data.go +++ b/iSolarCloud/MttvScreenService/queryBuildProgressingNew/data.go @@ -2,8 +2,8 @@ package queryBuildProgressingNew import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/MttvScreenService/queryBuildProgressingNew/struct.go b/iSolarCloud/MttvScreenService/queryBuildProgressingNew/struct.go index 0e5893a7e..a21c09af3 100644 --- a/iSolarCloud/MttvScreenService/queryBuildProgressingNew/struct.go +++ b/iSolarCloud/MttvScreenService/queryBuildProgressingNew/struct.go @@ -6,8 +6,8 @@ package queryBuildProgressingNew import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/MttvScreenService/queryBuildProgressingOne/data.go b/iSolarCloud/MttvScreenService/queryBuildProgressingOne/data.go index 6ea675f68..af300bc47 100644 --- a/iSolarCloud/MttvScreenService/queryBuildProgressingOne/data.go +++ b/iSolarCloud/MttvScreenService/queryBuildProgressingOne/data.go @@ -2,8 +2,8 @@ package queryBuildProgressingOne import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/MttvScreenService/queryBuildProgressingOne/struct.go b/iSolarCloud/MttvScreenService/queryBuildProgressingOne/struct.go index c5c38d8fd..f01963c1a 100644 --- a/iSolarCloud/MttvScreenService/queryBuildProgressingOne/struct.go +++ b/iSolarCloud/MttvScreenService/queryBuildProgressingOne/struct.go @@ -6,8 +6,8 @@ package queryBuildProgressingOne import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/MttvScreenService/queryNearlyTwoYearsGenAndPrft/data.go b/iSolarCloud/MttvScreenService/queryNearlyTwoYearsGenAndPrft/data.go index 3885be395..9da8b569d 100644 --- a/iSolarCloud/MttvScreenService/queryNearlyTwoYearsGenAndPrft/data.go +++ b/iSolarCloud/MttvScreenService/queryNearlyTwoYearsGenAndPrft/data.go @@ -2,8 +2,8 @@ package queryNearlyTwoYearsGenAndPrft import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/MttvScreenService/queryNearlyTwoYearsGenAndPrft/struct.go b/iSolarCloud/MttvScreenService/queryNearlyTwoYearsGenAndPrft/struct.go index 2f187f8e5..0af6114f8 100644 --- a/iSolarCloud/MttvScreenService/queryNearlyTwoYearsGenAndPrft/struct.go +++ b/iSolarCloud/MttvScreenService/queryNearlyTwoYearsGenAndPrft/struct.go @@ -6,8 +6,8 @@ package queryNearlyTwoYearsGenAndPrft import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/MttvScreenService/querySaveEnergyPsSOH/data.go b/iSolarCloud/MttvScreenService/querySaveEnergyPsSOH/data.go index c1a1b9170..35392f43e 100644 --- a/iSolarCloud/MttvScreenService/querySaveEnergyPsSOH/data.go +++ b/iSolarCloud/MttvScreenService/querySaveEnergyPsSOH/data.go @@ -2,8 +2,8 @@ package querySaveEnergyPsSOH import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/MttvScreenService/querySaveEnergyPsSOH/struct.go b/iSolarCloud/MttvScreenService/querySaveEnergyPsSOH/struct.go index a83e163a7..f3f548ea0 100644 --- a/iSolarCloud/MttvScreenService/querySaveEnergyPsSOH/struct.go +++ b/iSolarCloud/MttvScreenService/querySaveEnergyPsSOH/struct.go @@ -6,8 +6,8 @@ package querySaveEnergyPsSOH import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/MttvScreenService/queryScreenUserMdIfo/data.go b/iSolarCloud/MttvScreenService/queryScreenUserMdIfo/data.go index b01083c8f..1a134014a 100644 --- a/iSolarCloud/MttvScreenService/queryScreenUserMdIfo/data.go +++ b/iSolarCloud/MttvScreenService/queryScreenUserMdIfo/data.go @@ -2,8 +2,8 @@ package queryScreenUserMdIfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/MttvScreenService/queryScreenUserMdIfo/struct.go b/iSolarCloud/MttvScreenService/queryScreenUserMdIfo/struct.go index 3f326643d..7188a544e 100644 --- a/iSolarCloud/MttvScreenService/queryScreenUserMdIfo/struct.go +++ b/iSolarCloud/MttvScreenService/queryScreenUserMdIfo/struct.go @@ -6,8 +6,8 @@ package queryScreenUserMdIfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/MttvScreenService/saveOrUpdatePosition/data.go b/iSolarCloud/MttvScreenService/saveOrUpdatePosition/data.go index 8f4010b94..c5d14b10a 100644 --- a/iSolarCloud/MttvScreenService/saveOrUpdatePosition/data.go +++ b/iSolarCloud/MttvScreenService/saveOrUpdatePosition/data.go @@ -2,8 +2,8 @@ package saveOrUpdatePosition import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/MttvScreenService/saveOrUpdatePosition/struct.go b/iSolarCloud/MttvScreenService/saveOrUpdatePosition/struct.go index 9ed69313e..0657c55a8 100644 --- a/iSolarCloud/MttvScreenService/saveOrUpdatePosition/struct.go +++ b/iSolarCloud/MttvScreenService/saveOrUpdatePosition/struct.go @@ -6,8 +6,8 @@ package saveOrUpdatePosition import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/MttvScreenService/struct.go b/iSolarCloud/MttvScreenService/struct.go index 9dae9c8ae..4a4dda3c0 100644 --- a/iSolarCloud/MttvScreenService/struct.go +++ b/iSolarCloud/MttvScreenService/struct.go @@ -1,4 +1,4 @@ -// API endpoints pulled from the sqlite database, (./assets/interface.db), contained within the Android app com.isolarcloud.manager +// Package MttvScreenService - API endpoints pulled from the sqlite database, (./assets/interface.db), contained within the Android app com.isolarcloud.manager package MttvScreenService import ( @@ -33,7 +33,7 @@ import ( "GoSungrow/iSolarCloud/MttvScreenService/saveOrUpdatePosition" "GoSungrow/iSolarCloud/MttvScreenService/updateBuildProgressing" "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" "fmt" ) diff --git a/iSolarCloud/MttvScreenService/updateBuildProgressing/data.go b/iSolarCloud/MttvScreenService/updateBuildProgressing/data.go index bd9a7e97f..11ea0781b 100644 --- a/iSolarCloud/MttvScreenService/updateBuildProgressing/data.go +++ b/iSolarCloud/MttvScreenService/updateBuildProgressing/data.go @@ -2,8 +2,8 @@ package updateBuildProgressing import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/MttvScreenService/updateBuildProgressing/struct.go b/iSolarCloud/MttvScreenService/updateBuildProgressing/struct.go index e9510bc7c..1ce64f45d 100644 --- a/iSolarCloud/MttvScreenService/updateBuildProgressing/struct.go +++ b/iSolarCloud/MttvScreenService/updateBuildProgressing/struct.go @@ -6,8 +6,8 @@ package updateBuildProgressing import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/NullArea/NullEndpoint/data.go b/iSolarCloud/NullArea/NullEndpoint/data.go index 1c7f2c1fc..ffa6bdf40 100644 --- a/iSolarCloud/NullArea/NullEndpoint/data.go +++ b/iSolarCloud/NullArea/NullEndpoint/data.go @@ -2,8 +2,8 @@ package NullEndpoint import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -18,7 +18,7 @@ type RequestData struct { // IsValid Checks for validity of results data. func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } // Help provides more info to the user on request JSON fields. diff --git a/iSolarCloud/NullArea/NullEndpoint/struct.go b/iSolarCloud/NullArea/NullEndpoint/struct.go index f071292a7..ccd78a7fd 100644 --- a/iSolarCloud/NullArea/NullEndpoint/struct.go +++ b/iSolarCloud/NullArea/NullEndpoint/struct.go @@ -7,8 +7,8 @@ package NullEndpoint import ( "GoSungrow/Only" "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "encoding/json" "errors" "fmt" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/NullArea/struct.go b/iSolarCloud/NullArea/struct.go index 7ca05d7d9..9e6115ae2 100644 --- a/iSolarCloud/NullArea/struct.go +++ b/iSolarCloud/NullArea/struct.go @@ -3,7 +3,7 @@ package NullArea import ( "GoSungrow/iSolarCloud/NullArea/NullEndpoint" "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" "fmt" ) diff --git a/iSolarCloud/PowerPointService/queryPointDataTopOne/data.go b/iSolarCloud/PowerPointService/queryPointDataTopOne/data.go index b97608ca6..0750297bf 100644 --- a/iSolarCloud/PowerPointService/queryPointDataTopOne/data.go +++ b/iSolarCloud/PowerPointService/queryPointDataTopOne/data.go @@ -2,8 +2,8 @@ package queryPointDataTopOne import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/PowerPointService/queryPointDataTopOne/struct.go b/iSolarCloud/PowerPointService/queryPointDataTopOne/struct.go index be9676e31..2bdb4d745 100644 --- a/iSolarCloud/PowerPointService/queryPointDataTopOne/struct.go +++ b/iSolarCloud/PowerPointService/queryPointDataTopOne/struct.go @@ -6,8 +6,8 @@ package queryPointDataTopOne import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/PowerPointService/struct.go b/iSolarCloud/PowerPointService/struct.go index b34387bf1..8dba7509d 100644 --- a/iSolarCloud/PowerPointService/struct.go +++ b/iSolarCloud/PowerPointService/struct.go @@ -1,10 +1,10 @@ -// API endpoints pulled from the sqlite database, (./assets/interface.db), contained within the Android app com.isolarcloud.manager +// Package PowerPointService - API endpoints pulled from the sqlite database, (./assets/interface.db), contained within the Android app com.isolarcloud.manager package PowerPointService import ( "GoSungrow/iSolarCloud/PowerPointService/queryPointDataTopOne" "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" "fmt" ) diff --git a/iSolarCloud/WebAppService/addMaterial/data.go b/iSolarCloud/WebAppService/addMaterial/data.go index fc1791376..5bafa9629 100644 --- a/iSolarCloud/WebAppService/addMaterial/data.go +++ b/iSolarCloud/WebAppService/addMaterial/data.go @@ -2,8 +2,8 @@ package addMaterial import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/addMaterial/struct.go b/iSolarCloud/WebAppService/addMaterial/struct.go index aaf2e4518..878d00abe 100644 --- a/iSolarCloud/WebAppService/addMaterial/struct.go +++ b/iSolarCloud/WebAppService/addMaterial/struct.go @@ -6,8 +6,8 @@ package addMaterial import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/addOptTicketInfo/data.go b/iSolarCloud/WebAppService/addOptTicketInfo/data.go index 9890dcbf0..b0293883f 100644 --- a/iSolarCloud/WebAppService/addOptTicketInfo/data.go +++ b/iSolarCloud/WebAppService/addOptTicketInfo/data.go @@ -2,8 +2,8 @@ package addOptTicketInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/addOptTicketInfo/struct.go b/iSolarCloud/WebAppService/addOptTicketInfo/struct.go index bff17a76e..ef34ca77c 100644 --- a/iSolarCloud/WebAppService/addOptTicketInfo/struct.go +++ b/iSolarCloud/WebAppService/addOptTicketInfo/struct.go @@ -6,8 +6,8 @@ package addOptTicketInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/addSpareParts/data.go b/iSolarCloud/WebAppService/addSpareParts/data.go index bb3bd2d91..9f0953ea0 100644 --- a/iSolarCloud/WebAppService/addSpareParts/data.go +++ b/iSolarCloud/WebAppService/addSpareParts/data.go @@ -2,8 +2,8 @@ package addSpareParts import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/addSpareParts/struct.go b/iSolarCloud/WebAppService/addSpareParts/struct.go index 435fe3eaa..a400bc3bd 100644 --- a/iSolarCloud/WebAppService/addSpareParts/struct.go +++ b/iSolarCloud/WebAppService/addSpareParts/struct.go @@ -6,8 +6,8 @@ package addSpareParts import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/associateQueryFaultNames/data.go b/iSolarCloud/WebAppService/associateQueryFaultNames/data.go index 54b18494b..1beb1fb2e 100644 --- a/iSolarCloud/WebAppService/associateQueryFaultNames/data.go +++ b/iSolarCloud/WebAppService/associateQueryFaultNames/data.go @@ -2,8 +2,8 @@ package associateQueryFaultNames import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/associateQueryFaultNames/struct.go b/iSolarCloud/WebAppService/associateQueryFaultNames/struct.go index a337823c9..d168dcabf 100644 --- a/iSolarCloud/WebAppService/associateQueryFaultNames/struct.go +++ b/iSolarCloud/WebAppService/associateQueryFaultNames/struct.go @@ -6,8 +6,8 @@ package associateQueryFaultNames import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/auditPsDeviceCheck/data.go b/iSolarCloud/WebAppService/auditPsDeviceCheck/data.go index ef3c4ca21..5a27ef9f2 100644 --- a/iSolarCloud/WebAppService/auditPsDeviceCheck/data.go +++ b/iSolarCloud/WebAppService/auditPsDeviceCheck/data.go @@ -2,8 +2,8 @@ package auditPsDeviceCheck import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/auditPsDeviceCheck/struct.go b/iSolarCloud/WebAppService/auditPsDeviceCheck/struct.go index ebc1ac568..3d70defaf 100644 --- a/iSolarCloud/WebAppService/auditPsDeviceCheck/struct.go +++ b/iSolarCloud/WebAppService/auditPsDeviceCheck/struct.go @@ -6,8 +6,8 @@ package auditPsDeviceCheck import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/calcOutputRankByDay/data.go b/iSolarCloud/WebAppService/calcOutputRankByDay/data.go index 1a65bad95..954595990 100644 --- a/iSolarCloud/WebAppService/calcOutputRankByDay/data.go +++ b/iSolarCloud/WebAppService/calcOutputRankByDay/data.go @@ -2,8 +2,8 @@ package calcOutputRankByDay import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/calcOutputRankByDay/struct.go b/iSolarCloud/WebAppService/calcOutputRankByDay/struct.go index ae3b55997..a1c41ad0e 100644 --- a/iSolarCloud/WebAppService/calcOutputRankByDay/struct.go +++ b/iSolarCloud/WebAppService/calcOutputRankByDay/struct.go @@ -6,8 +6,8 @@ package calcOutputRankByDay import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/changeReadStatus/data.go b/iSolarCloud/WebAppService/changeReadStatus/data.go index 7826cbee6..3967907be 100644 --- a/iSolarCloud/WebAppService/changeReadStatus/data.go +++ b/iSolarCloud/WebAppService/changeReadStatus/data.go @@ -2,8 +2,8 @@ package changeReadStatus import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/changeReadStatus/struct.go b/iSolarCloud/WebAppService/changeReadStatus/struct.go index f55121d2b..b5cb1746a 100644 --- a/iSolarCloud/WebAppService/changeReadStatus/struct.go +++ b/iSolarCloud/WebAppService/changeReadStatus/struct.go @@ -6,8 +6,8 @@ package changeReadStatus import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/checkMaterialName/data.go b/iSolarCloud/WebAppService/checkMaterialName/data.go index b4cc96366..b49022981 100644 --- a/iSolarCloud/WebAppService/checkMaterialName/data.go +++ b/iSolarCloud/WebAppService/checkMaterialName/data.go @@ -2,8 +2,8 @@ package checkMaterialName import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/checkMaterialName/struct.go b/iSolarCloud/WebAppService/checkMaterialName/struct.go index e86a8d4db..f1f2107b4 100644 --- a/iSolarCloud/WebAppService/checkMaterialName/struct.go +++ b/iSolarCloud/WebAppService/checkMaterialName/struct.go @@ -6,8 +6,8 @@ package checkMaterialName import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/confirmFault/data.go b/iSolarCloud/WebAppService/confirmFault/data.go index b3a20f35b..06c3de7c8 100644 --- a/iSolarCloud/WebAppService/confirmFault/data.go +++ b/iSolarCloud/WebAppService/confirmFault/data.go @@ -2,8 +2,8 @@ package confirmFault import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/confirmFault/struct.go b/iSolarCloud/WebAppService/confirmFault/struct.go index f1eea1e0d..832a15ea0 100644 --- a/iSolarCloud/WebAppService/confirmFault/struct.go +++ b/iSolarCloud/WebAppService/confirmFault/struct.go @@ -6,8 +6,8 @@ package confirmFault import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/copeOperateTicket/data.go b/iSolarCloud/WebAppService/copeOperateTicket/data.go index 8cc6b6137..42829e285 100644 --- a/iSolarCloud/WebAppService/copeOperateTicket/data.go +++ b/iSolarCloud/WebAppService/copeOperateTicket/data.go @@ -2,8 +2,8 @@ package copeOperateTicket import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/copeOperateTicket/struct.go b/iSolarCloud/WebAppService/copeOperateTicket/struct.go index a835a90f8..b6208d8f5 100644 --- a/iSolarCloud/WebAppService/copeOperateTicket/struct.go +++ b/iSolarCloud/WebAppService/copeOperateTicket/struct.go @@ -6,8 +6,8 @@ package copeOperateTicket import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/copySecondTypeTicket/data.go b/iSolarCloud/WebAppService/copySecondTypeTicket/data.go index 48dde814b..b59c783a7 100644 --- a/iSolarCloud/WebAppService/copySecondTypeTicket/data.go +++ b/iSolarCloud/WebAppService/copySecondTypeTicket/data.go @@ -2,8 +2,8 @@ package copySecondTypeTicket import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/copySecondTypeTicket/struct.go b/iSolarCloud/WebAppService/copySecondTypeTicket/struct.go index eabf69c77..73f510f06 100644 --- a/iSolarCloud/WebAppService/copySecondTypeTicket/struct.go +++ b/iSolarCloud/WebAppService/copySecondTypeTicket/struct.go @@ -6,8 +6,8 @@ package copySecondTypeTicket import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/copyWorkTicket/data.go b/iSolarCloud/WebAppService/copyWorkTicket/data.go index 8c6f9aaa3..e8ab8dae1 100644 --- a/iSolarCloud/WebAppService/copyWorkTicket/data.go +++ b/iSolarCloud/WebAppService/copyWorkTicket/data.go @@ -2,8 +2,8 @@ package copyWorkTicket import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/copyWorkTicket/struct.go b/iSolarCloud/WebAppService/copyWorkTicket/struct.go index d01a533f2..edea2836f 100644 --- a/iSolarCloud/WebAppService/copyWorkTicket/struct.go +++ b/iSolarCloud/WebAppService/copyWorkTicket/struct.go @@ -6,8 +6,8 @@ package copyWorkTicket import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/delOptTicketInfo/data.go b/iSolarCloud/WebAppService/delOptTicketInfo/data.go index 331da61f5..c0f067823 100644 --- a/iSolarCloud/WebAppService/delOptTicketInfo/data.go +++ b/iSolarCloud/WebAppService/delOptTicketInfo/data.go @@ -2,8 +2,8 @@ package delOptTicketInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/delOptTicketInfo/struct.go b/iSolarCloud/WebAppService/delOptTicketInfo/struct.go index 372ff1db5..b6e250c64 100644 --- a/iSolarCloud/WebAppService/delOptTicketInfo/struct.go +++ b/iSolarCloud/WebAppService/delOptTicketInfo/struct.go @@ -6,8 +6,8 @@ package delOptTicketInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/deleteDuty/data.go b/iSolarCloud/WebAppService/deleteDuty/data.go index 5a2d0574b..de91ded0f 100644 --- a/iSolarCloud/WebAppService/deleteDuty/data.go +++ b/iSolarCloud/WebAppService/deleteDuty/data.go @@ -2,8 +2,8 @@ package deleteDuty import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/deleteDuty/struct.go b/iSolarCloud/WebAppService/deleteDuty/struct.go index 5d7251b7a..4af65a1de 100644 --- a/iSolarCloud/WebAppService/deleteDuty/struct.go +++ b/iSolarCloud/WebAppService/deleteDuty/struct.go @@ -6,8 +6,8 @@ package deleteDuty import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/deleteDutyMid/data.go b/iSolarCloud/WebAppService/deleteDutyMid/data.go index 268a735d4..b643be9db 100644 --- a/iSolarCloud/WebAppService/deleteDutyMid/data.go +++ b/iSolarCloud/WebAppService/deleteDutyMid/data.go @@ -2,8 +2,8 @@ package deleteDutyMid import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/deleteDutyMid/struct.go b/iSolarCloud/WebAppService/deleteDutyMid/struct.go index a89fc2844..19c148745 100644 --- a/iSolarCloud/WebAppService/deleteDutyMid/struct.go +++ b/iSolarCloud/WebAppService/deleteDutyMid/struct.go @@ -6,8 +6,8 @@ package deleteDutyMid import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/deleteMaterial/data.go b/iSolarCloud/WebAppService/deleteMaterial/data.go index f744925ee..3983b5093 100644 --- a/iSolarCloud/WebAppService/deleteMaterial/data.go +++ b/iSolarCloud/WebAppService/deleteMaterial/data.go @@ -2,8 +2,8 @@ package deleteMaterial import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/deleteMaterial/struct.go b/iSolarCloud/WebAppService/deleteMaterial/struct.go index 9b7062030..575868ee0 100644 --- a/iSolarCloud/WebAppService/deleteMaterial/struct.go +++ b/iSolarCloud/WebAppService/deleteMaterial/struct.go @@ -6,8 +6,8 @@ package deleteMaterial import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/deleteOrSharedSelfReport/data.go b/iSolarCloud/WebAppService/deleteOrSharedSelfReport/data.go index 75fcead5e..4c910f4e8 100644 --- a/iSolarCloud/WebAppService/deleteOrSharedSelfReport/data.go +++ b/iSolarCloud/WebAppService/deleteOrSharedSelfReport/data.go @@ -2,8 +2,8 @@ package deleteOrSharedSelfReport import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/deleteOrSharedSelfReport/struct.go b/iSolarCloud/WebAppService/deleteOrSharedSelfReport/struct.go index 06dd93b84..1796be019 100644 --- a/iSolarCloud/WebAppService/deleteOrSharedSelfReport/struct.go +++ b/iSolarCloud/WebAppService/deleteOrSharedSelfReport/struct.go @@ -6,8 +6,8 @@ package deleteOrSharedSelfReport import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/deleteSecondTypeTicket/data.go b/iSolarCloud/WebAppService/deleteSecondTypeTicket/data.go index c1954823d..1c13f2eb6 100644 --- a/iSolarCloud/WebAppService/deleteSecondTypeTicket/data.go +++ b/iSolarCloud/WebAppService/deleteSecondTypeTicket/data.go @@ -2,8 +2,8 @@ package deleteSecondTypeTicket import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/deleteSecondTypeTicket/struct.go b/iSolarCloud/WebAppService/deleteSecondTypeTicket/struct.go index 238f37ff2..f047f6231 100644 --- a/iSolarCloud/WebAppService/deleteSecondTypeTicket/struct.go +++ b/iSolarCloud/WebAppService/deleteSecondTypeTicket/struct.go @@ -6,8 +6,8 @@ package deleteSecondTypeTicket import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/deleteSparePartsById/data.go b/iSolarCloud/WebAppService/deleteSparePartsById/data.go index 1115afa81..25d7c9b00 100644 --- a/iSolarCloud/WebAppService/deleteSparePartsById/data.go +++ b/iSolarCloud/WebAppService/deleteSparePartsById/data.go @@ -2,8 +2,8 @@ package deleteSparePartsById import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/deleteSparePartsById/struct.go b/iSolarCloud/WebAppService/deleteSparePartsById/struct.go index 0ddb253a1..312099ba9 100644 --- a/iSolarCloud/WebAppService/deleteSparePartsById/struct.go +++ b/iSolarCloud/WebAppService/deleteSparePartsById/struct.go @@ -6,8 +6,8 @@ package deleteSparePartsById import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/deleteWorkTicket/data.go b/iSolarCloud/WebAppService/deleteWorkTicket/data.go index 8f5d54059..24f1a706f 100644 --- a/iSolarCloud/WebAppService/deleteWorkTicket/data.go +++ b/iSolarCloud/WebAppService/deleteWorkTicket/data.go @@ -2,8 +2,8 @@ package deleteWorkTicket import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/deleteWorkTicket/struct.go b/iSolarCloud/WebAppService/deleteWorkTicket/struct.go index 4e23c4364..4a348f6d7 100644 --- a/iSolarCloud/WebAppService/deleteWorkTicket/struct.go +++ b/iSolarCloud/WebAppService/deleteWorkTicket/struct.go @@ -6,8 +6,8 @@ package deleteWorkTicket import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/deviceFactoryList/data.go b/iSolarCloud/WebAppService/deviceFactoryList/data.go index 5b5776fed..26c5d850b 100644 --- a/iSolarCloud/WebAppService/deviceFactoryList/data.go +++ b/iSolarCloud/WebAppService/deviceFactoryList/data.go @@ -2,8 +2,8 @@ package deviceFactoryList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/deviceFactoryList/struct.go b/iSolarCloud/WebAppService/deviceFactoryList/struct.go index ba985cb69..58b5b0b5b 100644 --- a/iSolarCloud/WebAppService/deviceFactoryList/struct.go +++ b/iSolarCloud/WebAppService/deviceFactoryList/struct.go @@ -6,8 +6,8 @@ package deviceFactoryList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/dispartDataPageList/data.go b/iSolarCloud/WebAppService/dispartDataPageList/data.go index e6412b22d..50610a3c6 100644 --- a/iSolarCloud/WebAppService/dispartDataPageList/data.go +++ b/iSolarCloud/WebAppService/dispartDataPageList/data.go @@ -2,8 +2,8 @@ package dispartDataPageList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/dispartDataPageList/struct.go b/iSolarCloud/WebAppService/dispartDataPageList/struct.go index e7779299f..e23f41bd3 100644 --- a/iSolarCloud/WebAppService/dispartDataPageList/struct.go +++ b/iSolarCloud/WebAppService/dispartDataPageList/struct.go @@ -6,8 +6,8 @@ package dispartDataPageList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/executeTask/data.go b/iSolarCloud/WebAppService/executeTask/data.go index 4a1547a6c..8a9511763 100644 --- a/iSolarCloud/WebAppService/executeTask/data.go +++ b/iSolarCloud/WebAppService/executeTask/data.go @@ -2,8 +2,8 @@ package executeTask import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/executeTask/struct.go b/iSolarCloud/WebAppService/executeTask/struct.go index 91071d708..c0a57dbef 100644 --- a/iSolarCloud/WebAppService/executeTask/struct.go +++ b/iSolarCloud/WebAppService/executeTask/struct.go @@ -6,8 +6,8 @@ package executeTask import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/findCurrentTask/data.go b/iSolarCloud/WebAppService/findCurrentTask/data.go index 4d24e54e3..a463cb967 100644 --- a/iSolarCloud/WebAppService/findCurrentTask/data.go +++ b/iSolarCloud/WebAppService/findCurrentTask/data.go @@ -2,8 +2,8 @@ package findCurrentTask import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/findCurrentTask/struct.go b/iSolarCloud/WebAppService/findCurrentTask/struct.go index c408727d8..b90a9745c 100644 --- a/iSolarCloud/WebAppService/findCurrentTask/struct.go +++ b/iSolarCloud/WebAppService/findCurrentTask/struct.go @@ -6,8 +6,8 @@ package findCurrentTask import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/findDeviceMessageByPskey/data.go b/iSolarCloud/WebAppService/findDeviceMessageByPskey/data.go index 2fe72f321..f7756aff6 100644 --- a/iSolarCloud/WebAppService/findDeviceMessageByPskey/data.go +++ b/iSolarCloud/WebAppService/findDeviceMessageByPskey/data.go @@ -2,8 +2,8 @@ package findDeviceMessageByPskey import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/findDeviceMessageByPskey/struct.go b/iSolarCloud/WebAppService/findDeviceMessageByPskey/struct.go index 90b593127..407e131b0 100644 --- a/iSolarCloud/WebAppService/findDeviceMessageByPskey/struct.go +++ b/iSolarCloud/WebAppService/findDeviceMessageByPskey/struct.go @@ -6,8 +6,8 @@ package findDeviceMessageByPskey import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/findFactoryMessage/data.go b/iSolarCloud/WebAppService/findFactoryMessage/data.go index e3e461130..111eecac4 100644 --- a/iSolarCloud/WebAppService/findFactoryMessage/data.go +++ b/iSolarCloud/WebAppService/findFactoryMessage/data.go @@ -2,8 +2,8 @@ package findFactoryMessage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/findFactoryMessage/struct.go b/iSolarCloud/WebAppService/findFactoryMessage/struct.go index d77709c42..cc4ad37a6 100644 --- a/iSolarCloud/WebAppService/findFactoryMessage/struct.go +++ b/iSolarCloud/WebAppService/findFactoryMessage/struct.go @@ -6,8 +6,8 @@ package findFactoryMessage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/findImgResources/data.go b/iSolarCloud/WebAppService/findImgResources/data.go index b5997b446..4769cd226 100644 --- a/iSolarCloud/WebAppService/findImgResources/data.go +++ b/iSolarCloud/WebAppService/findImgResources/data.go @@ -2,8 +2,8 @@ package findImgResources import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/findImgResources/struct.go b/iSolarCloud/WebAppService/findImgResources/struct.go index 626252149..990351323 100644 --- a/iSolarCloud/WebAppService/findImgResources/struct.go +++ b/iSolarCloud/WebAppService/findImgResources/struct.go @@ -6,8 +6,8 @@ package findImgResources import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/findMateiralSubType/data.go b/iSolarCloud/WebAppService/findMateiralSubType/data.go index 06fd72e71..797526f64 100644 --- a/iSolarCloud/WebAppService/findMateiralSubType/data.go +++ b/iSolarCloud/WebAppService/findMateiralSubType/data.go @@ -2,8 +2,8 @@ package findMateiralSubType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/findMateiralSubType/struct.go b/iSolarCloud/WebAppService/findMateiralSubType/struct.go index 29290dc02..b58b35e95 100644 --- a/iSolarCloud/WebAppService/findMateiralSubType/struct.go +++ b/iSolarCloud/WebAppService/findMateiralSubType/struct.go @@ -6,8 +6,8 @@ package findMateiralSubType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/findMaterialById/data.go b/iSolarCloud/WebAppService/findMaterialById/data.go index aa7e42000..2e9c83ab6 100644 --- a/iSolarCloud/WebAppService/findMaterialById/data.go +++ b/iSolarCloud/WebAppService/findMaterialById/data.go @@ -2,8 +2,8 @@ package findMaterialById import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/findMaterialById/struct.go b/iSolarCloud/WebAppService/findMaterialById/struct.go index 0f6fe3154..88023cef7 100644 --- a/iSolarCloud/WebAppService/findMaterialById/struct.go +++ b/iSolarCloud/WebAppService/findMaterialById/struct.go @@ -6,8 +6,8 @@ package findMaterialById import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/findMyDealedCurrentTask/data.go b/iSolarCloud/WebAppService/findMyDealedCurrentTask/data.go index 7804d039d..94557d306 100644 --- a/iSolarCloud/WebAppService/findMyDealedCurrentTask/data.go +++ b/iSolarCloud/WebAppService/findMyDealedCurrentTask/data.go @@ -2,8 +2,8 @@ package findMyDealedCurrentTask import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/findMyDealedCurrentTask/struct.go b/iSolarCloud/WebAppService/findMyDealedCurrentTask/struct.go index aa64a213b..14537b642 100644 --- a/iSolarCloud/WebAppService/findMyDealedCurrentTask/struct.go +++ b/iSolarCloud/WebAppService/findMyDealedCurrentTask/struct.go @@ -6,8 +6,8 @@ package findMyDealedCurrentTask import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/findMyDealedImgResources/data.go b/iSolarCloud/WebAppService/findMyDealedImgResources/data.go index 2a004afcc..fef70007d 100644 --- a/iSolarCloud/WebAppService/findMyDealedImgResources/data.go +++ b/iSolarCloud/WebAppService/findMyDealedImgResources/data.go @@ -2,8 +2,8 @@ package findMyDealedImgResources import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/findMyDealedImgResources/struct.go b/iSolarCloud/WebAppService/findMyDealedImgResources/struct.go index f8072617f..b1facd5cb 100644 --- a/iSolarCloud/WebAppService/findMyDealedImgResources/struct.go +++ b/iSolarCloud/WebAppService/findMyDealedImgResources/struct.go @@ -6,8 +6,8 @@ package findMyDealedImgResources import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/findSeriesInverterData/data.go b/iSolarCloud/WebAppService/findSeriesInverterData/data.go index 31a601360..904f31f78 100644 --- a/iSolarCloud/WebAppService/findSeriesInverterData/data.go +++ b/iSolarCloud/WebAppService/findSeriesInverterData/data.go @@ -2,8 +2,8 @@ package findSeriesInverterData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/findSeriesInverterData/struct.go b/iSolarCloud/WebAppService/findSeriesInverterData/struct.go index 3a2ac1f7e..f89747281 100644 --- a/iSolarCloud/WebAppService/findSeriesInverterData/struct.go +++ b/iSolarCloud/WebAppService/findSeriesInverterData/struct.go @@ -6,8 +6,8 @@ package findSeriesInverterData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/findWebRole/data.go b/iSolarCloud/WebAppService/findWebRole/data.go index 81463a39d..e8c6b753b 100644 --- a/iSolarCloud/WebAppService/findWebRole/data.go +++ b/iSolarCloud/WebAppService/findWebRole/data.go @@ -2,8 +2,8 @@ package findWebRole import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/findWebRole/struct.go b/iSolarCloud/WebAppService/findWebRole/struct.go index 954438e84..ad08e55dd 100644 --- a/iSolarCloud/WebAppService/findWebRole/struct.go +++ b/iSolarCloud/WebAppService/findWebRole/struct.go @@ -6,8 +6,8 @@ package findWebRole import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getAllPsFaultCount/data.go b/iSolarCloud/WebAppService/getAllPsFaultCount/data.go index c6ee8998e..360441323 100644 --- a/iSolarCloud/WebAppService/getAllPsFaultCount/data.go +++ b/iSolarCloud/WebAppService/getAllPsFaultCount/data.go @@ -2,8 +2,8 @@ package getAllPsFaultCount import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getAllPsFaultCount/struct.go b/iSolarCloud/WebAppService/getAllPsFaultCount/struct.go index f589f9b74..df17b104c 100644 --- a/iSolarCloud/WebAppService/getAllPsFaultCount/struct.go +++ b/iSolarCloud/WebAppService/getAllPsFaultCount/struct.go @@ -6,8 +6,8 @@ package getAllPsFaultCount import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getAllPsFaultCountByUserId/data.go b/iSolarCloud/WebAppService/getAllPsFaultCountByUserId/data.go index 7947f4ea6..8605c1369 100644 --- a/iSolarCloud/WebAppService/getAllPsFaultCountByUserId/data.go +++ b/iSolarCloud/WebAppService/getAllPsFaultCountByUserId/data.go @@ -2,8 +2,8 @@ package getAllPsFaultCountByUserId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getAllPsFaultCountByUserId/struct.go b/iSolarCloud/WebAppService/getAllPsFaultCountByUserId/struct.go index 9559a008b..1002e4e06 100644 --- a/iSolarCloud/WebAppService/getAllPsFaultCountByUserId/struct.go +++ b/iSolarCloud/WebAppService/getAllPsFaultCountByUserId/struct.go @@ -6,8 +6,8 @@ package getAllPsFaultCountByUserId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getAllPsList/data.go b/iSolarCloud/WebAppService/getAllPsList/data.go index 8855699f7..5f151f3eb 100644 --- a/iSolarCloud/WebAppService/getAllPsList/data.go +++ b/iSolarCloud/WebAppService/getAllPsList/data.go @@ -2,8 +2,8 @@ package getAllPsList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getAllPsList/struct.go b/iSolarCloud/WebAppService/getAllPsList/struct.go index 7be92723f..7064c5622 100644 --- a/iSolarCloud/WebAppService/getAllPsList/struct.go +++ b/iSolarCloud/WebAppService/getAllPsList/struct.go @@ -6,8 +6,8 @@ package getAllPsList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getAllStore/data.go b/iSolarCloud/WebAppService/getAllStore/data.go index 6f60e27b1..49acbd414 100644 --- a/iSolarCloud/WebAppService/getAllStore/data.go +++ b/iSolarCloud/WebAppService/getAllStore/data.go @@ -2,8 +2,8 @@ package getAllStore import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getAllStore/struct.go b/iSolarCloud/WebAppService/getAllStore/struct.go index db3916a2b..3cab1ad09 100644 --- a/iSolarCloud/WebAppService/getAllStore/struct.go +++ b/iSolarCloud/WebAppService/getAllStore/struct.go @@ -6,8 +6,8 @@ package getAllStore import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getBaseDeviceInfo/data.go b/iSolarCloud/WebAppService/getBaseDeviceInfo/data.go index fb131c318..73236d23c 100644 --- a/iSolarCloud/WebAppService/getBaseDeviceInfo/data.go +++ b/iSolarCloud/WebAppService/getBaseDeviceInfo/data.go @@ -2,8 +2,8 @@ package getBaseDeviceInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getBaseDeviceInfo/struct.go b/iSolarCloud/WebAppService/getBaseDeviceInfo/struct.go index a13797e56..b228178df 100644 --- a/iSolarCloud/WebAppService/getBaseDeviceInfo/struct.go +++ b/iSolarCloud/WebAppService/getBaseDeviceInfo/struct.go @@ -6,8 +6,8 @@ package getBaseDeviceInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getBoxData/data.go b/iSolarCloud/WebAppService/getBoxData/data.go index 61bcc9d03..b39b0840c 100644 --- a/iSolarCloud/WebAppService/getBoxData/data.go +++ b/iSolarCloud/WebAppService/getBoxData/data.go @@ -2,8 +2,8 @@ package getBoxData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getBoxData/struct.go b/iSolarCloud/WebAppService/getBoxData/struct.go index 2196a43d8..c28803b54 100644 --- a/iSolarCloud/WebAppService/getBoxData/struct.go +++ b/iSolarCloud/WebAppService/getBoxData/struct.go @@ -6,8 +6,8 @@ package getBoxData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getCBoxTree/data.go b/iSolarCloud/WebAppService/getCBoxTree/data.go index a1bf763be..c08a0124f 100644 --- a/iSolarCloud/WebAppService/getCBoxTree/data.go +++ b/iSolarCloud/WebAppService/getCBoxTree/data.go @@ -2,8 +2,8 @@ package getCBoxTree import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getCBoxTree/struct.go b/iSolarCloud/WebAppService/getCBoxTree/struct.go index 77b85bcad..cd3f4f2aa 100644 --- a/iSolarCloud/WebAppService/getCBoxTree/struct.go +++ b/iSolarCloud/WebAppService/getCBoxTree/struct.go @@ -6,8 +6,8 @@ package getCBoxTree import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getCheckDevTypeList/data.go b/iSolarCloud/WebAppService/getCheckDevTypeList/data.go index 437a2aad2..8f72df6c4 100644 --- a/iSolarCloud/WebAppService/getCheckDevTypeList/data.go +++ b/iSolarCloud/WebAppService/getCheckDevTypeList/data.go @@ -2,8 +2,8 @@ package getCheckDevTypeList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getCheckDevTypeList/struct.go b/iSolarCloud/WebAppService/getCheckDevTypeList/struct.go index e408715ca..7b2538901 100644 --- a/iSolarCloud/WebAppService/getCheckDevTypeList/struct.go +++ b/iSolarCloud/WebAppService/getCheckDevTypeList/struct.go @@ -6,8 +6,8 @@ package getCheckDevTypeList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getCheckUserList/data.go b/iSolarCloud/WebAppService/getCheckUserList/data.go index 7467303c2..a0c6aa9b2 100644 --- a/iSolarCloud/WebAppService/getCheckUserList/data.go +++ b/iSolarCloud/WebAppService/getCheckUserList/data.go @@ -2,8 +2,8 @@ package getCheckUserList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getCheckUserList/struct.go b/iSolarCloud/WebAppService/getCheckUserList/struct.go index 106816cc4..ecfffc5fe 100644 --- a/iSolarCloud/WebAppService/getCheckUserList/struct.go +++ b/iSolarCloud/WebAppService/getCheckUserList/struct.go @@ -6,8 +6,8 @@ package getCheckUserList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getChildOrg/data.go b/iSolarCloud/WebAppService/getChildOrg/data.go index dca1ad095..12252c8ff 100644 --- a/iSolarCloud/WebAppService/getChildOrg/data.go +++ b/iSolarCloud/WebAppService/getChildOrg/data.go @@ -2,8 +2,8 @@ package getChildOrg import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getChildOrg/struct.go b/iSolarCloud/WebAppService/getChildOrg/struct.go index 2c9250ae6..321be140f 100644 --- a/iSolarCloud/WebAppService/getChildOrg/struct.go +++ b/iSolarCloud/WebAppService/getChildOrg/struct.go @@ -6,8 +6,8 @@ package getChildOrg import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getCo/data.go b/iSolarCloud/WebAppService/getCo/data.go index 4d2d017a3..088b6da3d 100644 --- a/iSolarCloud/WebAppService/getCo/data.go +++ b/iSolarCloud/WebAppService/getCo/data.go @@ -2,8 +2,8 @@ package getCo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getCo/struct.go b/iSolarCloud/WebAppService/getCo/struct.go index e2bb72f9a..1bc556aa4 100644 --- a/iSolarCloud/WebAppService/getCo/struct.go +++ b/iSolarCloud/WebAppService/getCo/struct.go @@ -6,8 +6,8 @@ package getCo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getCodeTreeMap/data.go b/iSolarCloud/WebAppService/getCodeTreeMap/data.go index 3c7da853e..b096ee89e 100644 --- a/iSolarCloud/WebAppService/getCodeTreeMap/data.go +++ b/iSolarCloud/WebAppService/getCodeTreeMap/data.go @@ -2,8 +2,8 @@ package getCodeTreeMap import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getCodeTreeMap/struct.go b/iSolarCloud/WebAppService/getCodeTreeMap/struct.go index 94d184cee..b292e9e1a 100644 --- a/iSolarCloud/WebAppService/getCodeTreeMap/struct.go +++ b/iSolarCloud/WebAppService/getCodeTreeMap/struct.go @@ -6,8 +6,8 @@ package getCodeTreeMap import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getDST/data.go b/iSolarCloud/WebAppService/getDST/data.go index 1cf4bc1ad..700ae8e7e 100644 --- a/iSolarCloud/WebAppService/getDST/data.go +++ b/iSolarCloud/WebAppService/getDST/data.go @@ -2,8 +2,8 @@ package getDST import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getDST/struct.go b/iSolarCloud/WebAppService/getDST/struct.go index 6883c5f1a..cb6fab667 100644 --- a/iSolarCloud/WebAppService/getDST/struct.go +++ b/iSolarCloud/WebAppService/getDST/struct.go @@ -6,8 +6,8 @@ package getDST import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getDataCounts/data.go b/iSolarCloud/WebAppService/getDataCounts/data.go index 990880a41..2469256c2 100644 --- a/iSolarCloud/WebAppService/getDataCounts/data.go +++ b/iSolarCloud/WebAppService/getDataCounts/data.go @@ -2,8 +2,8 @@ package getDataCounts import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getDataCounts/struct.go b/iSolarCloud/WebAppService/getDataCounts/struct.go index a2d840ef8..fd8f832f1 100644 --- a/iSolarCloud/WebAppService/getDataCounts/struct.go +++ b/iSolarCloud/WebAppService/getDataCounts/struct.go @@ -6,8 +6,8 @@ package getDataCounts import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getDataInfo/data.go b/iSolarCloud/WebAppService/getDataInfo/data.go index f2a71eeb2..56403b4ef 100644 --- a/iSolarCloud/WebAppService/getDataInfo/data.go +++ b/iSolarCloud/WebAppService/getDataInfo/data.go @@ -2,8 +2,8 @@ package getDataInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getDataInfo/struct.go b/iSolarCloud/WebAppService/getDataInfo/struct.go index 659321b52..584605d6a 100644 --- a/iSolarCloud/WebAppService/getDataInfo/struct.go +++ b/iSolarCloud/WebAppService/getDataInfo/struct.go @@ -6,8 +6,8 @@ package getDataInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getDevList/data.go b/iSolarCloud/WebAppService/getDevList/data.go index c92ab94fc..2daf8b96b 100644 --- a/iSolarCloud/WebAppService/getDevList/data.go +++ b/iSolarCloud/WebAppService/getDevList/data.go @@ -2,8 +2,8 @@ package getDevList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getDevList/struct.go b/iSolarCloud/WebAppService/getDevList/struct.go index 7103a940c..e754ad119 100644 --- a/iSolarCloud/WebAppService/getDevList/struct.go +++ b/iSolarCloud/WebAppService/getDevList/struct.go @@ -6,8 +6,8 @@ package getDevList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getDevName/data.go b/iSolarCloud/WebAppService/getDevName/data.go index d67b8e844..c18a9d05b 100644 --- a/iSolarCloud/WebAppService/getDevName/data.go +++ b/iSolarCloud/WebAppService/getDevName/data.go @@ -2,8 +2,8 @@ package getDevName import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getDevName/struct.go b/iSolarCloud/WebAppService/getDevName/struct.go index d796e778c..beb25b71c 100644 --- a/iSolarCloud/WebAppService/getDevName/struct.go +++ b/iSolarCloud/WebAppService/getDevName/struct.go @@ -6,8 +6,8 @@ package getDevName import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getDevTypeList/data.go b/iSolarCloud/WebAppService/getDevTypeList/data.go index dfc1e589b..2253d7290 100644 --- a/iSolarCloud/WebAppService/getDevTypeList/data.go +++ b/iSolarCloud/WebAppService/getDevTypeList/data.go @@ -2,8 +2,8 @@ package getDevTypeList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getDevTypeList/struct.go b/iSolarCloud/WebAppService/getDevTypeList/struct.go index 3efc202b4..dc17b8fe3 100644 --- a/iSolarCloud/WebAppService/getDevTypeList/struct.go +++ b/iSolarCloud/WebAppService/getDevTypeList/struct.go @@ -6,8 +6,8 @@ package getDevTypeList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getDeviceDataList/data.go b/iSolarCloud/WebAppService/getDeviceDataList/data.go index ad3f3dced..08464f3f1 100644 --- a/iSolarCloud/WebAppService/getDeviceDataList/data.go +++ b/iSolarCloud/WebAppService/getDeviceDataList/data.go @@ -2,8 +2,8 @@ package getDeviceDataList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getDeviceDataList/struct.go b/iSolarCloud/WebAppService/getDeviceDataList/struct.go index aa5c2be2a..0726ead0f 100644 --- a/iSolarCloud/WebAppService/getDeviceDataList/struct.go +++ b/iSolarCloud/WebAppService/getDeviceDataList/struct.go @@ -6,8 +6,8 @@ package getDeviceDataList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getDeviceFactory/data.go b/iSolarCloud/WebAppService/getDeviceFactory/data.go index 5afb450ac..d9b83a5b1 100644 --- a/iSolarCloud/WebAppService/getDeviceFactory/data.go +++ b/iSolarCloud/WebAppService/getDeviceFactory/data.go @@ -2,8 +2,8 @@ package getDeviceFactory import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getDeviceFactory/struct.go b/iSolarCloud/WebAppService/getDeviceFactory/struct.go index d168ae211..8291a006b 100644 --- a/iSolarCloud/WebAppService/getDeviceFactory/struct.go +++ b/iSolarCloud/WebAppService/getDeviceFactory/struct.go @@ -6,8 +6,8 @@ package getDeviceFactory import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getDeviceInfoForCheck/data.go b/iSolarCloud/WebAppService/getDeviceInfoForCheck/data.go index 7f11b6481..eea717d87 100644 --- a/iSolarCloud/WebAppService/getDeviceInfoForCheck/data.go +++ b/iSolarCloud/WebAppService/getDeviceInfoForCheck/data.go @@ -2,8 +2,8 @@ package getDeviceInfoForCheck import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getDeviceInfoForCheck/struct.go b/iSolarCloud/WebAppService/getDeviceInfoForCheck/struct.go index 52859738b..89448f9c8 100644 --- a/iSolarCloud/WebAppService/getDeviceInfoForCheck/struct.go +++ b/iSolarCloud/WebAppService/getDeviceInfoForCheck/struct.go @@ -6,8 +6,8 @@ package getDeviceInfoForCheck import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getDevicePointAttrs/data.go b/iSolarCloud/WebAppService/getDevicePointAttrs/data.go index d3d26d89d..ba77af420 100644 --- a/iSolarCloud/WebAppService/getDevicePointAttrs/data.go +++ b/iSolarCloud/WebAppService/getDevicePointAttrs/data.go @@ -2,8 +2,8 @@ package getDevicePointAttrs import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getDevicePointAttrs/struct.go b/iSolarCloud/WebAppService/getDevicePointAttrs/struct.go index 4b6cad21d..121254c34 100644 --- a/iSolarCloud/WebAppService/getDevicePointAttrs/struct.go +++ b/iSolarCloud/WebAppService/getDevicePointAttrs/struct.go @@ -6,8 +6,8 @@ package getDevicePointAttrs import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getDeviceTreeChild/data.go b/iSolarCloud/WebAppService/getDeviceTreeChild/data.go index 9f87e1c7d..a898b9fe6 100644 --- a/iSolarCloud/WebAppService/getDeviceTreeChild/data.go +++ b/iSolarCloud/WebAppService/getDeviceTreeChild/data.go @@ -2,8 +2,8 @@ package getDeviceTreeChild import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getDeviceTreeChild/struct.go b/iSolarCloud/WebAppService/getDeviceTreeChild/struct.go index d2ed0c746..644baf131 100644 --- a/iSolarCloud/WebAppService/getDeviceTreeChild/struct.go +++ b/iSolarCloud/WebAppService/getDeviceTreeChild/struct.go @@ -6,8 +6,8 @@ package getDeviceTreeChild import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getDeviceUuid/data.go b/iSolarCloud/WebAppService/getDeviceUuid/data.go index 6d7ac7d96..c934637f5 100644 --- a/iSolarCloud/WebAppService/getDeviceUuid/data.go +++ b/iSolarCloud/WebAppService/getDeviceUuid/data.go @@ -2,8 +2,8 @@ package getDeviceUuid import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getDeviceUuid/struct.go b/iSolarCloud/WebAppService/getDeviceUuid/struct.go index a3cac5a1a..e7fa7ca50 100644 --- a/iSolarCloud/WebAppService/getDeviceUuid/struct.go +++ b/iSolarCloud/WebAppService/getDeviceUuid/struct.go @@ -6,8 +6,8 @@ package getDeviceUuid import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getDutyInfoById/data.go b/iSolarCloud/WebAppService/getDutyInfoById/data.go index 5e3eda54c..cdc19cb90 100644 --- a/iSolarCloud/WebAppService/getDutyInfoById/data.go +++ b/iSolarCloud/WebAppService/getDutyInfoById/data.go @@ -2,8 +2,8 @@ package getDutyInfoById import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getDutyInfoById/struct.go b/iSolarCloud/WebAppService/getDutyInfoById/struct.go index 4c5b18b97..52f3bcadb 100644 --- a/iSolarCloud/WebAppService/getDutyInfoById/struct.go +++ b/iSolarCloud/WebAppService/getDutyInfoById/struct.go @@ -6,8 +6,8 @@ package getDutyInfoById import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getDutyOrgZtree/data.go b/iSolarCloud/WebAppService/getDutyOrgZtree/data.go index 418c875ff..da945dea1 100644 --- a/iSolarCloud/WebAppService/getDutyOrgZtree/data.go +++ b/iSolarCloud/WebAppService/getDutyOrgZtree/data.go @@ -2,8 +2,8 @@ package getDutyOrgZtree import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getDutyOrgZtree/struct.go b/iSolarCloud/WebAppService/getDutyOrgZtree/struct.go index 4fa0d14d1..a72979444 100644 --- a/iSolarCloud/WebAppService/getDutyOrgZtree/struct.go +++ b/iSolarCloud/WebAppService/getDutyOrgZtree/struct.go @@ -6,8 +6,8 @@ package getDutyOrgZtree import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getElecEffectList/data.go b/iSolarCloud/WebAppService/getElecEffectList/data.go index a4bff5118..ea78a2185 100644 --- a/iSolarCloud/WebAppService/getElecEffectList/data.go +++ b/iSolarCloud/WebAppService/getElecEffectList/data.go @@ -2,8 +2,8 @@ package getElecEffectList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getElecEffectList/struct.go b/iSolarCloud/WebAppService/getElecEffectList/struct.go index 1fb78822a..635c8270d 100644 --- a/iSolarCloud/WebAppService/getElecEffectList/struct.go +++ b/iSolarCloud/WebAppService/getElecEffectList/struct.go @@ -6,8 +6,8 @@ package getElecEffectList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getEnvironmentInfo/data.go b/iSolarCloud/WebAppService/getEnvironmentInfo/data.go index 47e6aa8da..dd3bf6e6a 100644 --- a/iSolarCloud/WebAppService/getEnvironmentInfo/data.go +++ b/iSolarCloud/WebAppService/getEnvironmentInfo/data.go @@ -2,8 +2,8 @@ package getEnvironmentInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getEnvironmentInfo/struct.go b/iSolarCloud/WebAppService/getEnvironmentInfo/struct.go index e1b852e64..c77e52396 100644 --- a/iSolarCloud/WebAppService/getEnvironmentInfo/struct.go +++ b/iSolarCloud/WebAppService/getEnvironmentInfo/struct.go @@ -6,8 +6,8 @@ package getEnvironmentInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getFaultList/data.go b/iSolarCloud/WebAppService/getFaultList/data.go index ec5780f60..305acae48 100644 --- a/iSolarCloud/WebAppService/getFaultList/data.go +++ b/iSolarCloud/WebAppService/getFaultList/data.go @@ -2,8 +2,8 @@ package getFaultList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getFaultList/struct.go b/iSolarCloud/WebAppService/getFaultList/struct.go index 53727089a..f61f74271 100644 --- a/iSolarCloud/WebAppService/getFaultList/struct.go +++ b/iSolarCloud/WebAppService/getFaultList/struct.go @@ -6,8 +6,8 @@ package getFaultList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getFaultName/data.go b/iSolarCloud/WebAppService/getFaultName/data.go index 764636728..f92eb142d 100644 --- a/iSolarCloud/WebAppService/getFaultName/data.go +++ b/iSolarCloud/WebAppService/getFaultName/data.go @@ -2,8 +2,8 @@ package getFaultName import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getFaultName/struct.go b/iSolarCloud/WebAppService/getFaultName/struct.go index 1948cab81..422029146 100644 --- a/iSolarCloud/WebAppService/getFaultName/struct.go +++ b/iSolarCloud/WebAppService/getFaultName/struct.go @@ -6,8 +6,8 @@ package getFaultName import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getFaultOrder/data.go b/iSolarCloud/WebAppService/getFaultOrder/data.go index 3edaaec74..8ec7c372c 100644 --- a/iSolarCloud/WebAppService/getFaultOrder/data.go +++ b/iSolarCloud/WebAppService/getFaultOrder/data.go @@ -2,8 +2,8 @@ package getFaultOrder import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getFaultOrder/struct.go b/iSolarCloud/WebAppService/getFaultOrder/struct.go index 4ce3d7046..b00e0f754 100644 --- a/iSolarCloud/WebAppService/getFaultOrder/struct.go +++ b/iSolarCloud/WebAppService/getFaultOrder/struct.go @@ -6,8 +6,8 @@ package getFaultOrder import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getFaultOrderByOrderId/data.go b/iSolarCloud/WebAppService/getFaultOrderByOrderId/data.go index 0260decfb..b71403d44 100644 --- a/iSolarCloud/WebAppService/getFaultOrderByOrderId/data.go +++ b/iSolarCloud/WebAppService/getFaultOrderByOrderId/data.go @@ -2,8 +2,8 @@ package getFaultOrderByOrderId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getFaultOrderByOrderId/struct.go b/iSolarCloud/WebAppService/getFaultOrderByOrderId/struct.go index fca92b936..7c0a276da 100644 --- a/iSolarCloud/WebAppService/getFaultOrderByOrderId/struct.go +++ b/iSolarCloud/WebAppService/getFaultOrderByOrderId/struct.go @@ -6,8 +6,8 @@ package getFaultOrderByOrderId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getFaultOrderList/data.go b/iSolarCloud/WebAppService/getFaultOrderList/data.go index 12ed9a012..929e15786 100644 --- a/iSolarCloud/WebAppService/getFaultOrderList/data.go +++ b/iSolarCloud/WebAppService/getFaultOrderList/data.go @@ -2,8 +2,8 @@ package getFaultOrderList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getFaultOrderList/struct.go b/iSolarCloud/WebAppService/getFaultOrderList/struct.go index f4fdd726c..90e1008cc 100644 --- a/iSolarCloud/WebAppService/getFaultOrderList/struct.go +++ b/iSolarCloud/WebAppService/getFaultOrderList/struct.go @@ -6,8 +6,8 @@ package getFaultOrderList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getFaultOrderStepList/data.go b/iSolarCloud/WebAppService/getFaultOrderStepList/data.go index d085b9c1b..b64f5fad2 100644 --- a/iSolarCloud/WebAppService/getFaultOrderStepList/data.go +++ b/iSolarCloud/WebAppService/getFaultOrderStepList/data.go @@ -2,8 +2,8 @@ package getFaultOrderStepList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getFaultOrderStepList/struct.go b/iSolarCloud/WebAppService/getFaultOrderStepList/struct.go index 2ebd5db75..73b6b4435 100644 --- a/iSolarCloud/WebAppService/getFaultOrderStepList/struct.go +++ b/iSolarCloud/WebAppService/getFaultOrderStepList/struct.go @@ -6,8 +6,8 @@ package getFaultOrderStepList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getHTRoleList/data.go b/iSolarCloud/WebAppService/getHTRoleList/data.go index 1fe84e128..1a4e32339 100644 --- a/iSolarCloud/WebAppService/getHTRoleList/data.go +++ b/iSolarCloud/WebAppService/getHTRoleList/data.go @@ -2,8 +2,8 @@ package getHTRoleList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getHTRoleList/struct.go b/iSolarCloud/WebAppService/getHTRoleList/struct.go index 4431698ef..507f1838b 100644 --- a/iSolarCloud/WebAppService/getHTRoleList/struct.go +++ b/iSolarCloud/WebAppService/getHTRoleList/struct.go @@ -6,8 +6,8 @@ package getHTRoleList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getHistoryComments/data.go b/iSolarCloud/WebAppService/getHistoryComments/data.go index 01d4cf196..032ab83bb 100644 --- a/iSolarCloud/WebAppService/getHistoryComments/data.go +++ b/iSolarCloud/WebAppService/getHistoryComments/data.go @@ -2,8 +2,8 @@ package getHistoryComments import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getHistoryComments/struct.go b/iSolarCloud/WebAppService/getHistoryComments/struct.go index 5f37134d5..6ff82828f 100644 --- a/iSolarCloud/WebAppService/getHistoryComments/struct.go +++ b/iSolarCloud/WebAppService/getHistoryComments/struct.go @@ -6,8 +6,8 @@ package getHistoryComments import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getInfo/data.go b/iSolarCloud/WebAppService/getInfo/data.go index cf7c5d101..4af2bc230 100644 --- a/iSolarCloud/WebAppService/getInfo/data.go +++ b/iSolarCloud/WebAppService/getInfo/data.go @@ -2,8 +2,8 @@ package getInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getInfo/struct.go b/iSolarCloud/WebAppService/getInfo/struct.go index 1de184fcc..54d4f27a3 100644 --- a/iSolarCloud/WebAppService/getInfo/struct.go +++ b/iSolarCloud/WebAppService/getInfo/struct.go @@ -6,8 +6,8 @@ package getInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getInverteTableListCount/data.go b/iSolarCloud/WebAppService/getInverteTableListCount/data.go index 9035636b9..3467aa59d 100644 --- a/iSolarCloud/WebAppService/getInverteTableListCount/data.go +++ b/iSolarCloud/WebAppService/getInverteTableListCount/data.go @@ -2,8 +2,8 @@ package getInverteTableListCount import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getInverteTableListCount/struct.go b/iSolarCloud/WebAppService/getInverteTableListCount/struct.go index 8a6d8f9da..d37e8063b 100644 --- a/iSolarCloud/WebAppService/getInverteTableListCount/struct.go +++ b/iSolarCloud/WebAppService/getInverteTableListCount/struct.go @@ -6,8 +6,8 @@ package getInverteTableListCount import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getInverterDiscreteDistributioList/data.go b/iSolarCloud/WebAppService/getInverterDiscreteDistributioList/data.go index d5ffc371d..cbcc26a59 100644 --- a/iSolarCloud/WebAppService/getInverterDiscreteDistributioList/data.go +++ b/iSolarCloud/WebAppService/getInverterDiscreteDistributioList/data.go @@ -2,8 +2,8 @@ package getInverterDiscreteDistributioList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getInverterDiscreteDistributioList/struct.go b/iSolarCloud/WebAppService/getInverterDiscreteDistributioList/struct.go index 272d95f95..bd11b3b53 100644 --- a/iSolarCloud/WebAppService/getInverterDiscreteDistributioList/struct.go +++ b/iSolarCloud/WebAppService/getInverterDiscreteDistributioList/struct.go @@ -6,8 +6,8 @@ package getInverterDiscreteDistributioList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getInverterDiscreteList/data.go b/iSolarCloud/WebAppService/getInverterDiscreteList/data.go index 2368b52a4..aabdd34ed 100644 --- a/iSolarCloud/WebAppService/getInverterDiscreteList/data.go +++ b/iSolarCloud/WebAppService/getInverterDiscreteList/data.go @@ -2,8 +2,8 @@ package getInverterDiscreteList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getInverterDiscreteList/struct.go b/iSolarCloud/WebAppService/getInverterDiscreteList/struct.go index 51bfaefb9..dd3e0999e 100644 --- a/iSolarCloud/WebAppService/getInverterDiscreteList/struct.go +++ b/iSolarCloud/WebAppService/getInverterDiscreteList/struct.go @@ -6,8 +6,8 @@ package getInverterDiscreteList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getInverterFactoryList/data.go b/iSolarCloud/WebAppService/getInverterFactoryList/data.go index 3cb95366a..047b59e1b 100644 --- a/iSolarCloud/WebAppService/getInverterFactoryList/data.go +++ b/iSolarCloud/WebAppService/getInverterFactoryList/data.go @@ -2,8 +2,8 @@ package getInverterFactoryList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getInverterFactoryList/struct.go b/iSolarCloud/WebAppService/getInverterFactoryList/struct.go index 1dced4639..8ff6b8141 100644 --- a/iSolarCloud/WebAppService/getInverterFactoryList/struct.go +++ b/iSolarCloud/WebAppService/getInverterFactoryList/struct.go @@ -6,8 +6,8 @@ package getInverterFactoryList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getInverterInfo/data.go b/iSolarCloud/WebAppService/getInverterInfo/data.go index c688b5ab7..ef4b296e9 100644 --- a/iSolarCloud/WebAppService/getInverterInfo/data.go +++ b/iSolarCloud/WebAppService/getInverterInfo/data.go @@ -2,8 +2,8 @@ package getInverterInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getInverterInfo/struct.go b/iSolarCloud/WebAppService/getInverterInfo/struct.go index e03634f52..f68f4550a 100644 --- a/iSolarCloud/WebAppService/getInverterInfo/struct.go +++ b/iSolarCloud/WebAppService/getInverterInfo/struct.go @@ -6,8 +6,8 @@ package getInverterInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getLoadCurveList/data.go b/iSolarCloud/WebAppService/getLoadCurveList/data.go index 412666efa..0b22315bb 100644 --- a/iSolarCloud/WebAppService/getLoadCurveList/data.go +++ b/iSolarCloud/WebAppService/getLoadCurveList/data.go @@ -2,8 +2,8 @@ package getLoadCurveList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getLoadCurveList/struct.go b/iSolarCloud/WebAppService/getLoadCurveList/struct.go index 3b4b3ab30..59fe4e39c 100644 --- a/iSolarCloud/WebAppService/getLoadCurveList/struct.go +++ b/iSolarCloud/WebAppService/getLoadCurveList/struct.go @@ -6,8 +6,8 @@ package getLoadCurveList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getMqttConfigInfoByAppkey/data.go b/iSolarCloud/WebAppService/getMqttConfigInfoByAppkey/data.go index 637fa7b85..d7f51e598 100644 --- a/iSolarCloud/WebAppService/getMqttConfigInfoByAppkey/data.go +++ b/iSolarCloud/WebAppService/getMqttConfigInfoByAppkey/data.go @@ -2,8 +2,8 @@ package getMqttConfigInfoByAppkey import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" @@ -24,7 +24,7 @@ type RequestData struct { // IsValid Checks for validity of results data. func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } // Help provides more info to the user on request JSON fields. @@ -93,7 +93,7 @@ func (e *ResultData) IsValid() error { // break // } // -// // @TODO - Think about providing an apiReflect function that does this automatically. +// // @TODO - Think about providing an GoStruct function that does this automatically. // _ = table.AddRow(e.Request.AppKey, "Code", e.Response.ResultData.Code) // _ = table.AddRow(e.Request.AppKey, "Mqtt Username", e.Response.ResultData.MqttUsername) // _ = table.AddRow(e.Request.AppKey, "Mqtt Password", e.Response.ResultData.MqttPassword) diff --git a/iSolarCloud/WebAppService/getMqttConfigInfoByAppkey/struct.go b/iSolarCloud/WebAppService/getMqttConfigInfoByAppkey/struct.go index 3afa08655..6b95257a8 100644 --- a/iSolarCloud/WebAppService/getMqttConfigInfoByAppkey/struct.go +++ b/iSolarCloud/WebAppService/getMqttConfigInfoByAppkey/struct.go @@ -6,8 +6,8 @@ package getMqttConfigInfoByAppkey import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getMultiPowers/data.go b/iSolarCloud/WebAppService/getMultiPowers/data.go index 3a78e3366..f2ddd35b6 100644 --- a/iSolarCloud/WebAppService/getMultiPowers/data.go +++ b/iSolarCloud/WebAppService/getMultiPowers/data.go @@ -2,8 +2,8 @@ package getMultiPowers import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getMultiPowers/struct.go b/iSolarCloud/WebAppService/getMultiPowers/struct.go index 76ccb96fd..a9787904f 100644 --- a/iSolarCloud/WebAppService/getMultiPowers/struct.go +++ b/iSolarCloud/WebAppService/getMultiPowers/struct.go @@ -6,8 +6,8 @@ package getMultiPowers import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getOndutyQuery/data.go b/iSolarCloud/WebAppService/getOndutyQuery/data.go index 947002632..bcab7f606 100644 --- a/iSolarCloud/WebAppService/getOndutyQuery/data.go +++ b/iSolarCloud/WebAppService/getOndutyQuery/data.go @@ -2,8 +2,8 @@ package getOndutyQuery import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getOndutyQuery/struct.go b/iSolarCloud/WebAppService/getOndutyQuery/struct.go index 55c377e0f..8e75e5a78 100644 --- a/iSolarCloud/WebAppService/getOndutyQuery/struct.go +++ b/iSolarCloud/WebAppService/getOndutyQuery/struct.go @@ -6,8 +6,8 @@ package getOndutyQuery import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getOperateTicketUserList/data.go b/iSolarCloud/WebAppService/getOperateTicketUserList/data.go index 364c7b9b8..9eb8dd6a0 100644 --- a/iSolarCloud/WebAppService/getOperateTicketUserList/data.go +++ b/iSolarCloud/WebAppService/getOperateTicketUserList/data.go @@ -2,8 +2,8 @@ package getOperateTicketUserList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getOperateTicketUserList/struct.go b/iSolarCloud/WebAppService/getOperateTicketUserList/struct.go index 360505d2c..647bb7b21 100644 --- a/iSolarCloud/WebAppService/getOperateTicketUserList/struct.go +++ b/iSolarCloud/WebAppService/getOperateTicketUserList/struct.go @@ -6,8 +6,8 @@ package getOperateTicketUserList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getOptTicketsAttachments/data.go b/iSolarCloud/WebAppService/getOptTicketsAttachments/data.go index 1008e8669..c125b6a4c 100644 --- a/iSolarCloud/WebAppService/getOptTicketsAttachments/data.go +++ b/iSolarCloud/WebAppService/getOptTicketsAttachments/data.go @@ -2,8 +2,8 @@ package getOptTicketsAttachments import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getOptTicketsAttachments/struct.go b/iSolarCloud/WebAppService/getOptTicketsAttachments/struct.go index b3e96d380..768ad8b5e 100644 --- a/iSolarCloud/WebAppService/getOptTicketsAttachments/struct.go +++ b/iSolarCloud/WebAppService/getOptTicketsAttachments/struct.go @@ -6,8 +6,8 @@ package getOptTicketsAttachments import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getOrderCount/data.go b/iSolarCloud/WebAppService/getOrderCount/data.go index 22934186e..10b091f14 100644 --- a/iSolarCloud/WebAppService/getOrderCount/data.go +++ b/iSolarCloud/WebAppService/getOrderCount/data.go @@ -2,8 +2,8 @@ package getOrderCount import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getOrderCount/struct.go b/iSolarCloud/WebAppService/getOrderCount/struct.go index d4d97110d..116ed5ea9 100644 --- a/iSolarCloud/WebAppService/getOrderCount/struct.go +++ b/iSolarCloud/WebAppService/getOrderCount/struct.go @@ -6,8 +6,8 @@ package getOrderCount import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getOrderData/data.go b/iSolarCloud/WebAppService/getOrderData/data.go index 8fbffdf9e..9e324f94c 100644 --- a/iSolarCloud/WebAppService/getOrderData/data.go +++ b/iSolarCloud/WebAppService/getOrderData/data.go @@ -2,8 +2,8 @@ package getOrderData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getOrderData/struct.go b/iSolarCloud/WebAppService/getOrderData/struct.go index e2ecf979c..dc7a8ecdf 100644 --- a/iSolarCloud/WebAppService/getOrderData/struct.go +++ b/iSolarCloud/WebAppService/getOrderData/struct.go @@ -6,8 +6,8 @@ package getOrderData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getOrderDataSize/data.go b/iSolarCloud/WebAppService/getOrderDataSize/data.go index c8ee9bd83..a72c3548a 100644 --- a/iSolarCloud/WebAppService/getOrderDataSize/data.go +++ b/iSolarCloud/WebAppService/getOrderDataSize/data.go @@ -2,8 +2,8 @@ package getOrderDataSize import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getOrderDataSize/struct.go b/iSolarCloud/WebAppService/getOrderDataSize/struct.go index 04a058f29..260f5e2b9 100644 --- a/iSolarCloud/WebAppService/getOrderDataSize/struct.go +++ b/iSolarCloud/WebAppService/getOrderDataSize/struct.go @@ -6,8 +6,8 @@ package getOrderDataSize import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getOrgPsEquipmentList/data.go b/iSolarCloud/WebAppService/getOrgPsEquipmentList/data.go index 1872c471d..b1dd4dbf2 100644 --- a/iSolarCloud/WebAppService/getOrgPsEquipmentList/data.go +++ b/iSolarCloud/WebAppService/getOrgPsEquipmentList/data.go @@ -2,8 +2,8 @@ package getOrgPsEquipmentList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getOrgPsEquipmentList/struct.go b/iSolarCloud/WebAppService/getOrgPsEquipmentList/struct.go index e11aba0ad..a04f2bc22 100644 --- a/iSolarCloud/WebAppService/getOrgPsEquipmentList/struct.go +++ b/iSolarCloud/WebAppService/getOrgPsEquipmentList/struct.go @@ -6,8 +6,8 @@ package getOrgPsEquipmentList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getOrgPsPowerGenerationSummaryReport/data.go b/iSolarCloud/WebAppService/getOrgPsPowerGenerationSummaryReport/data.go index a75b70565..7ef8161cd 100644 --- a/iSolarCloud/WebAppService/getOrgPsPowerGenerationSummaryReport/data.go +++ b/iSolarCloud/WebAppService/getOrgPsPowerGenerationSummaryReport/data.go @@ -2,8 +2,8 @@ package getOrgPsPowerGenerationSummaryReport import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getOrgPsPowerGenerationSummaryReport/struct.go b/iSolarCloud/WebAppService/getOrgPsPowerGenerationSummaryReport/struct.go index 0ac5275a5..599bff9f0 100644 --- a/iSolarCloud/WebAppService/getOrgPsPowerGenerationSummaryReport/struct.go +++ b/iSolarCloud/WebAppService/getOrgPsPowerGenerationSummaryReport/struct.go @@ -6,8 +6,8 @@ package getOrgPsPowerGenerationSummaryReport import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getParentUidChain/data.go b/iSolarCloud/WebAppService/getParentUidChain/data.go index 0b05e667f..06dc92105 100644 --- a/iSolarCloud/WebAppService/getParentUidChain/data.go +++ b/iSolarCloud/WebAppService/getParentUidChain/data.go @@ -2,8 +2,8 @@ package getParentUidChain import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getParentUidChain/struct.go b/iSolarCloud/WebAppService/getParentUidChain/struct.go index 969f15c00..4350c8dbb 100644 --- a/iSolarCloud/WebAppService/getParentUidChain/struct.go +++ b/iSolarCloud/WebAppService/getParentUidChain/struct.go @@ -6,8 +6,8 @@ package getParentUidChain import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getPowerKwhkwpList/data.go b/iSolarCloud/WebAppService/getPowerKwhkwpList/data.go index 17a0f4faf..fbcb4336b 100644 --- a/iSolarCloud/WebAppService/getPowerKwhkwpList/data.go +++ b/iSolarCloud/WebAppService/getPowerKwhkwpList/data.go @@ -2,8 +2,8 @@ package getPowerKwhkwpList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getPowerKwhkwpList/struct.go b/iSolarCloud/WebAppService/getPowerKwhkwpList/struct.go index 27f2be2be..07597c62a 100644 --- a/iSolarCloud/WebAppService/getPowerKwhkwpList/struct.go +++ b/iSolarCloud/WebAppService/getPowerKwhkwpList/struct.go @@ -6,8 +6,8 @@ package getPowerKwhkwpList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getPowerPrList/data.go b/iSolarCloud/WebAppService/getPowerPrList/data.go index 92021bc31..4db5e9228 100644 --- a/iSolarCloud/WebAppService/getPowerPrList/data.go +++ b/iSolarCloud/WebAppService/getPowerPrList/data.go @@ -2,8 +2,8 @@ package getPowerPrList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getPowerPrList/struct.go b/iSolarCloud/WebAppService/getPowerPrList/struct.go index 3d67a8200..e354b5ab6 100644 --- a/iSolarCloud/WebAppService/getPowerPrList/struct.go +++ b/iSolarCloud/WebAppService/getPowerPrList/struct.go @@ -6,8 +6,8 @@ package getPowerPrList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getPowerPredictionInfo/data.go b/iSolarCloud/WebAppService/getPowerPredictionInfo/data.go index 506d540c8..d04256a01 100644 --- a/iSolarCloud/WebAppService/getPowerPredictionInfo/data.go +++ b/iSolarCloud/WebAppService/getPowerPredictionInfo/data.go @@ -2,8 +2,8 @@ package getPowerPredictionInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getPowerPredictionInfo/struct.go b/iSolarCloud/WebAppService/getPowerPredictionInfo/struct.go index 2c1314dd6..2448a8873 100644 --- a/iSolarCloud/WebAppService/getPowerPredictionInfo/struct.go +++ b/iSolarCloud/WebAppService/getPowerPredictionInfo/struct.go @@ -6,8 +6,8 @@ package getPowerPredictionInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getPowerTrendDayData/data.go b/iSolarCloud/WebAppService/getPowerTrendDayData/data.go index 2704bcc0a..fc6e936c1 100644 --- a/iSolarCloud/WebAppService/getPowerTrendDayData/data.go +++ b/iSolarCloud/WebAppService/getPowerTrendDayData/data.go @@ -2,8 +2,8 @@ package getPowerTrendDayData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getPowerTrendDayData/struct.go b/iSolarCloud/WebAppService/getPowerTrendDayData/struct.go index 18edc8011..59d499ae7 100644 --- a/iSolarCloud/WebAppService/getPowerTrendDayData/struct.go +++ b/iSolarCloud/WebAppService/getPowerTrendDayData/struct.go @@ -6,8 +6,8 @@ package getPowerTrendDayData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getPowerTrendMonthData/data.go b/iSolarCloud/WebAppService/getPowerTrendMonthData/data.go index 7436d5eeb..3c90dfb1a 100644 --- a/iSolarCloud/WebAppService/getPowerTrendMonthData/data.go +++ b/iSolarCloud/WebAppService/getPowerTrendMonthData/data.go @@ -2,8 +2,8 @@ package getPowerTrendMonthData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getPowerTrendMonthData/struct.go b/iSolarCloud/WebAppService/getPowerTrendMonthData/struct.go index 964f50519..1c5b40fbc 100644 --- a/iSolarCloud/WebAppService/getPowerTrendMonthData/struct.go +++ b/iSolarCloud/WebAppService/getPowerTrendMonthData/struct.go @@ -6,8 +6,8 @@ package getPowerTrendMonthData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getPowerTrendYearData/data.go b/iSolarCloud/WebAppService/getPowerTrendYearData/data.go index eef8bd406..b60aeb77a 100644 --- a/iSolarCloud/WebAppService/getPowerTrendYearData/data.go +++ b/iSolarCloud/WebAppService/getPowerTrendYearData/data.go @@ -2,8 +2,8 @@ package getPowerTrendYearData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getPowerTrendYearData/struct.go b/iSolarCloud/WebAppService/getPowerTrendYearData/struct.go index 3a8bd68be..5a5f82a63 100644 --- a/iSolarCloud/WebAppService/getPowerTrendYearData/struct.go +++ b/iSolarCloud/WebAppService/getPowerTrendYearData/struct.go @@ -6,8 +6,8 @@ package getPowerTrendYearData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getPowerValue/data.go b/iSolarCloud/WebAppService/getPowerValue/data.go index 29eb55967..2ead50b17 100644 --- a/iSolarCloud/WebAppService/getPowerValue/data.go +++ b/iSolarCloud/WebAppService/getPowerValue/data.go @@ -2,8 +2,8 @@ package getPowerValue import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getPowerValue/struct.go b/iSolarCloud/WebAppService/getPowerValue/struct.go index ab6a28b1d..ee56363b1 100644 --- a/iSolarCloud/WebAppService/getPowerValue/struct.go +++ b/iSolarCloud/WebAppService/getPowerValue/struct.go @@ -6,8 +6,8 @@ package getPowerValue import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getPsBlock/data.go b/iSolarCloud/WebAppService/getPsBlock/data.go index 929a2d7a1..481c3ab50 100644 --- a/iSolarCloud/WebAppService/getPsBlock/data.go +++ b/iSolarCloud/WebAppService/getPsBlock/data.go @@ -2,8 +2,8 @@ package getPsBlock import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getPsBlock/struct.go b/iSolarCloud/WebAppService/getPsBlock/struct.go index 47582cd61..7285af08f 100644 --- a/iSolarCloud/WebAppService/getPsBlock/struct.go +++ b/iSolarCloud/WebAppService/getPsBlock/struct.go @@ -6,8 +6,8 @@ package getPsBlock import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getPsBlockData/data.go b/iSolarCloud/WebAppService/getPsBlockData/data.go index f0f46ee55..381b5d7cf 100644 --- a/iSolarCloud/WebAppService/getPsBlockData/data.go +++ b/iSolarCloud/WebAppService/getPsBlockData/data.go @@ -2,8 +2,8 @@ package getPsBlockData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getPsBlockData/struct.go b/iSolarCloud/WebAppService/getPsBlockData/struct.go index c6380c9cf..a5a556561 100644 --- a/iSolarCloud/WebAppService/getPsBlockData/struct.go +++ b/iSolarCloud/WebAppService/getPsBlockData/struct.go @@ -6,8 +6,8 @@ package getPsBlockData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getPsBlockTree/data.go b/iSolarCloud/WebAppService/getPsBlockTree/data.go index 91ff39380..974f3a2a5 100644 --- a/iSolarCloud/WebAppService/getPsBlockTree/data.go +++ b/iSolarCloud/WebAppService/getPsBlockTree/data.go @@ -2,8 +2,8 @@ package getPsBlockTree import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getPsBlockTree/struct.go b/iSolarCloud/WebAppService/getPsBlockTree/struct.go index 2850ea008..008c07e05 100644 --- a/iSolarCloud/WebAppService/getPsBlockTree/struct.go +++ b/iSolarCloud/WebAppService/getPsBlockTree/struct.go @@ -6,8 +6,8 @@ package getPsBlockTree import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getPsBoxListCount/data.go b/iSolarCloud/WebAppService/getPsBoxListCount/data.go index b71fc4858..b7a656545 100644 --- a/iSolarCloud/WebAppService/getPsBoxListCount/data.go +++ b/iSolarCloud/WebAppService/getPsBoxListCount/data.go @@ -2,8 +2,8 @@ package getPsBoxListCount import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getPsBoxListCount/struct.go b/iSolarCloud/WebAppService/getPsBoxListCount/struct.go index 05ea2b2e2..c93fd4866 100644 --- a/iSolarCloud/WebAppService/getPsBoxListCount/struct.go +++ b/iSolarCloud/WebAppService/getPsBoxListCount/struct.go @@ -6,8 +6,8 @@ package getPsBoxListCount import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getPsCBoxDetail/data.go b/iSolarCloud/WebAppService/getPsCBoxDetail/data.go index c80aa7c3e..3a3f52603 100644 --- a/iSolarCloud/WebAppService/getPsCBoxDetail/data.go +++ b/iSolarCloud/WebAppService/getPsCBoxDetail/data.go @@ -2,8 +2,8 @@ package getPsCBoxDetail import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getPsCBoxDetail/struct.go b/iSolarCloud/WebAppService/getPsCBoxDetail/struct.go index e42523f19..735bec0e1 100644 --- a/iSolarCloud/WebAppService/getPsCBoxDetail/struct.go +++ b/iSolarCloud/WebAppService/getPsCBoxDetail/struct.go @@ -6,8 +6,8 @@ package getPsCBoxDetail import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getPsContact/data.go b/iSolarCloud/WebAppService/getPsContact/data.go index 07b797da4..79c41d01e 100644 --- a/iSolarCloud/WebAppService/getPsContact/data.go +++ b/iSolarCloud/WebAppService/getPsContact/data.go @@ -2,8 +2,8 @@ package getPsContact import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getPsContact/struct.go b/iSolarCloud/WebAppService/getPsContact/struct.go index 17a0a0c54..5bd6d60e3 100644 --- a/iSolarCloud/WebAppService/getPsContact/struct.go +++ b/iSolarCloud/WebAppService/getPsContact/struct.go @@ -6,8 +6,8 @@ package getPsContact import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getPsDataVal/data.go b/iSolarCloud/WebAppService/getPsDataVal/data.go index fa192bdc7..3d537e0ff 100644 --- a/iSolarCloud/WebAppService/getPsDataVal/data.go +++ b/iSolarCloud/WebAppService/getPsDataVal/data.go @@ -2,8 +2,8 @@ package getPsDataVal import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getPsDataVal/struct.go b/iSolarCloud/WebAppService/getPsDataVal/struct.go index 0fc7af31b..8a15020d3 100644 --- a/iSolarCloud/WebAppService/getPsDataVal/struct.go +++ b/iSolarCloud/WebAppService/getPsDataVal/struct.go @@ -6,8 +6,8 @@ package getPsDataVal import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getPsDeviceCheckList/data.go b/iSolarCloud/WebAppService/getPsDeviceCheckList/data.go index f0265c0ef..47702d9a4 100644 --- a/iSolarCloud/WebAppService/getPsDeviceCheckList/data.go +++ b/iSolarCloud/WebAppService/getPsDeviceCheckList/data.go @@ -2,8 +2,8 @@ package getPsDeviceCheckList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getPsDeviceCheckList/struct.go b/iSolarCloud/WebAppService/getPsDeviceCheckList/struct.go index 40d309175..a20e95d30 100644 --- a/iSolarCloud/WebAppService/getPsDeviceCheckList/struct.go +++ b/iSolarCloud/WebAppService/getPsDeviceCheckList/struct.go @@ -6,8 +6,8 @@ package getPsDeviceCheckList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getPsDeviceFaultList/data.go b/iSolarCloud/WebAppService/getPsDeviceFaultList/data.go index 038c58baa..2f250ecbe 100644 --- a/iSolarCloud/WebAppService/getPsDeviceFaultList/data.go +++ b/iSolarCloud/WebAppService/getPsDeviceFaultList/data.go @@ -2,8 +2,8 @@ package getPsDeviceFaultList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getPsDeviceFaultList/struct.go b/iSolarCloud/WebAppService/getPsDeviceFaultList/struct.go index 675e241e1..f74f10162 100644 --- a/iSolarCloud/WebAppService/getPsDeviceFaultList/struct.go +++ b/iSolarCloud/WebAppService/getPsDeviceFaultList/struct.go @@ -6,8 +6,8 @@ package getPsDeviceFaultList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getPsFaultList/data.go b/iSolarCloud/WebAppService/getPsFaultList/data.go index 850ef9e81..60fcf766a 100644 --- a/iSolarCloud/WebAppService/getPsFaultList/data.go +++ b/iSolarCloud/WebAppService/getPsFaultList/data.go @@ -2,8 +2,8 @@ package getPsFaultList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getPsFaultList/struct.go b/iSolarCloud/WebAppService/getPsFaultList/struct.go index 3a4795957..2c673d94f 100644 --- a/iSolarCloud/WebAppService/getPsFaultList/struct.go +++ b/iSolarCloud/WebAppService/getPsFaultList/struct.go @@ -6,8 +6,8 @@ package getPsFaultList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getPsIdByUserId/data.go b/iSolarCloud/WebAppService/getPsIdByUserId/data.go index 2251cb4a4..96094f408 100644 --- a/iSolarCloud/WebAppService/getPsIdByUserId/data.go +++ b/iSolarCloud/WebAppService/getPsIdByUserId/data.go @@ -2,8 +2,8 @@ package getPsIdByUserId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getPsIdByUserId/struct.go b/iSolarCloud/WebAppService/getPsIdByUserId/struct.go index f45e3d5d3..5de1c38a3 100644 --- a/iSolarCloud/WebAppService/getPsIdByUserId/struct.go +++ b/iSolarCloud/WebAppService/getPsIdByUserId/struct.go @@ -6,8 +6,8 @@ package getPsIdByUserId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getPsIdState/data.go b/iSolarCloud/WebAppService/getPsIdState/data.go index 7a5ff0ced..de16b1f3b 100644 --- a/iSolarCloud/WebAppService/getPsIdState/data.go +++ b/iSolarCloud/WebAppService/getPsIdState/data.go @@ -2,8 +2,8 @@ package getPsIdState import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -46,10 +46,10 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsId.String() - entries.StructToDataMap(*e, e.Request.PsId.String(), apiReflect.NewEndPointPath(e.Request.PsId.String())) + entries.StructToDataMap(*e, e.Request.PsId.String(), GoStruct.NewEndPointPath(e.Request.PsId.String())) } return entries diff --git a/iSolarCloud/WebAppService/getPsIdState/struct.go b/iSolarCloud/WebAppService/getPsIdState/struct.go index 929bb0e00..9ba7399b5 100644 --- a/iSolarCloud/WebAppService/getPsIdState/struct.go +++ b/iSolarCloud/WebAppService/getPsIdState/struct.go @@ -6,8 +6,8 @@ package getPsIdState import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getPsList/data.go b/iSolarCloud/WebAppService/getPsList/data.go index f059ebe44..55de66f04 100644 --- a/iSolarCloud/WebAppService/getPsList/data.go +++ b/iSolarCloud/WebAppService/getPsList/data.go @@ -2,8 +2,8 @@ package getPsList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getPsList/struct.go b/iSolarCloud/WebAppService/getPsList/struct.go index 2503b3b6f..c900b0ce0 100644 --- a/iSolarCloud/WebAppService/getPsList/struct.go +++ b/iSolarCloud/WebAppService/getPsList/struct.go @@ -6,8 +6,8 @@ package getPsList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getPsListForWorkTicket/data.go b/iSolarCloud/WebAppService/getPsListForWorkTicket/data.go index 2ef0bd9c4..607264b30 100644 --- a/iSolarCloud/WebAppService/getPsListForWorkTicket/data.go +++ b/iSolarCloud/WebAppService/getPsListForWorkTicket/data.go @@ -2,8 +2,8 @@ package getPsListForWorkTicket import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getPsListForWorkTicket/struct.go b/iSolarCloud/WebAppService/getPsListForWorkTicket/struct.go index f01284d0b..203a8484f 100644 --- a/iSolarCloud/WebAppService/getPsListForWorkTicket/struct.go +++ b/iSolarCloud/WebAppService/getPsListForWorkTicket/struct.go @@ -6,8 +6,8 @@ package getPsListForWorkTicket import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getPsPictureMessage/data.go b/iSolarCloud/WebAppService/getPsPictureMessage/data.go index 838bdb74b..7f1b19cce 100644 --- a/iSolarCloud/WebAppService/getPsPictureMessage/data.go +++ b/iSolarCloud/WebAppService/getPsPictureMessage/data.go @@ -2,8 +2,8 @@ package getPsPictureMessage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getPsPictureMessage/struct.go b/iSolarCloud/WebAppService/getPsPictureMessage/struct.go index 045e3f1fd..4076caa2c 100644 --- a/iSolarCloud/WebAppService/getPsPictureMessage/struct.go +++ b/iSolarCloud/WebAppService/getPsPictureMessage/struct.go @@ -6,8 +6,8 @@ package getPsPictureMessage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getPsTicketSizeAndClockNum/data.go b/iSolarCloud/WebAppService/getPsTicketSizeAndClockNum/data.go index 2ced6b00d..84b8c6c14 100644 --- a/iSolarCloud/WebAppService/getPsTicketSizeAndClockNum/data.go +++ b/iSolarCloud/WebAppService/getPsTicketSizeAndClockNum/data.go @@ -2,8 +2,8 @@ package getPsTicketSizeAndClockNum import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getPsTicketSizeAndClockNum/struct.go b/iSolarCloud/WebAppService/getPsTicketSizeAndClockNum/struct.go index e1100aed8..a06833fcb 100644 --- a/iSolarCloud/WebAppService/getPsTicketSizeAndClockNum/struct.go +++ b/iSolarCloud/WebAppService/getPsTicketSizeAndClockNum/struct.go @@ -6,8 +6,8 @@ package getPsTicketSizeAndClockNum import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getPsTree/data.go b/iSolarCloud/WebAppService/getPsTree/data.go index fde1f2b91..5b122138b 100644 --- a/iSolarCloud/WebAppService/getPsTree/data.go +++ b/iSolarCloud/WebAppService/getPsTree/data.go @@ -2,21 +2,21 @@ package getPsTree import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" - "github.com/MickMake/GoUnify/Only" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" + "github.com/MickMake/GoUnify/Only" ) const Url = "/v1/devService/getPsTree" const Disabled = false type RequestData struct { - // DeviceType valueTypes.String `json:"device_type" required:"true"` + PsId valueTypes.PsId `json:"ps_id" required:"true"` } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -34,25 +34,6 @@ func (e *ResultData) IsValid() error { return err } -//type DecodeResultData ResultData -// -//func (e *ResultData) UnmarshalJSON(data []byte) error { -// var err error -// -// for range Only.Once { -// if len(data) == 0 { -// break -// } -// var pd DecodeResultData -// -// // Store ResultData -// _ = json.Unmarshal(data, &pd) -// e.Dummy = pd.Dummy -// } -// -// return err -//} - func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() diff --git a/iSolarCloud/WebAppService/getPsTree/struct.go b/iSolarCloud/WebAppService/getPsTree/struct.go index 2c2e4272c..f639ff408 100644 --- a/iSolarCloud/WebAppService/getPsTree/struct.go +++ b/iSolarCloud/WebAppService/getPsTree/struct.go @@ -6,8 +6,8 @@ package getPsTree import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getPsTreeChild/data.go b/iSolarCloud/WebAppService/getPsTreeChild/data.go index 81b62f410..6045b1b3b 100644 --- a/iSolarCloud/WebAppService/getPsTreeChild/data.go +++ b/iSolarCloud/WebAppService/getPsTreeChild/data.go @@ -2,8 +2,8 @@ package getPsTreeChild import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getPsTreeChild/struct.go b/iSolarCloud/WebAppService/getPsTreeChild/struct.go index 4398e489a..eccae0262 100644 --- a/iSolarCloud/WebAppService/getPsTreeChild/struct.go +++ b/iSolarCloud/WebAppService/getPsTreeChild/struct.go @@ -6,8 +6,8 @@ package getPsTreeChild import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getPsUserList/data.go b/iSolarCloud/WebAppService/getPsUserList/data.go index b49076198..dd3d75a29 100644 --- a/iSolarCloud/WebAppService/getPsUserList/data.go +++ b/iSolarCloud/WebAppService/getPsUserList/data.go @@ -2,8 +2,8 @@ package getPsUserList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getPsUserList/struct.go b/iSolarCloud/WebAppService/getPsUserList/struct.go index 438f7171f..42bff6d4a 100644 --- a/iSolarCloud/WebAppService/getPsUserList/struct.go +++ b/iSolarCloud/WebAppService/getPsUserList/struct.go @@ -6,8 +6,8 @@ package getPsUserList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getPsValue/data.go b/iSolarCloud/WebAppService/getPsValue/data.go index 3500d2f80..d2ef82497 100644 --- a/iSolarCloud/WebAppService/getPsValue/data.go +++ b/iSolarCloud/WebAppService/getPsValue/data.go @@ -2,8 +2,8 @@ package getPsValue import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getPsValue/struct.go b/iSolarCloud/WebAppService/getPsValue/struct.go index 7defd01b8..1d1caaf77 100644 --- a/iSolarCloud/WebAppService/getPsValue/struct.go +++ b/iSolarCloud/WebAppService/getPsValue/struct.go @@ -6,8 +6,8 @@ package getPsValue import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getPscSeriseData/data.go b/iSolarCloud/WebAppService/getPscSeriseData/data.go index 4790acfb7..59eb46ac2 100644 --- a/iSolarCloud/WebAppService/getPscSeriseData/data.go +++ b/iSolarCloud/WebAppService/getPscSeriseData/data.go @@ -2,8 +2,8 @@ package getPscSeriseData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getPscSeriseData/struct.go b/iSolarCloud/WebAppService/getPscSeriseData/struct.go index 88704a68c..f538fe546 100644 --- a/iSolarCloud/WebAppService/getPscSeriseData/struct.go +++ b/iSolarCloud/WebAppService/getPscSeriseData/struct.go @@ -6,8 +6,8 @@ package getPscSeriseData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getReportInfoByReportId/data.go b/iSolarCloud/WebAppService/getReportInfoByReportId/data.go index 7cd5bce6e..b5768850a 100644 --- a/iSolarCloud/WebAppService/getReportInfoByReportId/data.go +++ b/iSolarCloud/WebAppService/getReportInfoByReportId/data.go @@ -2,8 +2,8 @@ package getReportInfoByReportId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -57,10 +57,10 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.ReportId.String() - entries.StructToDataMap(*e, e.Request.ReportId.String(), apiReflect.NewEndPointPath(e.Request.ReportId.String())) + entries.StructToDataMap(*e, e.Request.ReportId.String(), GoStruct.NewEndPointPath(e.Request.ReportId.String())) } return entries diff --git a/iSolarCloud/WebAppService/getReportInfoByReportId/struct.go b/iSolarCloud/WebAppService/getReportInfoByReportId/struct.go index 866a059fd..fa5908404 100644 --- a/iSolarCloud/WebAppService/getReportInfoByReportId/struct.go +++ b/iSolarCloud/WebAppService/getReportInfoByReportId/struct.go @@ -6,8 +6,8 @@ package getReportInfoByReportId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getReportListByType/data.go b/iSolarCloud/WebAppService/getReportListByType/data.go index 06f7e0133..961e4f594 100644 --- a/iSolarCloud/WebAppService/getReportListByType/data.go +++ b/iSolarCloud/WebAppService/getReportListByType/data.go @@ -2,8 +2,8 @@ package getReportListByType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -52,7 +52,7 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.DateId.Format(valueTypes.DateTimeLayoutDay) entries.StructToDataMap(*e, "system", nil) diff --git a/iSolarCloud/WebAppService/getReportListByType/struct.go b/iSolarCloud/WebAppService/getReportListByType/struct.go index 9f4c5f934..5447feef9 100644 --- a/iSolarCloud/WebAppService/getReportListByType/struct.go +++ b/iSolarCloud/WebAppService/getReportListByType/struct.go @@ -6,8 +6,8 @@ package getReportListByType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getReportPsTree/data.go b/iSolarCloud/WebAppService/getReportPsTree/data.go index 547118c3b..0ed0b2856 100644 --- a/iSolarCloud/WebAppService/getReportPsTree/data.go +++ b/iSolarCloud/WebAppService/getReportPsTree/data.go @@ -2,8 +2,8 @@ package getReportPsTree import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -17,7 +17,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -39,7 +39,7 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.DateId.Format(valueTypes.DateTimeLayoutDay) entries.StructToDataMap(*e, "system", nil) diff --git a/iSolarCloud/WebAppService/getReportPsTree/struct.go b/iSolarCloud/WebAppService/getReportPsTree/struct.go index feb9fe65c..d4ee50ee6 100644 --- a/iSolarCloud/WebAppService/getReportPsTree/struct.go +++ b/iSolarCloud/WebAppService/getReportPsTree/struct.go @@ -6,8 +6,8 @@ package getReportPsTree import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getRoleList/data.go b/iSolarCloud/WebAppService/getRoleList/data.go index 34bb97a74..3bcb31da0 100644 --- a/iSolarCloud/WebAppService/getRoleList/data.go +++ b/iSolarCloud/WebAppService/getRoleList/data.go @@ -2,8 +2,8 @@ package getRoleList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getRoleList/struct.go b/iSolarCloud/WebAppService/getRoleList/struct.go index c6fd82f02..718080da1 100644 --- a/iSolarCloud/WebAppService/getRoleList/struct.go +++ b/iSolarCloud/WebAppService/getRoleList/struct.go @@ -6,8 +6,8 @@ package getRoleList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getSafeEffectList/data.go b/iSolarCloud/WebAppService/getSafeEffectList/data.go index a437a8d52..49bcee021 100644 --- a/iSolarCloud/WebAppService/getSafeEffectList/data.go +++ b/iSolarCloud/WebAppService/getSafeEffectList/data.go @@ -2,8 +2,8 @@ package getSafeEffectList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getSafeEffectList/struct.go b/iSolarCloud/WebAppService/getSafeEffectList/struct.go index 94977b877..c1f371584 100644 --- a/iSolarCloud/WebAppService/getSafeEffectList/struct.go +++ b/iSolarCloud/WebAppService/getSafeEffectList/struct.go @@ -6,8 +6,8 @@ package getSafeEffectList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getSecondTypeTicketList/data.go b/iSolarCloud/WebAppService/getSecondTypeTicketList/data.go index 00dfb7cdc..296e0b21b 100644 --- a/iSolarCloud/WebAppService/getSecondTypeTicketList/data.go +++ b/iSolarCloud/WebAppService/getSecondTypeTicketList/data.go @@ -2,8 +2,8 @@ package getSecondTypeTicketList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getSecondTypeTicketList/struct.go b/iSolarCloud/WebAppService/getSecondTypeTicketList/struct.go index 9bcf76f44..e4f65d153 100644 --- a/iSolarCloud/WebAppService/getSecondTypeTicketList/struct.go +++ b/iSolarCloud/WebAppService/getSecondTypeTicketList/struct.go @@ -6,8 +6,8 @@ package getSecondTypeTicketList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getSecondTypeTicketListForTicketDetail/data.go b/iSolarCloud/WebAppService/getSecondTypeTicketListForTicketDetail/data.go index 8729a25bb..85da94d2b 100644 --- a/iSolarCloud/WebAppService/getSecondTypeTicketListForTicketDetail/data.go +++ b/iSolarCloud/WebAppService/getSecondTypeTicketListForTicketDetail/data.go @@ -2,8 +2,8 @@ package getSecondTypeTicketListForTicketDetail import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getSecondTypeTicketListForTicketDetail/struct.go b/iSolarCloud/WebAppService/getSecondTypeTicketListForTicketDetail/struct.go index a9bee2c18..5d074dac4 100644 --- a/iSolarCloud/WebAppService/getSecondTypeTicketListForTicketDetail/struct.go +++ b/iSolarCloud/WebAppService/getSecondTypeTicketListForTicketDetail/struct.go @@ -6,8 +6,8 @@ package getSecondTypeTicketListForTicketDetail import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getSelfReportPoint/data.go b/iSolarCloud/WebAppService/getSelfReportPoint/data.go index f939ec5d4..585c9c2fe 100644 --- a/iSolarCloud/WebAppService/getSelfReportPoint/data.go +++ b/iSolarCloud/WebAppService/getSelfReportPoint/data.go @@ -2,8 +2,8 @@ package getSelfReportPoint import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getSelfReportPoint/struct.go b/iSolarCloud/WebAppService/getSelfReportPoint/struct.go index 55e21b77f..b1d282a77 100644 --- a/iSolarCloud/WebAppService/getSelfReportPoint/struct.go +++ b/iSolarCloud/WebAppService/getSelfReportPoint/struct.go @@ -6,8 +6,8 @@ package getSelfReportPoint import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getSparePartsDetail/data.go b/iSolarCloud/WebAppService/getSparePartsDetail/data.go index b64312b87..85726808b 100644 --- a/iSolarCloud/WebAppService/getSparePartsDetail/data.go +++ b/iSolarCloud/WebAppService/getSparePartsDetail/data.go @@ -2,8 +2,8 @@ package getSparePartsDetail import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getSparePartsDetail/struct.go b/iSolarCloud/WebAppService/getSparePartsDetail/struct.go index a8627b6ee..c3afb4cfe 100644 --- a/iSolarCloud/WebAppService/getSparePartsDetail/struct.go +++ b/iSolarCloud/WebAppService/getSparePartsDetail/struct.go @@ -6,8 +6,8 @@ package getSparePartsDetail import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getStatementList/data.go b/iSolarCloud/WebAppService/getStatementList/data.go index 50d02ba18..168861153 100644 --- a/iSolarCloud/WebAppService/getStatementList/data.go +++ b/iSolarCloud/WebAppService/getStatementList/data.go @@ -2,8 +2,8 @@ package getStatementList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getStatementList/struct.go b/iSolarCloud/WebAppService/getStatementList/struct.go index 5ebef5fec..7abc33231 100644 --- a/iSolarCloud/WebAppService/getStatementList/struct.go +++ b/iSolarCloud/WebAppService/getStatementList/struct.go @@ -6,8 +6,8 @@ package getStatementList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getStoreByStationId/data.go b/iSolarCloud/WebAppService/getStoreByStationId/data.go index d421bba9f..a85f2b694 100644 --- a/iSolarCloud/WebAppService/getStoreByStationId/data.go +++ b/iSolarCloud/WebAppService/getStoreByStationId/data.go @@ -2,8 +2,8 @@ package getStoreByStationId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getStoreByStationId/struct.go b/iSolarCloud/WebAppService/getStoreByStationId/struct.go index 177ff923a..4912a6150 100644 --- a/iSolarCloud/WebAppService/getStoreByStationId/struct.go +++ b/iSolarCloud/WebAppService/getStoreByStationId/struct.go @@ -6,8 +6,8 @@ package getStoreByStationId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getSysUserList/data.go b/iSolarCloud/WebAppService/getSysUserList/data.go index 148fd1282..f259c1b67 100644 --- a/iSolarCloud/WebAppService/getSysUserList/data.go +++ b/iSolarCloud/WebAppService/getSysUserList/data.go @@ -2,8 +2,8 @@ package getSysUserList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getSysUserList/struct.go b/iSolarCloud/WebAppService/getSysUserList/struct.go index 603d85331..1f3e658dd 100644 --- a/iSolarCloud/WebAppService/getSysUserList/struct.go +++ b/iSolarCloud/WebAppService/getSysUserList/struct.go @@ -6,8 +6,8 @@ package getSysUserList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getTableList/data.go b/iSolarCloud/WebAppService/getTableList/data.go index 8db1fca8d..05bf0a726 100644 --- a/iSolarCloud/WebAppService/getTableList/data.go +++ b/iSolarCloud/WebAppService/getTableList/data.go @@ -2,8 +2,8 @@ package getTableList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getTableList/struct.go b/iSolarCloud/WebAppService/getTableList/struct.go index b6eb566d4..c0832da39 100644 --- a/iSolarCloud/WebAppService/getTableList/struct.go +++ b/iSolarCloud/WebAppService/getTableList/struct.go @@ -6,8 +6,8 @@ package getTableList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getUserList/data.go b/iSolarCloud/WebAppService/getUserList/data.go index d7d905da2..96c496e78 100644 --- a/iSolarCloud/WebAppService/getUserList/data.go +++ b/iSolarCloud/WebAppService/getUserList/data.go @@ -2,8 +2,8 @@ package getUserList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getUserList/struct.go b/iSolarCloud/WebAppService/getUserList/struct.go index 6595bc3c2..32ce66a28 100644 --- a/iSolarCloud/WebAppService/getUserList/struct.go +++ b/iSolarCloud/WebAppService/getUserList/struct.go @@ -6,8 +6,8 @@ package getUserList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getWeather/data.go b/iSolarCloud/WebAppService/getWeather/data.go index f8928514d..62515e605 100644 --- a/iSolarCloud/WebAppService/getWeather/data.go +++ b/iSolarCloud/WebAppService/getWeather/data.go @@ -2,8 +2,8 @@ package getWeather import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getWeather/struct.go b/iSolarCloud/WebAppService/getWeather/struct.go index e82d550bd..5466a92f4 100644 --- a/iSolarCloud/WebAppService/getWeather/struct.go +++ b/iSolarCloud/WebAppService/getWeather/struct.go @@ -6,8 +6,8 @@ package getWeather import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getWorkTicketList/data.go b/iSolarCloud/WebAppService/getWorkTicketList/data.go index c7db4de83..fb6219a55 100644 --- a/iSolarCloud/WebAppService/getWorkTicketList/data.go +++ b/iSolarCloud/WebAppService/getWorkTicketList/data.go @@ -2,8 +2,8 @@ package getWorkTicketList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getWorkTicketList/struct.go b/iSolarCloud/WebAppService/getWorkTicketList/struct.go index 834734d90..c732e5e69 100644 --- a/iSolarCloud/WebAppService/getWorkTicketList/struct.go +++ b/iSolarCloud/WebAppService/getWorkTicketList/struct.go @@ -6,8 +6,8 @@ package getWorkTicketList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getWorkTicketListForTicketDetail/data.go b/iSolarCloud/WebAppService/getWorkTicketListForTicketDetail/data.go index e9391c49b..217c986c1 100644 --- a/iSolarCloud/WebAppService/getWorkTicketListForTicketDetail/data.go +++ b/iSolarCloud/WebAppService/getWorkTicketListForTicketDetail/data.go @@ -2,8 +2,8 @@ package getWorkTicketListForTicketDetail import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getWorkTicketListForTicketDetail/struct.go b/iSolarCloud/WebAppService/getWorkTicketListForTicketDetail/struct.go index 97cb6dbca..b44a8416e 100644 --- a/iSolarCloud/WebAppService/getWorkTicketListForTicketDetail/struct.go +++ b/iSolarCloud/WebAppService/getWorkTicketListForTicketDetail/struct.go @@ -6,8 +6,8 @@ package getWorkTicketListForTicketDetail import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getWorkTicketRunningCount/data.go b/iSolarCloud/WebAppService/getWorkTicketRunningCount/data.go index f232d67e1..3cdadc9f2 100644 --- a/iSolarCloud/WebAppService/getWorkTicketRunningCount/data.go +++ b/iSolarCloud/WebAppService/getWorkTicketRunningCount/data.go @@ -2,8 +2,8 @@ package getWorkTicketRunningCount import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getWorkTicketRunningCount/struct.go b/iSolarCloud/WebAppService/getWorkTicketRunningCount/struct.go index 49f18762a..be433f943 100644 --- a/iSolarCloud/WebAppService/getWorkTicketRunningCount/struct.go +++ b/iSolarCloud/WebAppService/getWorkTicketRunningCount/struct.go @@ -6,8 +6,8 @@ package getWorkTicketRunningCount import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getWorkTicketUserList/data.go b/iSolarCloud/WebAppService/getWorkTicketUserList/data.go index 767bea7f8..dbd3e0807 100644 --- a/iSolarCloud/WebAppService/getWorkTicketUserList/data.go +++ b/iSolarCloud/WebAppService/getWorkTicketUserList/data.go @@ -2,8 +2,8 @@ package getWorkTicketUserList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getWorkTicketUserList/struct.go b/iSolarCloud/WebAppService/getWorkTicketUserList/struct.go index d8584d792..71607baf9 100644 --- a/iSolarCloud/WebAppService/getWorkTicketUserList/struct.go +++ b/iSolarCloud/WebAppService/getWorkTicketUserList/struct.go @@ -6,8 +6,8 @@ package getWorkTicketUserList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getinverterType/data.go b/iSolarCloud/WebAppService/getinverterType/data.go index 3daf196bd..f3a89cbfd 100644 --- a/iSolarCloud/WebAppService/getinverterType/data.go +++ b/iSolarCloud/WebAppService/getinverterType/data.go @@ -2,8 +2,8 @@ package getinverterType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getinverterType/struct.go b/iSolarCloud/WebAppService/getinverterType/struct.go index 466c3bc05..237097bda 100644 --- a/iSolarCloud/WebAppService/getinverterType/struct.go +++ b/iSolarCloud/WebAppService/getinverterType/struct.go @@ -6,8 +6,8 @@ package getinverterType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/getreportPermissionByUser/data.go b/iSolarCloud/WebAppService/getreportPermissionByUser/data.go index 65d27fa63..ed26e7a63 100644 --- a/iSolarCloud/WebAppService/getreportPermissionByUser/data.go +++ b/iSolarCloud/WebAppService/getreportPermissionByUser/data.go @@ -2,8 +2,8 @@ package getreportPermissionByUser import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/getreportPermissionByUser/struct.go b/iSolarCloud/WebAppService/getreportPermissionByUser/struct.go index bf9555edb..eb471b4ac 100644 --- a/iSolarCloud/WebAppService/getreportPermissionByUser/struct.go +++ b/iSolarCloud/WebAppService/getreportPermissionByUser/struct.go @@ -6,8 +6,8 @@ package getreportPermissionByUser import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/handleValue/data.go b/iSolarCloud/WebAppService/handleValue/data.go index 90eb81717..e53522a5f 100644 --- a/iSolarCloud/WebAppService/handleValue/data.go +++ b/iSolarCloud/WebAppService/handleValue/data.go @@ -2,8 +2,8 @@ package handleValue import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/handleValue/struct.go b/iSolarCloud/WebAppService/handleValue/struct.go index 25d9aa440..da9dc6e07 100644 --- a/iSolarCloud/WebAppService/handleValue/struct.go +++ b/iSolarCloud/WebAppService/handleValue/struct.go @@ -6,8 +6,8 @@ package handleValue import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/modifyDeviceInfo/data.go b/iSolarCloud/WebAppService/modifyDeviceInfo/data.go index 1ba0f960b..90af6793a 100644 --- a/iSolarCloud/WebAppService/modifyDeviceInfo/data.go +++ b/iSolarCloud/WebAppService/modifyDeviceInfo/data.go @@ -2,8 +2,8 @@ package modifyDeviceInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/modifyDeviceInfo/struct.go b/iSolarCloud/WebAppService/modifyDeviceInfo/struct.go index 5b511c4e4..af2902b2f 100644 --- a/iSolarCloud/WebAppService/modifyDeviceInfo/struct.go +++ b/iSolarCloud/WebAppService/modifyDeviceInfo/struct.go @@ -6,8 +6,8 @@ package modifyDeviceInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/operaStoreSpareParts/data.go b/iSolarCloud/WebAppService/operaStoreSpareParts/data.go index 7661df942..97152e852 100644 --- a/iSolarCloud/WebAppService/operaStoreSpareParts/data.go +++ b/iSolarCloud/WebAppService/operaStoreSpareParts/data.go @@ -2,8 +2,8 @@ package operaStoreSpareParts import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/operaStoreSpareParts/struct.go b/iSolarCloud/WebAppService/operaStoreSpareParts/struct.go index 22c102024..263542cb9 100644 --- a/iSolarCloud/WebAppService/operaStoreSpareParts/struct.go +++ b/iSolarCloud/WebAppService/operaStoreSpareParts/struct.go @@ -6,8 +6,8 @@ package operaStoreSpareParts import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/operateBillTransferToUser/data.go b/iSolarCloud/WebAppService/operateBillTransferToUser/data.go index 6de3050b0..197bf1d12 100644 --- a/iSolarCloud/WebAppService/operateBillTransferToUser/data.go +++ b/iSolarCloud/WebAppService/operateBillTransferToUser/data.go @@ -2,8 +2,8 @@ package operateBillTransferToUser import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/operateBillTransferToUser/struct.go b/iSolarCloud/WebAppService/operateBillTransferToUser/struct.go index eb523e5c9..84f673c36 100644 --- a/iSolarCloud/WebAppService/operateBillTransferToUser/struct.go +++ b/iSolarCloud/WebAppService/operateBillTransferToUser/struct.go @@ -6,8 +6,8 @@ package operateBillTransferToUser import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/queryAllStockInventory/data.go b/iSolarCloud/WebAppService/queryAllStockInventory/data.go index 1f4ffa6a4..73ff35322 100644 --- a/iSolarCloud/WebAppService/queryAllStockInventory/data.go +++ b/iSolarCloud/WebAppService/queryAllStockInventory/data.go @@ -2,8 +2,8 @@ package queryAllStockInventory import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/queryAllStockInventory/struct.go b/iSolarCloud/WebAppService/queryAllStockInventory/struct.go index 8e9ad7c41..317d247fc 100644 --- a/iSolarCloud/WebAppService/queryAllStockInventory/struct.go +++ b/iSolarCloud/WebAppService/queryAllStockInventory/struct.go @@ -6,8 +6,8 @@ package queryAllStockInventory import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/queryBatteryBoardsList/data.go b/iSolarCloud/WebAppService/queryBatteryBoardsList/data.go index 74679e424..62bb226d8 100644 --- a/iSolarCloud/WebAppService/queryBatteryBoardsList/data.go +++ b/iSolarCloud/WebAppService/queryBatteryBoardsList/data.go @@ -2,8 +2,8 @@ package queryBatteryBoardsList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -38,10 +38,10 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsId.String() - entries.StructToDataMap(*e, e.Request.PsId.String(), apiReflect.NewEndPointPath(e.Request.PsId.String())) + entries.StructToDataMap(*e, e.Request.PsId.String(), GoStruct.NewEndPointPath(e.Request.PsId.String())) } return entries diff --git a/iSolarCloud/WebAppService/queryBatteryBoardsList/struct.go b/iSolarCloud/WebAppService/queryBatteryBoardsList/struct.go index 8f54b7bfa..e73e11e53 100644 --- a/iSolarCloud/WebAppService/queryBatteryBoardsList/struct.go +++ b/iSolarCloud/WebAppService/queryBatteryBoardsList/struct.go @@ -6,8 +6,8 @@ package queryBatteryBoardsList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/queryBatteryBoardsPointsData/data.go b/iSolarCloud/WebAppService/queryBatteryBoardsPointsData/data.go index b8962031c..d74c8703a 100644 --- a/iSolarCloud/WebAppService/queryBatteryBoardsPointsData/data.go +++ b/iSolarCloud/WebAppService/queryBatteryBoardsPointsData/data.go @@ -2,8 +2,8 @@ package queryBatteryBoardsPointsData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/queryBatteryBoardsPointsData/struct.go b/iSolarCloud/WebAppService/queryBatteryBoardsPointsData/struct.go index 64eab7903..b8f414fc6 100644 --- a/iSolarCloud/WebAppService/queryBatteryBoardsPointsData/struct.go +++ b/iSolarCloud/WebAppService/queryBatteryBoardsPointsData/struct.go @@ -6,8 +6,8 @@ package queryBatteryBoardsPointsData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/queryCodeByType/data.go b/iSolarCloud/WebAppService/queryCodeByType/data.go index 5c9fd216f..2bc4f7ac0 100644 --- a/iSolarCloud/WebAppService/queryCodeByType/data.go +++ b/iSolarCloud/WebAppService/queryCodeByType/data.go @@ -2,8 +2,8 @@ package queryCodeByType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/queryCodeByType/struct.go b/iSolarCloud/WebAppService/queryCodeByType/struct.go index e5f506f99..ec0cce98f 100644 --- a/iSolarCloud/WebAppService/queryCodeByType/struct.go +++ b/iSolarCloud/WebAppService/queryCodeByType/struct.go @@ -6,8 +6,8 @@ package queryCodeByType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/queryDeviceInfoList/data.go b/iSolarCloud/WebAppService/queryDeviceInfoList/data.go index 65e5c41df..876ab4759 100644 --- a/iSolarCloud/WebAppService/queryDeviceInfoList/data.go +++ b/iSolarCloud/WebAppService/queryDeviceInfoList/data.go @@ -2,8 +2,8 @@ package queryDeviceInfoList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/queryDeviceInfoList/struct.go b/iSolarCloud/WebAppService/queryDeviceInfoList/struct.go index e4a3eec1e..ebaec9805 100644 --- a/iSolarCloud/WebAppService/queryDeviceInfoList/struct.go +++ b/iSolarCloud/WebAppService/queryDeviceInfoList/struct.go @@ -6,8 +6,8 @@ package queryDeviceInfoList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/queryElectricityCalendarData/data.go b/iSolarCloud/WebAppService/queryElectricityCalendarData/data.go index 496722807..e4278757f 100644 --- a/iSolarCloud/WebAppService/queryElectricityCalendarData/data.go +++ b/iSolarCloud/WebAppService/queryElectricityCalendarData/data.go @@ -2,8 +2,8 @@ package queryElectricityCalendarData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/queryElectricityCalendarData/struct.go b/iSolarCloud/WebAppService/queryElectricityCalendarData/struct.go index 43af6077a..5b140f57b 100644 --- a/iSolarCloud/WebAppService/queryElectricityCalendarData/struct.go +++ b/iSolarCloud/WebAppService/queryElectricityCalendarData/struct.go @@ -6,8 +6,8 @@ package queryElectricityCalendarData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/queryFaultCodes/data.go b/iSolarCloud/WebAppService/queryFaultCodes/data.go index d42b1bcd7..f5f5a8ec9 100644 --- a/iSolarCloud/WebAppService/queryFaultCodes/data.go +++ b/iSolarCloud/WebAppService/queryFaultCodes/data.go @@ -2,8 +2,8 @@ package queryFaultCodes import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -38,7 +38,7 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsId.String() entries.StructToDataMap(*e, "system", nil) diff --git a/iSolarCloud/WebAppService/queryFaultCodes/struct.go b/iSolarCloud/WebAppService/queryFaultCodes/struct.go index cd803a668..93fae6cc2 100644 --- a/iSolarCloud/WebAppService/queryFaultCodes/struct.go +++ b/iSolarCloud/WebAppService/queryFaultCodes/struct.go @@ -6,8 +6,8 @@ package queryFaultCodes import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/queryFaultLevelAndType/data.go b/iSolarCloud/WebAppService/queryFaultLevelAndType/data.go index 22309e97a..9089706e6 100644 --- a/iSolarCloud/WebAppService/queryFaultLevelAndType/data.go +++ b/iSolarCloud/WebAppService/queryFaultLevelAndType/data.go @@ -2,8 +2,8 @@ package queryFaultLevelAndType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/queryFaultLevelAndType/struct.go b/iSolarCloud/WebAppService/queryFaultLevelAndType/struct.go index dc12f7b70..0fd1b8e80 100644 --- a/iSolarCloud/WebAppService/queryFaultLevelAndType/struct.go +++ b/iSolarCloud/WebAppService/queryFaultLevelAndType/struct.go @@ -6,8 +6,8 @@ package queryFaultLevelAndType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/queryFaultNames/data.go b/iSolarCloud/WebAppService/queryFaultNames/data.go index 829739e5d..b09a085e6 100644 --- a/iSolarCloud/WebAppService/queryFaultNames/data.go +++ b/iSolarCloud/WebAppService/queryFaultNames/data.go @@ -2,8 +2,8 @@ package queryFaultNames import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/queryFaultNames/struct.go b/iSolarCloud/WebAppService/queryFaultNames/struct.go index dada3758c..fa3bbba3f 100644 --- a/iSolarCloud/WebAppService/queryFaultNames/struct.go +++ b/iSolarCloud/WebAppService/queryFaultNames/struct.go @@ -6,8 +6,8 @@ package queryFaultNames import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/queryMaterialType/data.go b/iSolarCloud/WebAppService/queryMaterialType/data.go index 8aacb519e..f44191043 100644 --- a/iSolarCloud/WebAppService/queryMaterialType/data.go +++ b/iSolarCloud/WebAppService/queryMaterialType/data.go @@ -2,8 +2,8 @@ package queryMaterialType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/queryMaterialType/struct.go b/iSolarCloud/WebAppService/queryMaterialType/struct.go index 1c8fbb2eb..dd3167d63 100644 --- a/iSolarCloud/WebAppService/queryMaterialType/struct.go +++ b/iSolarCloud/WebAppService/queryMaterialType/struct.go @@ -6,8 +6,8 @@ package queryMaterialType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/queryNounAndKlgList/data.go b/iSolarCloud/WebAppService/queryNounAndKlgList/data.go index 3ba599105..d5ec54319 100644 --- a/iSolarCloud/WebAppService/queryNounAndKlgList/data.go +++ b/iSolarCloud/WebAppService/queryNounAndKlgList/data.go @@ -2,8 +2,8 @@ package queryNounAndKlgList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/queryNounAndKlgList/struct.go b/iSolarCloud/WebAppService/queryNounAndKlgList/struct.go index 86bdf5987..b80d4062c 100644 --- a/iSolarCloud/WebAppService/queryNounAndKlgList/struct.go +++ b/iSolarCloud/WebAppService/queryNounAndKlgList/struct.go @@ -6,8 +6,8 @@ package queryNounAndKlgList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/queryNounList/data.go b/iSolarCloud/WebAppService/queryNounList/data.go index 37671db11..be11ec919 100644 --- a/iSolarCloud/WebAppService/queryNounList/data.go +++ b/iSolarCloud/WebAppService/queryNounList/data.go @@ -2,8 +2,8 @@ package queryNounList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -38,7 +38,7 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsId.String() entries.StructToDataMap(*e, "system", nil) diff --git a/iSolarCloud/WebAppService/queryNounList/struct.go b/iSolarCloud/WebAppService/queryNounList/struct.go index 1c0babddf..b5da95c7d 100644 --- a/iSolarCloud/WebAppService/queryNounList/struct.go +++ b/iSolarCloud/WebAppService/queryNounList/struct.go @@ -6,8 +6,8 @@ package queryNounList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/queryOptTickctInfo/data.go b/iSolarCloud/WebAppService/queryOptTickctInfo/data.go index 14d5f8f04..c214647e7 100644 --- a/iSolarCloud/WebAppService/queryOptTickctInfo/data.go +++ b/iSolarCloud/WebAppService/queryOptTickctInfo/data.go @@ -2,8 +2,8 @@ package queryOptTickctInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/queryOptTickctInfo/struct.go b/iSolarCloud/WebAppService/queryOptTickctInfo/struct.go index 73f8eeafd..357d22848 100644 --- a/iSolarCloud/WebAppService/queryOptTickctInfo/struct.go +++ b/iSolarCloud/WebAppService/queryOptTickctInfo/struct.go @@ -6,8 +6,8 @@ package queryOptTickctInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/queryOrgIdByUser/data.go b/iSolarCloud/WebAppService/queryOrgIdByUser/data.go index 532313d7a..a54245886 100644 --- a/iSolarCloud/WebAppService/queryOrgIdByUser/data.go +++ b/iSolarCloud/WebAppService/queryOrgIdByUser/data.go @@ -2,8 +2,8 @@ package queryOrgIdByUser import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/queryOrgIdByUser/struct.go b/iSolarCloud/WebAppService/queryOrgIdByUser/struct.go index 0bfe87129..23cafd4de 100644 --- a/iSolarCloud/WebAppService/queryOrgIdByUser/struct.go +++ b/iSolarCloud/WebAppService/queryOrgIdByUser/struct.go @@ -6,8 +6,8 @@ package queryOrgIdByUser import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/queryPsCountryList/data.go b/iSolarCloud/WebAppService/queryPsCountryList/data.go index 9026c8642..719a96118 100644 --- a/iSolarCloud/WebAppService/queryPsCountryList/data.go +++ b/iSolarCloud/WebAppService/queryPsCountryList/data.go @@ -2,8 +2,8 @@ package queryPsCountryList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/queryPsCountryList/struct.go b/iSolarCloud/WebAppService/queryPsCountryList/struct.go index e04d56b2f..d640120ff 100644 --- a/iSolarCloud/WebAppService/queryPsCountryList/struct.go +++ b/iSolarCloud/WebAppService/queryPsCountryList/struct.go @@ -6,8 +6,8 @@ package queryPsCountryList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/queryPsProvcnList/data.go b/iSolarCloud/WebAppService/queryPsProvcnList/data.go index 81a34d469..c67070e0f 100644 --- a/iSolarCloud/WebAppService/queryPsProvcnList/data.go +++ b/iSolarCloud/WebAppService/queryPsProvcnList/data.go @@ -2,8 +2,8 @@ package queryPsProvcnList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/queryPsProvcnList/struct.go b/iSolarCloud/WebAppService/queryPsProvcnList/struct.go index 260841700..8a53e3e82 100644 --- a/iSolarCloud/WebAppService/queryPsProvcnList/struct.go +++ b/iSolarCloud/WebAppService/queryPsProvcnList/struct.go @@ -6,8 +6,8 @@ package queryPsProvcnList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/queryPsTypeByPsId/data.go b/iSolarCloud/WebAppService/queryPsTypeByPsId/data.go index 3715a2553..4c72f0909 100644 --- a/iSolarCloud/WebAppService/queryPsTypeByPsId/data.go +++ b/iSolarCloud/WebAppService/queryPsTypeByPsId/data.go @@ -2,8 +2,8 @@ package queryPsTypeByPsId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/queryPsTypeByPsId/struct.go b/iSolarCloud/WebAppService/queryPsTypeByPsId/struct.go index e9c8f5fa0..f8e314819 100644 --- a/iSolarCloud/WebAppService/queryPsTypeByPsId/struct.go +++ b/iSolarCloud/WebAppService/queryPsTypeByPsId/struct.go @@ -6,8 +6,8 @@ package queryPsTypeByPsId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/querySparePartsList/data.go b/iSolarCloud/WebAppService/querySparePartsList/data.go index be2fe7a7a..1dc630648 100644 --- a/iSolarCloud/WebAppService/querySparePartsList/data.go +++ b/iSolarCloud/WebAppService/querySparePartsList/data.go @@ -2,8 +2,8 @@ package querySparePartsList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/querySparePartsList/struct.go b/iSolarCloud/WebAppService/querySparePartsList/struct.go index 284ad4d30..d748c29a2 100644 --- a/iSolarCloud/WebAppService/querySparePartsList/struct.go +++ b/iSolarCloud/WebAppService/querySparePartsList/struct.go @@ -6,8 +6,8 @@ package querySparePartsList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/queryStoreList/data.go b/iSolarCloud/WebAppService/queryStoreList/data.go index fd246ccd3..746f2be3c 100644 --- a/iSolarCloud/WebAppService/queryStoreList/data.go +++ b/iSolarCloud/WebAppService/queryStoreList/data.go @@ -2,8 +2,8 @@ package queryStoreList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/queryStoreList/struct.go b/iSolarCloud/WebAppService/queryStoreList/struct.go index c119b7121..4b8dd9c14 100644 --- a/iSolarCloud/WebAppService/queryStoreList/struct.go +++ b/iSolarCloud/WebAppService/queryStoreList/struct.go @@ -6,8 +6,8 @@ package queryStoreList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/querySysTimezone/data.go b/iSolarCloud/WebAppService/querySysTimezone/data.go index 89aee9fb4..03e74e6ee 100644 --- a/iSolarCloud/WebAppService/querySysTimezone/data.go +++ b/iSolarCloud/WebAppService/querySysTimezone/data.go @@ -2,8 +2,8 @@ package querySysTimezone import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/querySysTimezone/struct.go b/iSolarCloud/WebAppService/querySysTimezone/struct.go index d50c826a2..8fa6cbc60 100644 --- a/iSolarCloud/WebAppService/querySysTimezone/struct.go +++ b/iSolarCloud/WebAppService/querySysTimezone/struct.go @@ -6,8 +6,8 @@ package querySysTimezone import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/queryUnInventorySpareList/data.go b/iSolarCloud/WebAppService/queryUnInventorySpareList/data.go index 54c10b687..b28030e35 100644 --- a/iSolarCloud/WebAppService/queryUnInventorySpareList/data.go +++ b/iSolarCloud/WebAppService/queryUnInventorySpareList/data.go @@ -2,8 +2,8 @@ package queryUnInventorySpareList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/queryUnInventorySpareList/struct.go b/iSolarCloud/WebAppService/queryUnInventorySpareList/struct.go index 408c1e882..110fd45eb 100644 --- a/iSolarCloud/WebAppService/queryUnInventorySpareList/struct.go +++ b/iSolarCloud/WebAppService/queryUnInventorySpareList/struct.go @@ -6,8 +6,8 @@ package queryUnInventorySpareList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/queryUserCurveTemplateData/data.go b/iSolarCloud/WebAppService/queryUserCurveTemplateData/data.go index 67f7ef95d..a09272548 100644 --- a/iSolarCloud/WebAppService/queryUserCurveTemplateData/data.go +++ b/iSolarCloud/WebAppService/queryUserCurveTemplateData/data.go @@ -2,8 +2,8 @@ package queryUserCurveTemplateData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "encoding/json" "github.com/MickMake/GoUnify/Only" @@ -24,7 +24,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -106,7 +106,7 @@ type DeviceData struct { DeviceName valueTypes.String `json:"device_name"` DeviceType valueTypes.Integer `json:"device_type"` DeviceUUID valueTypes.Integer `json:"device_uuid"` - Points Points `json:"points" PointNameAppend:"false" DataTable:"true"` + Points Points `json:"points" PointNameAppend:"false" DataTable:"true" DataTableSortOn:"PointId"` } func (p *DeviceData) UnmarshalJSON(data []byte) error { @@ -203,7 +203,7 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - entries.StructToDataMap(*e, e.Request.TemplateId.String(), apiReflect.NewEndPointPath(e.Request.TemplateId.String())) + entries.StructToDataMap(*e, e.Request.TemplateId.String(), GoStruct.NewEndPointPath(e.Request.TemplateId.String())) } return entries diff --git a/iSolarCloud/WebAppService/queryUserCurveTemplateData/struct.go b/iSolarCloud/WebAppService/queryUserCurveTemplateData/struct.go index 59b8b45e4..2f3d3c475 100644 --- a/iSolarCloud/WebAppService/queryUserCurveTemplateData/struct.go +++ b/iSolarCloud/WebAppService/queryUserCurveTemplateData/struct.go @@ -6,8 +6,8 @@ package queryUserCurveTemplateData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/renewOperation/data.go b/iSolarCloud/WebAppService/renewOperation/data.go index 040bf239a..7a32c8b48 100644 --- a/iSolarCloud/WebAppService/renewOperation/data.go +++ b/iSolarCloud/WebAppService/renewOperation/data.go @@ -2,8 +2,8 @@ package renewOperation import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/renewOperation/struct.go b/iSolarCloud/WebAppService/renewOperation/struct.go index bff0139f6..e49bc43d9 100644 --- a/iSolarCloud/WebAppService/renewOperation/struct.go +++ b/iSolarCloud/WebAppService/renewOperation/struct.go @@ -6,8 +6,8 @@ package renewOperation import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/saveCustomReport/data.go b/iSolarCloud/WebAppService/saveCustomReport/data.go index 06feaaf11..fee22548d 100644 --- a/iSolarCloud/WebAppService/saveCustomReport/data.go +++ b/iSolarCloud/WebAppService/saveCustomReport/data.go @@ -2,8 +2,8 @@ package saveCustomReport import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/saveCustomReport/struct.go b/iSolarCloud/WebAppService/saveCustomReport/struct.go index c035aa166..5741c451c 100644 --- a/iSolarCloud/WebAppService/saveCustomReport/struct.go +++ b/iSolarCloud/WebAppService/saveCustomReport/struct.go @@ -6,8 +6,8 @@ package saveCustomReport import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/saveDutyInfo/data.go b/iSolarCloud/WebAppService/saveDutyInfo/data.go index de2ad6d07..9102af617 100644 --- a/iSolarCloud/WebAppService/saveDutyInfo/data.go +++ b/iSolarCloud/WebAppService/saveDutyInfo/data.go @@ -2,8 +2,8 @@ package saveDutyInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/saveDutyInfo/struct.go b/iSolarCloud/WebAppService/saveDutyInfo/struct.go index 6747ee987..31ac605d2 100644 --- a/iSolarCloud/WebAppService/saveDutyInfo/struct.go +++ b/iSolarCloud/WebAppService/saveDutyInfo/struct.go @@ -6,8 +6,8 @@ package saveDutyInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/saveInventory/data.go b/iSolarCloud/WebAppService/saveInventory/data.go index a51814951..14698f43a 100644 --- a/iSolarCloud/WebAppService/saveInventory/data.go +++ b/iSolarCloud/WebAppService/saveInventory/data.go @@ -2,8 +2,8 @@ package saveInventory import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/saveInventory/struct.go b/iSolarCloud/WebAppService/saveInventory/struct.go index 01453f071..b9429b5b6 100644 --- a/iSolarCloud/WebAppService/saveInventory/struct.go +++ b/iSolarCloud/WebAppService/saveInventory/struct.go @@ -6,8 +6,8 @@ package saveInventory import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/saveMaterial/data.go b/iSolarCloud/WebAppService/saveMaterial/data.go index ce3e1a1f8..5b0188edb 100644 --- a/iSolarCloud/WebAppService/saveMaterial/data.go +++ b/iSolarCloud/WebAppService/saveMaterial/data.go @@ -2,8 +2,8 @@ package saveMaterial import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/saveMaterial/struct.go b/iSolarCloud/WebAppService/saveMaterial/struct.go index 8839e0860..26e5e5621 100644 --- a/iSolarCloud/WebAppService/saveMaterial/struct.go +++ b/iSolarCloud/WebAppService/saveMaterial/struct.go @@ -6,8 +6,8 @@ package saveMaterial import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/saveSecondTypeTicket/data.go b/iSolarCloud/WebAppService/saveSecondTypeTicket/data.go index 64519317b..1810ba16c 100644 --- a/iSolarCloud/WebAppService/saveSecondTypeTicket/data.go +++ b/iSolarCloud/WebAppService/saveSecondTypeTicket/data.go @@ -2,8 +2,8 @@ package saveSecondTypeTicket import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/saveSecondTypeTicket/struct.go b/iSolarCloud/WebAppService/saveSecondTypeTicket/struct.go index cf8770965..eb5e40d23 100644 --- a/iSolarCloud/WebAppService/saveSecondTypeTicket/struct.go +++ b/iSolarCloud/WebAppService/saveSecondTypeTicket/struct.go @@ -6,8 +6,8 @@ package saveSecondTypeTicket import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/saveSelfReportPoint/data.go b/iSolarCloud/WebAppService/saveSelfReportPoint/data.go index f40366008..eaeed6d81 100644 --- a/iSolarCloud/WebAppService/saveSelfReportPoint/data.go +++ b/iSolarCloud/WebAppService/saveSelfReportPoint/data.go @@ -2,8 +2,8 @@ package saveSelfReportPoint import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/saveSelfReportPoint/struct.go b/iSolarCloud/WebAppService/saveSelfReportPoint/struct.go index 6dea0f201..92ea74de8 100644 --- a/iSolarCloud/WebAppService/saveSelfReportPoint/struct.go +++ b/iSolarCloud/WebAppService/saveSelfReportPoint/struct.go @@ -6,8 +6,8 @@ package saveSelfReportPoint import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/saveWorkTicket/data.go b/iSolarCloud/WebAppService/saveWorkTicket/data.go index 5bc1964cf..7de243e54 100644 --- a/iSolarCloud/WebAppService/saveWorkTicket/data.go +++ b/iSolarCloud/WebAppService/saveWorkTicket/data.go @@ -2,8 +2,8 @@ package saveWorkTicket import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/saveWorkTicket/struct.go b/iSolarCloud/WebAppService/saveWorkTicket/struct.go index b275e7cc0..43a23b6d8 100644 --- a/iSolarCloud/WebAppService/saveWorkTicket/struct.go +++ b/iSolarCloud/WebAppService/saveWorkTicket/struct.go @@ -6,8 +6,8 @@ package saveWorkTicket import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/secondTypeTicketFlowImplementStep/data.go b/iSolarCloud/WebAppService/secondTypeTicketFlowImplementStep/data.go index d36c7fda7..200d279b4 100644 --- a/iSolarCloud/WebAppService/secondTypeTicketFlowImplementStep/data.go +++ b/iSolarCloud/WebAppService/secondTypeTicketFlowImplementStep/data.go @@ -2,8 +2,8 @@ package secondTypeTicketFlowImplementStep import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/secondTypeTicketFlowImplementStep/struct.go b/iSolarCloud/WebAppService/secondTypeTicketFlowImplementStep/struct.go index 29946956b..86ae653d5 100644 --- a/iSolarCloud/WebAppService/secondTypeTicketFlowImplementStep/struct.go +++ b/iSolarCloud/WebAppService/secondTypeTicketFlowImplementStep/struct.go @@ -6,8 +6,8 @@ package secondTypeTicketFlowImplementStep import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/secondTypeTicketFlowTransferStep/data.go b/iSolarCloud/WebAppService/secondTypeTicketFlowTransferStep/data.go index 39e71c70b..b2f102ddf 100644 --- a/iSolarCloud/WebAppService/secondTypeTicketFlowTransferStep/data.go +++ b/iSolarCloud/WebAppService/secondTypeTicketFlowTransferStep/data.go @@ -2,8 +2,8 @@ package secondTypeTicketFlowTransferStep import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/secondTypeTicketFlowTransferStep/struct.go b/iSolarCloud/WebAppService/secondTypeTicketFlowTransferStep/struct.go index 2f7bae922..a5ebda057 100644 --- a/iSolarCloud/WebAppService/secondTypeTicketFlowTransferStep/struct.go +++ b/iSolarCloud/WebAppService/secondTypeTicketFlowTransferStep/struct.go @@ -6,8 +6,8 @@ package secondTypeTicketFlowTransferStep import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/secondTypeUpdateSign/data.go b/iSolarCloud/WebAppService/secondTypeUpdateSign/data.go index b869f91ea..2088135a4 100644 --- a/iSolarCloud/WebAppService/secondTypeUpdateSign/data.go +++ b/iSolarCloud/WebAppService/secondTypeUpdateSign/data.go @@ -2,8 +2,8 @@ package secondTypeUpdateSign import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/secondTypeUpdateSign/struct.go b/iSolarCloud/WebAppService/secondTypeUpdateSign/struct.go index ee61c24c3..d54b3e497 100644 --- a/iSolarCloud/WebAppService/secondTypeUpdateSign/struct.go +++ b/iSolarCloud/WebAppService/secondTypeUpdateSign/struct.go @@ -6,8 +6,8 @@ package secondTypeUpdateSign import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/selectPowerPageList/data.go b/iSolarCloud/WebAppService/selectPowerPageList/data.go index f10a6f6b7..a0c2784ae 100644 --- a/iSolarCloud/WebAppService/selectPowerPageList/data.go +++ b/iSolarCloud/WebAppService/selectPowerPageList/data.go @@ -2,8 +2,8 @@ package selectPowerPageList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/selectPowerPageList/struct.go b/iSolarCloud/WebAppService/selectPowerPageList/struct.go index 28c53467c..437651f21 100644 --- a/iSolarCloud/WebAppService/selectPowerPageList/struct.go +++ b/iSolarCloud/WebAppService/selectPowerPageList/struct.go @@ -6,8 +6,8 @@ package selectPowerPageList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/showAnalyzefxDetail/data.go b/iSolarCloud/WebAppService/showAnalyzefxDetail/data.go index 8d5cbadf2..9b3f9e4eb 100644 --- a/iSolarCloud/WebAppService/showAnalyzefxDetail/data.go +++ b/iSolarCloud/WebAppService/showAnalyzefxDetail/data.go @@ -2,8 +2,8 @@ package showAnalyzefxDetail import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/showAnalyzefxDetail/struct.go b/iSolarCloud/WebAppService/showAnalyzefxDetail/struct.go index b21ba4ea9..46d89a996 100644 --- a/iSolarCloud/WebAppService/showAnalyzefxDetail/struct.go +++ b/iSolarCloud/WebAppService/showAnalyzefxDetail/struct.go @@ -6,8 +6,8 @@ package showAnalyzefxDetail import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/showFxReport/data.go b/iSolarCloud/WebAppService/showFxReport/data.go index 4af9bd7b9..768f3a07a 100644 --- a/iSolarCloud/WebAppService/showFxReport/data.go +++ b/iSolarCloud/WebAppService/showFxReport/data.go @@ -2,8 +2,8 @@ package showFxReport import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/showFxReport/struct.go b/iSolarCloud/WebAppService/showFxReport/struct.go index 2703be802..ee2274c89 100644 --- a/iSolarCloud/WebAppService/showFxReport/struct.go +++ b/iSolarCloud/WebAppService/showFxReport/struct.go @@ -6,8 +6,8 @@ package showFxReport import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/showMaterNameList/data.go b/iSolarCloud/WebAppService/showMaterNameList/data.go index 84df7831e..480d01ed5 100644 --- a/iSolarCloud/WebAppService/showMaterNameList/data.go +++ b/iSolarCloud/WebAppService/showMaterNameList/data.go @@ -2,8 +2,8 @@ package showMaterNameList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/showMaterNameList/struct.go b/iSolarCloud/WebAppService/showMaterNameList/struct.go index 2d71fe279..981500d72 100644 --- a/iSolarCloud/WebAppService/showMaterNameList/struct.go +++ b/iSolarCloud/WebAppService/showMaterNameList/struct.go @@ -6,8 +6,8 @@ package showMaterNameList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/showMaterSubTypeList/data.go b/iSolarCloud/WebAppService/showMaterSubTypeList/data.go index 0f5d51896..3a20b4647 100644 --- a/iSolarCloud/WebAppService/showMaterSubTypeList/data.go +++ b/iSolarCloud/WebAppService/showMaterSubTypeList/data.go @@ -2,8 +2,8 @@ package showMaterSubTypeList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/showMaterSubTypeList/struct.go b/iSolarCloud/WebAppService/showMaterSubTypeList/struct.go index 6b6b13cd8..76ce748ef 100644 --- a/iSolarCloud/WebAppService/showMaterSubTypeList/struct.go +++ b/iSolarCloud/WebAppService/showMaterSubTypeList/struct.go @@ -6,8 +6,8 @@ package showMaterSubTypeList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/showPSView/data.go b/iSolarCloud/WebAppService/showPSView/data.go index a80c52680..4e430167b 100644 --- a/iSolarCloud/WebAppService/showPSView/data.go +++ b/iSolarCloud/WebAppService/showPSView/data.go @@ -2,8 +2,8 @@ package showPSView import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -51,10 +51,10 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsId.String() - entries.StructToDataMap(*e, e.Request.PsId.String(), apiReflect.NewEndPointPath(e.Request.PsId.String())) + entries.StructToDataMap(*e, e.Request.PsId.String(), GoStruct.NewEndPointPath(e.Request.PsId.String())) } return entries diff --git a/iSolarCloud/WebAppService/showPSView/struct.go b/iSolarCloud/WebAppService/showPSView/struct.go index e9e207898..10a10b846 100644 --- a/iSolarCloud/WebAppService/showPSView/struct.go +++ b/iSolarCloud/WebAppService/showPSView/struct.go @@ -6,8 +6,8 @@ package showPSView import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/showTjReport/data.go b/iSolarCloud/WebAppService/showTjReport/data.go index 8f3be0e28..bef23f9f0 100644 --- a/iSolarCloud/WebAppService/showTjReport/data.go +++ b/iSolarCloud/WebAppService/showTjReport/data.go @@ -2,8 +2,8 @@ package showTjReport import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -18,7 +18,7 @@ type RequestData struct { // ./goraw.sh WebAppService.showTjReport '{"ps_id":1171348,"month_date":"202210"}' func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/showTjReport/struct.go b/iSolarCloud/WebAppService/showTjReport/struct.go index 4ea544387..ac04b1813 100644 --- a/iSolarCloud/WebAppService/showTjReport/struct.go +++ b/iSolarCloud/WebAppService/showTjReport/struct.go @@ -6,8 +6,8 @@ package showTjReport import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/struct.go b/iSolarCloud/WebAppService/struct.go index 6229da667..1ff30a0fb 100644 --- a/iSolarCloud/WebAppService/struct.go +++ b/iSolarCloud/WebAppService/struct.go @@ -1,4 +1,4 @@ -// API endpoints pulled from the sqlite database, (./assets/interface.db), contained within the Android app com.isolarcloud.manager +// Package WebAppService - API endpoints pulled from the sqlite database, (./assets/interface.db), contained within the Android app com.isolarcloud.manager package WebAppService import ( @@ -193,7 +193,7 @@ import ( "GoSungrow/iSolarCloud/WebAppService/updateStopReason" "GoSungrow/iSolarCloud/WebAppService/updateTemplate" "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" "fmt" ) diff --git a/iSolarCloud/WebAppService/templateLikesInfo/data.go b/iSolarCloud/WebAppService/templateLikesInfo/data.go index 38da05c98..3ab7414c4 100644 --- a/iSolarCloud/WebAppService/templateLikesInfo/data.go +++ b/iSolarCloud/WebAppService/templateLikesInfo/data.go @@ -2,8 +2,8 @@ package templateLikesInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/templateLikesInfo/struct.go b/iSolarCloud/WebAppService/templateLikesInfo/struct.go index e19655940..5d89f086e 100644 --- a/iSolarCloud/WebAppService/templateLikesInfo/struct.go +++ b/iSolarCloud/WebAppService/templateLikesInfo/struct.go @@ -6,8 +6,8 @@ package templateLikesInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/updOptTicketInfo/data.go b/iSolarCloud/WebAppService/updOptTicketInfo/data.go index 3a431dfc8..adde8b4ed 100644 --- a/iSolarCloud/WebAppService/updOptTicketInfo/data.go +++ b/iSolarCloud/WebAppService/updOptTicketInfo/data.go @@ -2,8 +2,8 @@ package updOptTicketInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/updOptTicketInfo/struct.go b/iSolarCloud/WebAppService/updOptTicketInfo/struct.go index 8ef6ea5af..9b87a1ec8 100644 --- a/iSolarCloud/WebAppService/updOptTicketInfo/struct.go +++ b/iSolarCloud/WebAppService/updOptTicketInfo/struct.go @@ -6,8 +6,8 @@ package updOptTicketInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/updataWorkTicketAfterStartProcess/data.go b/iSolarCloud/WebAppService/updataWorkTicketAfterStartProcess/data.go index fe31bb562..9f4c3b100 100644 --- a/iSolarCloud/WebAppService/updataWorkTicketAfterStartProcess/data.go +++ b/iSolarCloud/WebAppService/updataWorkTicketAfterStartProcess/data.go @@ -2,8 +2,8 @@ package updataWorkTicketAfterStartProcess import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/updataWorkTicketAfterStartProcess/struct.go b/iSolarCloud/WebAppService/updataWorkTicketAfterStartProcess/struct.go index 06cda6002..eae1482e8 100644 --- a/iSolarCloud/WebAppService/updataWorkTicketAfterStartProcess/struct.go +++ b/iSolarCloud/WebAppService/updataWorkTicketAfterStartProcess/struct.go @@ -6,8 +6,8 @@ package updataWorkTicketAfterStartProcess import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/updateBillTicketForTask/data.go b/iSolarCloud/WebAppService/updateBillTicketForTask/data.go index e7782e05f..879877b56 100644 --- a/iSolarCloud/WebAppService/updateBillTicketForTask/data.go +++ b/iSolarCloud/WebAppService/updateBillTicketForTask/data.go @@ -2,8 +2,8 @@ package updateBillTicketForTask import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/updateBillTicketForTask/struct.go b/iSolarCloud/WebAppService/updateBillTicketForTask/struct.go index 3a8d81d90..4ae01500a 100644 --- a/iSolarCloud/WebAppService/updateBillTicketForTask/struct.go +++ b/iSolarCloud/WebAppService/updateBillTicketForTask/struct.go @@ -6,8 +6,8 @@ package updateBillTicketForTask import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/updateDutyInfo/data.go b/iSolarCloud/WebAppService/updateDutyInfo/data.go index ef7dc7968..ef135ae77 100644 --- a/iSolarCloud/WebAppService/updateDutyInfo/data.go +++ b/iSolarCloud/WebAppService/updateDutyInfo/data.go @@ -2,8 +2,8 @@ package updateDutyInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/updateDutyInfo/struct.go b/iSolarCloud/WebAppService/updateDutyInfo/struct.go index 0ed0d239c..3e6344bb9 100644 --- a/iSolarCloud/WebAppService/updateDutyInfo/struct.go +++ b/iSolarCloud/WebAppService/updateDutyInfo/struct.go @@ -6,8 +6,8 @@ package updateDutyInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/updateKnowledgeBaseUseNumber/data.go b/iSolarCloud/WebAppService/updateKnowledgeBaseUseNumber/data.go index d945bf1e8..4e1c3507e 100644 --- a/iSolarCloud/WebAppService/updateKnowledgeBaseUseNumber/data.go +++ b/iSolarCloud/WebAppService/updateKnowledgeBaseUseNumber/data.go @@ -2,8 +2,8 @@ package updateKnowledgeBaseUseNumber import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/updateKnowledgeBaseUseNumber/struct.go b/iSolarCloud/WebAppService/updateKnowledgeBaseUseNumber/struct.go index 35ddd4cb0..6d42be996 100644 --- a/iSolarCloud/WebAppService/updateKnowledgeBaseUseNumber/struct.go +++ b/iSolarCloud/WebAppService/updateKnowledgeBaseUseNumber/struct.go @@ -6,8 +6,8 @@ package updateKnowledgeBaseUseNumber import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/updateMaterial/data.go b/iSolarCloud/WebAppService/updateMaterial/data.go index 3f5379c01..cacd82ded 100644 --- a/iSolarCloud/WebAppService/updateMaterial/data.go +++ b/iSolarCloud/WebAppService/updateMaterial/data.go @@ -2,8 +2,8 @@ package updateMaterial import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/updateMaterial/struct.go b/iSolarCloud/WebAppService/updateMaterial/struct.go index 010a97e9c..a39cb9597 100644 --- a/iSolarCloud/WebAppService/updateMaterial/struct.go +++ b/iSolarCloud/WebAppService/updateMaterial/struct.go @@ -6,8 +6,8 @@ package updateMaterial import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/updateSpareParts/data.go b/iSolarCloud/WebAppService/updateSpareParts/data.go index a6c33e13f..0dffcc754 100644 --- a/iSolarCloud/WebAppService/updateSpareParts/data.go +++ b/iSolarCloud/WebAppService/updateSpareParts/data.go @@ -2,8 +2,8 @@ package updateSpareParts import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/updateSpareParts/struct.go b/iSolarCloud/WebAppService/updateSpareParts/struct.go index 9d6707061..0d5130925 100644 --- a/iSolarCloud/WebAppService/updateSpareParts/struct.go +++ b/iSolarCloud/WebAppService/updateSpareParts/struct.go @@ -6,8 +6,8 @@ package updateSpareParts import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/updateStopReason/data.go b/iSolarCloud/WebAppService/updateStopReason/data.go index 698cb1b5b..063e0ec68 100644 --- a/iSolarCloud/WebAppService/updateStopReason/data.go +++ b/iSolarCloud/WebAppService/updateStopReason/data.go @@ -2,8 +2,8 @@ package updateStopReason import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/updateStopReason/struct.go b/iSolarCloud/WebAppService/updateStopReason/struct.go index d3ab040be..6f2d2d406 100644 --- a/iSolarCloud/WebAppService/updateStopReason/struct.go +++ b/iSolarCloud/WebAppService/updateStopReason/struct.go @@ -6,8 +6,8 @@ package updateStopReason import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebAppService/updateTemplate/data.go b/iSolarCloud/WebAppService/updateTemplate/data.go index 64b0d4a46..c9d87f5b9 100644 --- a/iSolarCloud/WebAppService/updateTemplate/data.go +++ b/iSolarCloud/WebAppService/updateTemplate/data.go @@ -2,8 +2,8 @@ package updateTemplate import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebAppService/updateTemplate/struct.go b/iSolarCloud/WebAppService/updateTemplate/struct.go index 60118d40c..c970cb5b2 100644 --- a/iSolarCloud/WebAppService/updateTemplate/struct.go +++ b/iSolarCloud/WebAppService/updateTemplate/struct.go @@ -6,8 +6,8 @@ package updateTemplate import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/addPowerDeviceModel/data.go b/iSolarCloud/WebIscmAppService/addPowerDeviceModel/data.go index 0f6032225..7a59d222c 100644 --- a/iSolarCloud/WebIscmAppService/addPowerDeviceModel/data.go +++ b/iSolarCloud/WebIscmAppService/addPowerDeviceModel/data.go @@ -2,8 +2,8 @@ package addPowerDeviceModel import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/addPowerDeviceModel/struct.go b/iSolarCloud/WebIscmAppService/addPowerDeviceModel/struct.go index d4c05677c..0c074e34b 100644 --- a/iSolarCloud/WebIscmAppService/addPowerDeviceModel/struct.go +++ b/iSolarCloud/WebIscmAppService/addPowerDeviceModel/struct.go @@ -6,8 +6,8 @@ package addPowerDeviceModel import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/addPowerPointManage/data.go b/iSolarCloud/WebIscmAppService/addPowerPointManage/data.go index 7ea09e226..3907a91ed 100644 --- a/iSolarCloud/WebIscmAppService/addPowerPointManage/data.go +++ b/iSolarCloud/WebIscmAppService/addPowerPointManage/data.go @@ -2,8 +2,8 @@ package addPowerPointManage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/addPowerPointManage/struct.go b/iSolarCloud/WebIscmAppService/addPowerPointManage/struct.go index 952be1a47..ce740a69e 100644 --- a/iSolarCloud/WebIscmAppService/addPowerPointManage/struct.go +++ b/iSolarCloud/WebIscmAppService/addPowerPointManage/struct.go @@ -6,8 +6,8 @@ package addPowerPointManage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/addSubTypeDevice/data.go b/iSolarCloud/WebIscmAppService/addSubTypeDevice/data.go index 2f0df9e0d..7f2c26d36 100644 --- a/iSolarCloud/WebIscmAppService/addSubTypeDevice/data.go +++ b/iSolarCloud/WebIscmAppService/addSubTypeDevice/data.go @@ -2,8 +2,8 @@ package addSubTypeDevice import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/addSubTypeDevice/struct.go b/iSolarCloud/WebIscmAppService/addSubTypeDevice/struct.go index 019eea804..e1f38d86e 100644 --- a/iSolarCloud/WebIscmAppService/addSubTypeDevice/struct.go +++ b/iSolarCloud/WebIscmAppService/addSubTypeDevice/struct.go @@ -6,8 +6,8 @@ package addSubTypeDevice import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/batchAddDevicesPropertis/data.go b/iSolarCloud/WebIscmAppService/batchAddDevicesPropertis/data.go index ca1460b1b..4cb8fa6ba 100644 --- a/iSolarCloud/WebIscmAppService/batchAddDevicesPropertis/data.go +++ b/iSolarCloud/WebIscmAppService/batchAddDevicesPropertis/data.go @@ -2,8 +2,8 @@ package batchAddDevicesPropertis import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/batchAddDevicesPropertis/struct.go b/iSolarCloud/WebIscmAppService/batchAddDevicesPropertis/struct.go index e113f73d4..51ff1c0f2 100644 --- a/iSolarCloud/WebIscmAppService/batchAddDevicesPropertis/struct.go +++ b/iSolarCloud/WebIscmAppService/batchAddDevicesPropertis/struct.go @@ -6,8 +6,8 @@ package batchAddDevicesPropertis import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/batchDelDevice/data.go b/iSolarCloud/WebIscmAppService/batchDelDevice/data.go index fd41bf01b..c05f40681 100644 --- a/iSolarCloud/WebIscmAppService/batchDelDevice/data.go +++ b/iSolarCloud/WebIscmAppService/batchDelDevice/data.go @@ -2,8 +2,8 @@ package batchDelDevice import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/batchDelDevice/struct.go b/iSolarCloud/WebIscmAppService/batchDelDevice/struct.go index 633f9bb9b..4e3d68452 100644 --- a/iSolarCloud/WebIscmAppService/batchDelDevice/struct.go +++ b/iSolarCloud/WebIscmAppService/batchDelDevice/struct.go @@ -6,8 +6,8 @@ package batchDelDevice import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/batchSavePowerDeviceTechnical/data.go b/iSolarCloud/WebIscmAppService/batchSavePowerDeviceTechnical/data.go index 229a30ad1..24de8dc5c 100644 --- a/iSolarCloud/WebIscmAppService/batchSavePowerDeviceTechnical/data.go +++ b/iSolarCloud/WebIscmAppService/batchSavePowerDeviceTechnical/data.go @@ -2,8 +2,8 @@ package batchSavePowerDeviceTechnical import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/batchSavePowerDeviceTechnical/struct.go b/iSolarCloud/WebIscmAppService/batchSavePowerDeviceTechnical/struct.go index 7362f7d0b..8369a5a1e 100644 --- a/iSolarCloud/WebIscmAppService/batchSavePowerDeviceTechnical/struct.go +++ b/iSolarCloud/WebIscmAppService/batchSavePowerDeviceTechnical/struct.go @@ -6,8 +6,8 @@ package batchSavePowerDeviceTechnical import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/checkDeviceModel/data.go b/iSolarCloud/WebIscmAppService/checkDeviceModel/data.go index bb0db27cb..ec3f3cfb0 100644 --- a/iSolarCloud/WebIscmAppService/checkDeviceModel/data.go +++ b/iSolarCloud/WebIscmAppService/checkDeviceModel/data.go @@ -2,8 +2,8 @@ package checkDeviceModel import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/checkDeviceModel/struct.go b/iSolarCloud/WebIscmAppService/checkDeviceModel/struct.go index 7306d153e..8fa523d00 100644 --- a/iSolarCloud/WebIscmAppService/checkDeviceModel/struct.go +++ b/iSolarCloud/WebIscmAppService/checkDeviceModel/struct.go @@ -6,8 +6,8 @@ package checkDeviceModel import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/contactMessageOpera/data.go b/iSolarCloud/WebIscmAppService/contactMessageOpera/data.go index 71319377d..d22024bd3 100644 --- a/iSolarCloud/WebIscmAppService/contactMessageOpera/data.go +++ b/iSolarCloud/WebIscmAppService/contactMessageOpera/data.go @@ -2,8 +2,8 @@ package contactMessageOpera import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/contactMessageOpera/struct.go b/iSolarCloud/WebIscmAppService/contactMessageOpera/struct.go index 4a6849976..1efe80849 100644 --- a/iSolarCloud/WebIscmAppService/contactMessageOpera/struct.go +++ b/iSolarCloud/WebIscmAppService/contactMessageOpera/struct.go @@ -6,8 +6,8 @@ package contactMessageOpera import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/delDevice/data.go b/iSolarCloud/WebIscmAppService/delDevice/data.go index 1c705ceb4..9ce40a767 100644 --- a/iSolarCloud/WebIscmAppService/delDevice/data.go +++ b/iSolarCloud/WebIscmAppService/delDevice/data.go @@ -2,8 +2,8 @@ package delDevice import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/delDevice/struct.go b/iSolarCloud/WebIscmAppService/delDevice/struct.go index bed333615..52e23d53a 100644 --- a/iSolarCloud/WebIscmAppService/delDevice/struct.go +++ b/iSolarCloud/WebIscmAppService/delDevice/struct.go @@ -6,8 +6,8 @@ package delDevice import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/deleteDeviceFactory/data.go b/iSolarCloud/WebIscmAppService/deleteDeviceFactory/data.go index 70a23fdc6..8fa78ef9b 100644 --- a/iSolarCloud/WebIscmAppService/deleteDeviceFactory/data.go +++ b/iSolarCloud/WebIscmAppService/deleteDeviceFactory/data.go @@ -2,8 +2,8 @@ package deleteDeviceFactory import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/deleteDeviceFactory/struct.go b/iSolarCloud/WebIscmAppService/deleteDeviceFactory/struct.go index b2090193c..93122f574 100644 --- a/iSolarCloud/WebIscmAppService/deleteDeviceFactory/struct.go +++ b/iSolarCloud/WebIscmAppService/deleteDeviceFactory/struct.go @@ -6,8 +6,8 @@ package deleteDeviceFactory import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/deleteDeviceType/data.go b/iSolarCloud/WebIscmAppService/deleteDeviceType/data.go index 8ca0ba3f8..e8bb0e5ff 100644 --- a/iSolarCloud/WebIscmAppService/deleteDeviceType/data.go +++ b/iSolarCloud/WebIscmAppService/deleteDeviceType/data.go @@ -2,8 +2,8 @@ package deleteDeviceType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/deleteDeviceType/struct.go b/iSolarCloud/WebIscmAppService/deleteDeviceType/struct.go index fe4436347..fffa14c60 100644 --- a/iSolarCloud/WebIscmAppService/deleteDeviceType/struct.go +++ b/iSolarCloud/WebIscmAppService/deleteDeviceType/struct.go @@ -6,8 +6,8 @@ package deleteDeviceType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/deleteMenu/data.go b/iSolarCloud/WebIscmAppService/deleteMenu/data.go index 8dc97913a..0cc0229bd 100644 --- a/iSolarCloud/WebIscmAppService/deleteMenu/data.go +++ b/iSolarCloud/WebIscmAppService/deleteMenu/data.go @@ -2,8 +2,8 @@ package deleteMenu import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/deleteMenu/struct.go b/iSolarCloud/WebIscmAppService/deleteMenu/struct.go index aedcac9cb..84ec13df9 100644 --- a/iSolarCloud/WebIscmAppService/deleteMenu/struct.go +++ b/iSolarCloud/WebIscmAppService/deleteMenu/struct.go @@ -6,8 +6,8 @@ package deleteMenu import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/deleteOneNotice/data.go b/iSolarCloud/WebIscmAppService/deleteOneNotice/data.go index 560f177ab..80b17d5d8 100644 --- a/iSolarCloud/WebIscmAppService/deleteOneNotice/data.go +++ b/iSolarCloud/WebIscmAppService/deleteOneNotice/data.go @@ -2,8 +2,8 @@ package deleteOneNotice import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/deleteOneNotice/struct.go b/iSolarCloud/WebIscmAppService/deleteOneNotice/struct.go index d2916be8d..f9e20f435 100644 --- a/iSolarCloud/WebIscmAppService/deleteOneNotice/struct.go +++ b/iSolarCloud/WebIscmAppService/deleteOneNotice/struct.go @@ -6,8 +6,8 @@ package deleteOneNotice import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/deleteOrgNodeInfo/data.go b/iSolarCloud/WebIscmAppService/deleteOrgNodeInfo/data.go index c94fd2161..f728d540c 100644 --- a/iSolarCloud/WebIscmAppService/deleteOrgNodeInfo/data.go +++ b/iSolarCloud/WebIscmAppService/deleteOrgNodeInfo/data.go @@ -2,8 +2,8 @@ package deleteOrgNodeInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/deleteOrgNodeInfo/struct.go b/iSolarCloud/WebIscmAppService/deleteOrgNodeInfo/struct.go index 3908f23d1..868e3f89c 100644 --- a/iSolarCloud/WebIscmAppService/deleteOrgNodeInfo/struct.go +++ b/iSolarCloud/WebIscmAppService/deleteOrgNodeInfo/struct.go @@ -6,8 +6,8 @@ package deleteOrgNodeInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/deletePicture/data.go b/iSolarCloud/WebIscmAppService/deletePicture/data.go index faebeac5a..a89529d24 100644 --- a/iSolarCloud/WebIscmAppService/deletePicture/data.go +++ b/iSolarCloud/WebIscmAppService/deletePicture/data.go @@ -2,8 +2,8 @@ package deletePicture import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/deletePicture/struct.go b/iSolarCloud/WebIscmAppService/deletePicture/struct.go index 5e19dda18..860aa9c60 100644 --- a/iSolarCloud/WebIscmAppService/deletePicture/struct.go +++ b/iSolarCloud/WebIscmAppService/deletePicture/struct.go @@ -6,8 +6,8 @@ package deletePicture import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/deletePointInfo/data.go b/iSolarCloud/WebIscmAppService/deletePointInfo/data.go index 9a08a33bc..9b450e7f2 100644 --- a/iSolarCloud/WebIscmAppService/deletePointInfo/data.go +++ b/iSolarCloud/WebIscmAppService/deletePointInfo/data.go @@ -2,8 +2,8 @@ package deletePointInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/deletePointInfo/struct.go b/iSolarCloud/WebIscmAppService/deletePointInfo/struct.go index c770cbf4f..b3310e813 100644 --- a/iSolarCloud/WebIscmAppService/deletePointInfo/struct.go +++ b/iSolarCloud/WebIscmAppService/deletePointInfo/struct.go @@ -6,8 +6,8 @@ package deletePointInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/deletePowerDeviceChannl/data.go b/iSolarCloud/WebIscmAppService/deletePowerDeviceChannl/data.go index bdc5530e4..d1ed5763f 100644 --- a/iSolarCloud/WebIscmAppService/deletePowerDeviceChannl/data.go +++ b/iSolarCloud/WebIscmAppService/deletePowerDeviceChannl/data.go @@ -2,8 +2,8 @@ package deletePowerDeviceChannl import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/deletePowerDeviceChannl/struct.go b/iSolarCloud/WebIscmAppService/deletePowerDeviceChannl/struct.go index 62f4cc438..36abeaf73 100644 --- a/iSolarCloud/WebIscmAppService/deletePowerDeviceChannl/struct.go +++ b/iSolarCloud/WebIscmAppService/deletePowerDeviceChannl/struct.go @@ -6,8 +6,8 @@ package deletePowerDeviceChannl import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/deletePowerDeviceModel/data.go b/iSolarCloud/WebIscmAppService/deletePowerDeviceModel/data.go index a3d0bb6d8..257d95e4d 100644 --- a/iSolarCloud/WebIscmAppService/deletePowerDeviceModel/data.go +++ b/iSolarCloud/WebIscmAppService/deletePowerDeviceModel/data.go @@ -2,8 +2,8 @@ package deletePowerDeviceModel import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/deletePowerDeviceModel/struct.go b/iSolarCloud/WebIscmAppService/deletePowerDeviceModel/struct.go index c5e80e09d..8eaa2327a 100644 --- a/iSolarCloud/WebIscmAppService/deletePowerDeviceModel/struct.go +++ b/iSolarCloud/WebIscmAppService/deletePowerDeviceModel/struct.go @@ -6,8 +6,8 @@ package deletePowerDeviceModel import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/deletePowerDeviceParameterPage/data.go b/iSolarCloud/WebIscmAppService/deletePowerDeviceParameterPage/data.go index f005e4c95..19e8d15bc 100644 --- a/iSolarCloud/WebIscmAppService/deletePowerDeviceParameterPage/data.go +++ b/iSolarCloud/WebIscmAppService/deletePowerDeviceParameterPage/data.go @@ -2,8 +2,8 @@ package deletePowerDeviceParameterPage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/deletePowerDeviceParameterPage/struct.go b/iSolarCloud/WebIscmAppService/deletePowerDeviceParameterPage/struct.go index ffde20761..db5c45e9f 100644 --- a/iSolarCloud/WebIscmAppService/deletePowerDeviceParameterPage/struct.go +++ b/iSolarCloud/WebIscmAppService/deletePowerDeviceParameterPage/struct.go @@ -6,8 +6,8 @@ package deletePowerDeviceParameterPage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/deletePowerDeviceSubType/data.go b/iSolarCloud/WebIscmAppService/deletePowerDeviceSubType/data.go index 9f52b864e..ab6d4a3ed 100644 --- a/iSolarCloud/WebIscmAppService/deletePowerDeviceSubType/data.go +++ b/iSolarCloud/WebIscmAppService/deletePowerDeviceSubType/data.go @@ -2,8 +2,8 @@ package deletePowerDeviceSubType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/deletePowerDeviceSubType/struct.go b/iSolarCloud/WebIscmAppService/deletePowerDeviceSubType/struct.go index 3a4eebd2e..4d08cf27f 100644 --- a/iSolarCloud/WebIscmAppService/deletePowerDeviceSubType/struct.go +++ b/iSolarCloud/WebIscmAppService/deletePowerDeviceSubType/struct.go @@ -6,8 +6,8 @@ package deletePowerDeviceSubType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/deletePowerDeviceTechnical/data.go b/iSolarCloud/WebIscmAppService/deletePowerDeviceTechnical/data.go index b6ef5aa5c..7679883ea 100644 --- a/iSolarCloud/WebIscmAppService/deletePowerDeviceTechnical/data.go +++ b/iSolarCloud/WebIscmAppService/deletePowerDeviceTechnical/data.go @@ -2,8 +2,8 @@ package deletePowerDeviceTechnical import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/deletePowerDeviceTechnical/struct.go b/iSolarCloud/WebIscmAppService/deletePowerDeviceTechnical/struct.go index 84acbf9fb..f318d1352 100644 --- a/iSolarCloud/WebIscmAppService/deletePowerDeviceTechnical/struct.go +++ b/iSolarCloud/WebIscmAppService/deletePowerDeviceTechnical/struct.go @@ -6,8 +6,8 @@ package deletePowerDeviceTechnical import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/deletePowerStore/data.go b/iSolarCloud/WebIscmAppService/deletePowerStore/data.go index 4a8f35104..8b0184175 100644 --- a/iSolarCloud/WebIscmAppService/deletePowerStore/data.go +++ b/iSolarCloud/WebIscmAppService/deletePowerStore/data.go @@ -2,8 +2,8 @@ package deletePowerStore import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/deletePowerStore/struct.go b/iSolarCloud/WebIscmAppService/deletePowerStore/struct.go index 6ade7b034..3357e08cf 100644 --- a/iSolarCloud/WebIscmAppService/deletePowerStore/struct.go +++ b/iSolarCloud/WebIscmAppService/deletePowerStore/struct.go @@ -6,8 +6,8 @@ package deletePowerStore import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/deleteProcessDefinition/data.go b/iSolarCloud/WebIscmAppService/deleteProcessDefinition/data.go index 0da0f9384..bd6f09b70 100644 --- a/iSolarCloud/WebIscmAppService/deleteProcessDefinition/data.go +++ b/iSolarCloud/WebIscmAppService/deleteProcessDefinition/data.go @@ -2,8 +2,8 @@ package deleteProcessDefinition import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/deleteProcessDefinition/struct.go b/iSolarCloud/WebIscmAppService/deleteProcessDefinition/struct.go index e143e0e8c..e0d2e62be 100644 --- a/iSolarCloud/WebIscmAppService/deleteProcessDefinition/struct.go +++ b/iSolarCloud/WebIscmAppService/deleteProcessDefinition/struct.go @@ -6,8 +6,8 @@ package deleteProcessDefinition import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/deleteReport/data.go b/iSolarCloud/WebIscmAppService/deleteReport/data.go index aa11a16d2..f8dc70e5b 100644 --- a/iSolarCloud/WebIscmAppService/deleteReport/data.go +++ b/iSolarCloud/WebIscmAppService/deleteReport/data.go @@ -2,8 +2,8 @@ package deleteReport import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/deleteReport/struct.go b/iSolarCloud/WebIscmAppService/deleteReport/struct.go index 7605fde41..abd894b82 100644 --- a/iSolarCloud/WebIscmAppService/deleteReport/struct.go +++ b/iSolarCloud/WebIscmAppService/deleteReport/struct.go @@ -6,8 +6,8 @@ package deleteReport import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/deleteUserNode/data.go b/iSolarCloud/WebIscmAppService/deleteUserNode/data.go index 766beb72b..69d44004a 100644 --- a/iSolarCloud/WebIscmAppService/deleteUserNode/data.go +++ b/iSolarCloud/WebIscmAppService/deleteUserNode/data.go @@ -2,8 +2,8 @@ package deleteUserNode import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/deleteUserNode/struct.go b/iSolarCloud/WebIscmAppService/deleteUserNode/struct.go index 69df754e4..52944bd44 100644 --- a/iSolarCloud/WebIscmAppService/deleteUserNode/struct.go +++ b/iSolarCloud/WebIscmAppService/deleteUserNode/struct.go @@ -6,8 +6,8 @@ package deleteUserNode import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/deployProcess/data.go b/iSolarCloud/WebIscmAppService/deployProcess/data.go index 840155a16..785da2c36 100644 --- a/iSolarCloud/WebIscmAppService/deployProcess/data.go +++ b/iSolarCloud/WebIscmAppService/deployProcess/data.go @@ -2,8 +2,8 @@ package deployProcess import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/deployProcess/struct.go b/iSolarCloud/WebIscmAppService/deployProcess/struct.go index fb8a5004a..75837eaa4 100644 --- a/iSolarCloud/WebIscmAppService/deployProcess/struct.go +++ b/iSolarCloud/WebIscmAppService/deployProcess/struct.go @@ -6,8 +6,8 @@ package deployProcess import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/editProcessManageAction/data.go b/iSolarCloud/WebIscmAppService/editProcessManageAction/data.go index a9da80866..89389f8d7 100644 --- a/iSolarCloud/WebIscmAppService/editProcessManageAction/data.go +++ b/iSolarCloud/WebIscmAppService/editProcessManageAction/data.go @@ -2,8 +2,8 @@ package editProcessManageAction import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/editProcessManageAction/struct.go b/iSolarCloud/WebIscmAppService/editProcessManageAction/struct.go index b2568eca2..3389e95a6 100644 --- a/iSolarCloud/WebIscmAppService/editProcessManageAction/struct.go +++ b/iSolarCloud/WebIscmAppService/editProcessManageAction/struct.go @@ -6,8 +6,8 @@ package editProcessManageAction import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/findImageInputStreamString/data.go b/iSolarCloud/WebIscmAppService/findImageInputStreamString/data.go index 2c5dbde99..990d3cba1 100644 --- a/iSolarCloud/WebIscmAppService/findImageInputStreamString/data.go +++ b/iSolarCloud/WebIscmAppService/findImageInputStreamString/data.go @@ -2,8 +2,8 @@ package findImageInputStreamString import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/findImageInputStreamString/struct.go b/iSolarCloud/WebIscmAppService/findImageInputStreamString/struct.go index bbcd1a96e..0330e6123 100644 --- a/iSolarCloud/WebIscmAppService/findImageInputStreamString/struct.go +++ b/iSolarCloud/WebIscmAppService/findImageInputStreamString/struct.go @@ -6,8 +6,8 @@ package findImageInputStreamString import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getAllDevTypeList/data.go b/iSolarCloud/WebIscmAppService/getAllDevTypeList/data.go index 4dd7c2537..9fb61f087 100644 --- a/iSolarCloud/WebIscmAppService/getAllDevTypeList/data.go +++ b/iSolarCloud/WebIscmAppService/getAllDevTypeList/data.go @@ -2,8 +2,8 @@ package getAllDevTypeList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getAllDevTypeList/struct.go b/iSolarCloud/WebIscmAppService/getAllDevTypeList/struct.go index 7d4d255f8..88ecd0326 100644 --- a/iSolarCloud/WebIscmAppService/getAllDevTypeList/struct.go +++ b/iSolarCloud/WebIscmAppService/getAllDevTypeList/struct.go @@ -6,8 +6,8 @@ package getAllDevTypeList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getAllNodeByType/data.go b/iSolarCloud/WebIscmAppService/getAllNodeByType/data.go index 3f96e1d26..71bb9e3e2 100644 --- a/iSolarCloud/WebIscmAppService/getAllNodeByType/data.go +++ b/iSolarCloud/WebIscmAppService/getAllNodeByType/data.go @@ -2,8 +2,8 @@ package getAllNodeByType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getAllNodeByType/struct.go b/iSolarCloud/WebIscmAppService/getAllNodeByType/struct.go index 2f9f929b9..b2c0a3c05 100644 --- a/iSolarCloud/WebIscmAppService/getAllNodeByType/struct.go +++ b/iSolarCloud/WebIscmAppService/getAllNodeByType/struct.go @@ -6,8 +6,8 @@ package getAllNodeByType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getAuthKey/data.go b/iSolarCloud/WebIscmAppService/getAuthKey/data.go index e4bf9e7af..374333946 100644 --- a/iSolarCloud/WebIscmAppService/getAuthKey/data.go +++ b/iSolarCloud/WebIscmAppService/getAuthKey/data.go @@ -2,8 +2,8 @@ package getAuthKey import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getAuthKey/struct.go b/iSolarCloud/WebIscmAppService/getAuthKey/struct.go index ac5e15ba4..98ac4d7b7 100644 --- a/iSolarCloud/WebIscmAppService/getAuthKey/struct.go +++ b/iSolarCloud/WebIscmAppService/getAuthKey/struct.go @@ -6,8 +6,8 @@ package getAuthKey import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getAuthKeyList/data.go b/iSolarCloud/WebIscmAppService/getAuthKeyList/data.go index ac99a29a9..686da8afd 100644 --- a/iSolarCloud/WebIscmAppService/getAuthKeyList/data.go +++ b/iSolarCloud/WebIscmAppService/getAuthKeyList/data.go @@ -2,8 +2,8 @@ package getAuthKeyList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getAuthKeyList/struct.go b/iSolarCloud/WebIscmAppService/getAuthKeyList/struct.go index 1e245c335..aaded4223 100644 --- a/iSolarCloud/WebIscmAppService/getAuthKeyList/struct.go +++ b/iSolarCloud/WebIscmAppService/getAuthKeyList/struct.go @@ -6,8 +6,8 @@ package getAuthKeyList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getCodeByType/data.go b/iSolarCloud/WebIscmAppService/getCodeByType/data.go index a5b0698e2..0f9407d30 100644 --- a/iSolarCloud/WebIscmAppService/getCodeByType/data.go +++ b/iSolarCloud/WebIscmAppService/getCodeByType/data.go @@ -2,8 +2,8 @@ package getCodeByType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getCodeByType/struct.go b/iSolarCloud/WebIscmAppService/getCodeByType/struct.go index ad5209bf5..2a5f18ca4 100644 --- a/iSolarCloud/WebIscmAppService/getCodeByType/struct.go +++ b/iSolarCloud/WebIscmAppService/getCodeByType/struct.go @@ -6,8 +6,8 @@ package getCodeByType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getContactMessage/data.go b/iSolarCloud/WebIscmAppService/getContactMessage/data.go index a02a5c879..0a109a8c8 100644 --- a/iSolarCloud/WebIscmAppService/getContactMessage/data.go +++ b/iSolarCloud/WebIscmAppService/getContactMessage/data.go @@ -2,8 +2,8 @@ package getContactMessage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getContactMessage/struct.go b/iSolarCloud/WebIscmAppService/getContactMessage/struct.go index 77d2c60d4..7178c01fe 100644 --- a/iSolarCloud/WebIscmAppService/getContactMessage/struct.go +++ b/iSolarCloud/WebIscmAppService/getContactMessage/struct.go @@ -6,8 +6,8 @@ package getContactMessage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getCountryNew/data.go b/iSolarCloud/WebIscmAppService/getCountryNew/data.go index 698b93e10..8fd712fdd 100644 --- a/iSolarCloud/WebIscmAppService/getCountryNew/data.go +++ b/iSolarCloud/WebIscmAppService/getCountryNew/data.go @@ -2,8 +2,8 @@ package getCountryNew import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getCountryNew/struct.go b/iSolarCloud/WebIscmAppService/getCountryNew/struct.go index f224d595f..a220ae7e3 100644 --- a/iSolarCloud/WebIscmAppService/getCountryNew/struct.go +++ b/iSolarCloud/WebIscmAppService/getCountryNew/struct.go @@ -6,8 +6,8 @@ package getCountryNew import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getDefinitionIdByKey/data.go b/iSolarCloud/WebIscmAppService/getDefinitionIdByKey/data.go index 54b2a6776..3131af0f1 100644 --- a/iSolarCloud/WebIscmAppService/getDefinitionIdByKey/data.go +++ b/iSolarCloud/WebIscmAppService/getDefinitionIdByKey/data.go @@ -2,8 +2,8 @@ package getDefinitionIdByKey import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getDefinitionIdByKey/struct.go b/iSolarCloud/WebIscmAppService/getDefinitionIdByKey/struct.go index e18b5b99b..680f874e9 100644 --- a/iSolarCloud/WebIscmAppService/getDefinitionIdByKey/struct.go +++ b/iSolarCloud/WebIscmAppService/getDefinitionIdByKey/struct.go @@ -6,8 +6,8 @@ package getDefinitionIdByKey import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getDeploymentList/data.go b/iSolarCloud/WebIscmAppService/getDeploymentList/data.go index b1d184008..a09f79f55 100644 --- a/iSolarCloud/WebIscmAppService/getDeploymentList/data.go +++ b/iSolarCloud/WebIscmAppService/getDeploymentList/data.go @@ -2,8 +2,8 @@ package getDeploymentList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getDeploymentList/struct.go b/iSolarCloud/WebIscmAppService/getDeploymentList/struct.go index 2481ca294..e51cca4a9 100644 --- a/iSolarCloud/WebIscmAppService/getDeploymentList/struct.go +++ b/iSolarCloud/WebIscmAppService/getDeploymentList/struct.go @@ -6,8 +6,8 @@ package getDeploymentList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getDeviceFactoryListByIds/data.go b/iSolarCloud/WebIscmAppService/getDeviceFactoryListByIds/data.go index 1346c6fb7..ee7d3ccae 100644 --- a/iSolarCloud/WebIscmAppService/getDeviceFactoryListByIds/data.go +++ b/iSolarCloud/WebIscmAppService/getDeviceFactoryListByIds/data.go @@ -2,8 +2,8 @@ package getDeviceFactoryListByIds import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getDeviceFactoryListByIds/struct.go b/iSolarCloud/WebIscmAppService/getDeviceFactoryListByIds/struct.go index 8a71b507d..c4892fb02 100644 --- a/iSolarCloud/WebIscmAppService/getDeviceFactoryListByIds/struct.go +++ b/iSolarCloud/WebIscmAppService/getDeviceFactoryListByIds/struct.go @@ -6,8 +6,8 @@ package getDeviceFactoryListByIds import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getDeviceModel/data.go b/iSolarCloud/WebIscmAppService/getDeviceModel/data.go index bdd3b3656..9ddc82b36 100644 --- a/iSolarCloud/WebIscmAppService/getDeviceModel/data.go +++ b/iSolarCloud/WebIscmAppService/getDeviceModel/data.go @@ -2,8 +2,8 @@ package getDeviceModel import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getDeviceModel/struct.go b/iSolarCloud/WebIscmAppService/getDeviceModel/struct.go index bdda4197d..f7463eb48 100644 --- a/iSolarCloud/WebIscmAppService/getDeviceModel/struct.go +++ b/iSolarCloud/WebIscmAppService/getDeviceModel/struct.go @@ -6,8 +6,8 @@ package getDeviceModel import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getDevicePro/data.go b/iSolarCloud/WebIscmAppService/getDevicePro/data.go index 111f37620..1d507e6ae 100644 --- a/iSolarCloud/WebIscmAppService/getDevicePro/data.go +++ b/iSolarCloud/WebIscmAppService/getDevicePro/data.go @@ -2,8 +2,8 @@ package getDevicePro import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getDevicePro/struct.go b/iSolarCloud/WebIscmAppService/getDevicePro/struct.go index 274ecf361..b0530122a 100644 --- a/iSolarCloud/WebIscmAppService/getDevicePro/struct.go +++ b/iSolarCloud/WebIscmAppService/getDevicePro/struct.go @@ -6,8 +6,8 @@ package getDevicePro import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getDeviceSubType/data.go b/iSolarCloud/WebIscmAppService/getDeviceSubType/data.go index d7c59472e..6828589c4 100644 --- a/iSolarCloud/WebIscmAppService/getDeviceSubType/data.go +++ b/iSolarCloud/WebIscmAppService/getDeviceSubType/data.go @@ -2,8 +2,8 @@ package getDeviceSubType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getDeviceSubType/struct.go b/iSolarCloud/WebIscmAppService/getDeviceSubType/struct.go index e8d7adcaa..499d5588e 100644 --- a/iSolarCloud/WebIscmAppService/getDeviceSubType/struct.go +++ b/iSolarCloud/WebIscmAppService/getDeviceSubType/struct.go @@ -6,8 +6,8 @@ package getDeviceSubType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getDeviceTechnical/data.go b/iSolarCloud/WebIscmAppService/getDeviceTechnical/data.go index 41fcbf62a..d000cb961 100644 --- a/iSolarCloud/WebIscmAppService/getDeviceTechnical/data.go +++ b/iSolarCloud/WebIscmAppService/getDeviceTechnical/data.go @@ -2,8 +2,8 @@ package getDeviceTechnical import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getDeviceTechnical/struct.go b/iSolarCloud/WebIscmAppService/getDeviceTechnical/struct.go index 23cf30b65..6ae98ac15 100644 --- a/iSolarCloud/WebIscmAppService/getDeviceTechnical/struct.go +++ b/iSolarCloud/WebIscmAppService/getDeviceTechnical/struct.go @@ -6,8 +6,8 @@ package getDeviceTechnical import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getDeviceType/data.go b/iSolarCloud/WebIscmAppService/getDeviceType/data.go index 41108d1e3..0829ad2b0 100644 --- a/iSolarCloud/WebIscmAppService/getDeviceType/data.go +++ b/iSolarCloud/WebIscmAppService/getDeviceType/data.go @@ -2,8 +2,8 @@ package getDeviceType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getDeviceType/struct.go b/iSolarCloud/WebIscmAppService/getDeviceType/struct.go index 09afa870b..b79e8fceb 100644 --- a/iSolarCloud/WebIscmAppService/getDeviceType/struct.go +++ b/iSolarCloud/WebIscmAppService/getDeviceType/struct.go @@ -6,8 +6,8 @@ package getDeviceType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getDeviceTypeInfoById/data.go b/iSolarCloud/WebIscmAppService/getDeviceTypeInfoById/data.go index b9da115bf..c7590a79e 100644 --- a/iSolarCloud/WebIscmAppService/getDeviceTypeInfoById/data.go +++ b/iSolarCloud/WebIscmAppService/getDeviceTypeInfoById/data.go @@ -2,8 +2,8 @@ package getDeviceTypeInfoById import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getDeviceTypeInfoById/struct.go b/iSolarCloud/WebIscmAppService/getDeviceTypeInfoById/struct.go index a82428270..fe9e4d9e8 100644 --- a/iSolarCloud/WebIscmAppService/getDeviceTypeInfoById/struct.go +++ b/iSolarCloud/WebIscmAppService/getDeviceTypeInfoById/struct.go @@ -6,8 +6,8 @@ package getDeviceTypeInfoById import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getDutyUserList/data.go b/iSolarCloud/WebIscmAppService/getDutyUserList/data.go index 2e5e35bd8..3b6517a60 100644 --- a/iSolarCloud/WebIscmAppService/getDutyUserList/data.go +++ b/iSolarCloud/WebIscmAppService/getDutyUserList/data.go @@ -2,8 +2,8 @@ package getDutyUserList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getDutyUserList/struct.go b/iSolarCloud/WebIscmAppService/getDutyUserList/struct.go index c8a83b970..5e81ddc8c 100644 --- a/iSolarCloud/WebIscmAppService/getDutyUserList/struct.go +++ b/iSolarCloud/WebIscmAppService/getDutyUserList/struct.go @@ -6,8 +6,8 @@ package getDutyUserList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getFatherPrivileges/data.go b/iSolarCloud/WebIscmAppService/getFatherPrivileges/data.go index 4dc0695e3..58e8c3434 100644 --- a/iSolarCloud/WebIscmAppService/getFatherPrivileges/data.go +++ b/iSolarCloud/WebIscmAppService/getFatherPrivileges/data.go @@ -2,8 +2,8 @@ package getFatherPrivileges import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getFatherPrivileges/struct.go b/iSolarCloud/WebIscmAppService/getFatherPrivileges/struct.go index 4b1688d81..5eead2055 100644 --- a/iSolarCloud/WebIscmAppService/getFatherPrivileges/struct.go +++ b/iSolarCloud/WebIscmAppService/getFatherPrivileges/struct.go @@ -6,8 +6,8 @@ package getFatherPrivileges import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getGroupManSettings/data.go b/iSolarCloud/WebIscmAppService/getGroupManSettings/data.go index dfb250e2e..31c8c868d 100644 --- a/iSolarCloud/WebIscmAppService/getGroupManSettings/data.go +++ b/iSolarCloud/WebIscmAppService/getGroupManSettings/data.go @@ -2,8 +2,8 @@ package getGroupManSettings import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getGroupManSettings/struct.go b/iSolarCloud/WebIscmAppService/getGroupManSettings/struct.go index 06b6c68e6..754b4755f 100644 --- a/iSolarCloud/WebIscmAppService/getGroupManSettings/struct.go +++ b/iSolarCloud/WebIscmAppService/getGroupManSettings/struct.go @@ -6,8 +6,8 @@ package getGroupManSettings import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getGroupManSettingsMembers/data.go b/iSolarCloud/WebIscmAppService/getGroupManSettingsMembers/data.go index 2da922c00..8f000ca7e 100644 --- a/iSolarCloud/WebIscmAppService/getGroupManSettingsMembers/data.go +++ b/iSolarCloud/WebIscmAppService/getGroupManSettingsMembers/data.go @@ -2,8 +2,8 @@ package getGroupManSettingsMembers import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getGroupManSettingsMembers/struct.go b/iSolarCloud/WebIscmAppService/getGroupManSettingsMembers/struct.go index 56487851f..de6df224b 100644 --- a/iSolarCloud/WebIscmAppService/getGroupManSettingsMembers/struct.go +++ b/iSolarCloud/WebIscmAppService/getGroupManSettingsMembers/struct.go @@ -6,8 +6,8 @@ package getGroupManSettingsMembers import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getMaterialByListId/data.go b/iSolarCloud/WebIscmAppService/getMaterialByListId/data.go index 7004862a8..78b916537 100644 --- a/iSolarCloud/WebIscmAppService/getMaterialByListId/data.go +++ b/iSolarCloud/WebIscmAppService/getMaterialByListId/data.go @@ -2,8 +2,8 @@ package getMaterialByListId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getMaterialByListId/struct.go b/iSolarCloud/WebIscmAppService/getMaterialByListId/struct.go index 2e90ce003..3ab5b91c7 100644 --- a/iSolarCloud/WebIscmAppService/getMaterialByListId/struct.go +++ b/iSolarCloud/WebIscmAppService/getMaterialByListId/struct.go @@ -6,8 +6,8 @@ package getMaterialByListId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getMaterialByType/data.go b/iSolarCloud/WebIscmAppService/getMaterialByType/data.go index d9dae98a4..9746cb1f8 100644 --- a/iSolarCloud/WebIscmAppService/getMaterialByType/data.go +++ b/iSolarCloud/WebIscmAppService/getMaterialByType/data.go @@ -2,8 +2,8 @@ package getMaterialByType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getMaterialByType/struct.go b/iSolarCloud/WebIscmAppService/getMaterialByType/struct.go index 1f65ab676..ba76d8e0c 100644 --- a/iSolarCloud/WebIscmAppService/getMaterialByType/struct.go +++ b/iSolarCloud/WebIscmAppService/getMaterialByType/struct.go @@ -6,8 +6,8 @@ package getMaterialByType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getMaterialList/data.go b/iSolarCloud/WebIscmAppService/getMaterialList/data.go index 23a9022f0..04090eb9c 100644 --- a/iSolarCloud/WebIscmAppService/getMaterialList/data.go +++ b/iSolarCloud/WebIscmAppService/getMaterialList/data.go @@ -2,8 +2,8 @@ package getMaterialList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getMaterialList/struct.go b/iSolarCloud/WebIscmAppService/getMaterialList/struct.go index f8696a323..52cd0a11c 100644 --- a/iSolarCloud/WebIscmAppService/getMaterialList/struct.go +++ b/iSolarCloud/WebIscmAppService/getMaterialList/struct.go @@ -6,8 +6,8 @@ package getMaterialList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getMaxDeviceIdByPsId/data.go b/iSolarCloud/WebIscmAppService/getMaxDeviceIdByPsId/data.go index 877f433ab..f957b094c 100644 --- a/iSolarCloud/WebIscmAppService/getMaxDeviceIdByPsId/data.go +++ b/iSolarCloud/WebIscmAppService/getMaxDeviceIdByPsId/data.go @@ -2,8 +2,8 @@ package getMaxDeviceIdByPsId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -44,10 +44,10 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsId.String() - entries.StructToDataMap(*e, e.Request.PsId.String(), apiReflect.NewEndPointPath(e.Request.PsId.String())) + entries.StructToDataMap(*e, e.Request.PsId.String(), GoStruct.NewEndPointPath(e.Request.PsId.String())) } return entries diff --git a/iSolarCloud/WebIscmAppService/getMaxDeviceIdByPsId/struct.go b/iSolarCloud/WebIscmAppService/getMaxDeviceIdByPsId/struct.go index 48f9ff372..aaf52991b 100644 --- a/iSolarCloud/WebIscmAppService/getMaxDeviceIdByPsId/struct.go +++ b/iSolarCloud/WebIscmAppService/getMaxDeviceIdByPsId/struct.go @@ -6,8 +6,8 @@ package getMaxDeviceIdByPsId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getModelPoints/data.go b/iSolarCloud/WebIscmAppService/getModelPoints/data.go index 417a04d30..408f3aa03 100644 --- a/iSolarCloud/WebIscmAppService/getModelPoints/data.go +++ b/iSolarCloud/WebIscmAppService/getModelPoints/data.go @@ -2,8 +2,8 @@ package getModelPoints import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getModelPoints/struct.go b/iSolarCloud/WebIscmAppService/getModelPoints/struct.go index e69da258f..f32a31696 100644 --- a/iSolarCloud/WebIscmAppService/getModelPoints/struct.go +++ b/iSolarCloud/WebIscmAppService/getModelPoints/struct.go @@ -6,8 +6,8 @@ package getModelPoints import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getMoneyUnitList/data.go b/iSolarCloud/WebIscmAppService/getMoneyUnitList/data.go index 92a5a1026..7f634e2a8 100644 --- a/iSolarCloud/WebIscmAppService/getMoneyUnitList/data.go +++ b/iSolarCloud/WebIscmAppService/getMoneyUnitList/data.go @@ -2,8 +2,8 @@ package getMoneyUnitList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getMoneyUnitList/struct.go b/iSolarCloud/WebIscmAppService/getMoneyUnitList/struct.go index 1bcb731fb..57cc7ff69 100644 --- a/iSolarCloud/WebIscmAppService/getMoneyUnitList/struct.go +++ b/iSolarCloud/WebIscmAppService/getMoneyUnitList/struct.go @@ -6,8 +6,8 @@ package getMoneyUnitList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getNamecnNew/data.go b/iSolarCloud/WebIscmAppService/getNamecnNew/data.go index 5be7a458a..37a5abbf0 100644 --- a/iSolarCloud/WebIscmAppService/getNamecnNew/data.go +++ b/iSolarCloud/WebIscmAppService/getNamecnNew/data.go @@ -2,8 +2,8 @@ package getNamecnNew import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getNamecnNew/struct.go b/iSolarCloud/WebIscmAppService/getNamecnNew/struct.go index b6fa04020..acf3c3c40 100644 --- a/iSolarCloud/WebIscmAppService/getNamecnNew/struct.go +++ b/iSolarCloud/WebIscmAppService/getNamecnNew/struct.go @@ -6,8 +6,8 @@ package getNamecnNew import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getNationList/data.go b/iSolarCloud/WebIscmAppService/getNationList/data.go index fd16eb4ed..7894296f8 100644 --- a/iSolarCloud/WebIscmAppService/getNationList/data.go +++ b/iSolarCloud/WebIscmAppService/getNationList/data.go @@ -2,8 +2,8 @@ package getNationList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getNationList/struct.go b/iSolarCloud/WebIscmAppService/getNationList/struct.go index 070906059..63e01f25e 100644 --- a/iSolarCloud/WebIscmAppService/getNationList/struct.go +++ b/iSolarCloud/WebIscmAppService/getNationList/struct.go @@ -6,8 +6,8 @@ package getNationList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getOperationRecord/data.go b/iSolarCloud/WebIscmAppService/getOperationRecord/data.go index 8ca7d96e3..6542ee76d 100644 --- a/iSolarCloud/WebIscmAppService/getOperationRecord/data.go +++ b/iSolarCloud/WebIscmAppService/getOperationRecord/data.go @@ -2,8 +2,8 @@ package getOperationRecord import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getOperationRecord/struct.go b/iSolarCloud/WebIscmAppService/getOperationRecord/struct.go index 97e46318a..c37675027 100644 --- a/iSolarCloud/WebIscmAppService/getOperationRecord/struct.go +++ b/iSolarCloud/WebIscmAppService/getOperationRecord/struct.go @@ -6,8 +6,8 @@ package getOperationRecord import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getOrgAndChildBasicInfoOptions/data.go b/iSolarCloud/WebIscmAppService/getOrgAndChildBasicInfoOptions/data.go index baedb935c..292bb325c 100644 --- a/iSolarCloud/WebIscmAppService/getOrgAndChildBasicInfoOptions/data.go +++ b/iSolarCloud/WebIscmAppService/getOrgAndChildBasicInfoOptions/data.go @@ -2,8 +2,8 @@ package getOrgAndChildBasicInfoOptions import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getOrgAndChildBasicInfoOptions/struct.go b/iSolarCloud/WebIscmAppService/getOrgAndChildBasicInfoOptions/struct.go index 7cb56d62a..b9382e491 100644 --- a/iSolarCloud/WebIscmAppService/getOrgAndChildBasicInfoOptions/struct.go +++ b/iSolarCloud/WebIscmAppService/getOrgAndChildBasicInfoOptions/struct.go @@ -6,8 +6,8 @@ package getOrgAndChildBasicInfoOptions import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getOrgAndStateAndCode/data.go b/iSolarCloud/WebIscmAppService/getOrgAndStateAndCode/data.go index 1c8ef2743..5ad86c2d7 100644 --- a/iSolarCloud/WebIscmAppService/getOrgAndStateAndCode/data.go +++ b/iSolarCloud/WebIscmAppService/getOrgAndStateAndCode/data.go @@ -2,8 +2,8 @@ package getOrgAndStateAndCode import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getOrgAndStateAndCode/struct.go b/iSolarCloud/WebIscmAppService/getOrgAndStateAndCode/struct.go index 77635a017..9f2374d2c 100644 --- a/iSolarCloud/WebIscmAppService/getOrgAndStateAndCode/struct.go +++ b/iSolarCloud/WebIscmAppService/getOrgAndStateAndCode/struct.go @@ -6,8 +6,8 @@ package getOrgAndStateAndCode import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getOrgForPs/data.go b/iSolarCloud/WebIscmAppService/getOrgForPs/data.go index b970490f9..ea2d379b7 100644 --- a/iSolarCloud/WebIscmAppService/getOrgForPs/data.go +++ b/iSolarCloud/WebIscmAppService/getOrgForPs/data.go @@ -2,8 +2,8 @@ package getOrgForPs import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getOrgForPs/struct.go b/iSolarCloud/WebIscmAppService/getOrgForPs/struct.go index f86565a44..0f2e5e190 100644 --- a/iSolarCloud/WebIscmAppService/getOrgForPs/struct.go +++ b/iSolarCloud/WebIscmAppService/getOrgForPs/struct.go @@ -6,8 +6,8 @@ package getOrgForPs import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getOrgList/data.go b/iSolarCloud/WebIscmAppService/getOrgList/data.go index 88382afca..4c631e4fc 100644 --- a/iSolarCloud/WebIscmAppService/getOrgList/data.go +++ b/iSolarCloud/WebIscmAppService/getOrgList/data.go @@ -2,8 +2,8 @@ package getOrgList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getOrgList/struct.go b/iSolarCloud/WebIscmAppService/getOrgList/struct.go index faeea912a..3c2284ecd 100644 --- a/iSolarCloud/WebIscmAppService/getOrgList/struct.go +++ b/iSolarCloud/WebIscmAppService/getOrgList/struct.go @@ -6,8 +6,8 @@ package getOrgList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getOrgListForUser/data.go b/iSolarCloud/WebIscmAppService/getOrgListForUser/data.go index e6a1c6862..f91de63ee 100644 --- a/iSolarCloud/WebIscmAppService/getOrgListForUser/data.go +++ b/iSolarCloud/WebIscmAppService/getOrgListForUser/data.go @@ -2,8 +2,8 @@ package getOrgListForUser import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getOrgListForUser/struct.go b/iSolarCloud/WebIscmAppService/getOrgListForUser/struct.go index 97d96ffbc..81da471db 100644 --- a/iSolarCloud/WebIscmAppService/getOrgListForUser/struct.go +++ b/iSolarCloud/WebIscmAppService/getOrgListForUser/struct.go @@ -6,8 +6,8 @@ package getOrgListForUser import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getOrgNodeInfo/data.go b/iSolarCloud/WebIscmAppService/getOrgNodeInfo/data.go index e044b302c..713cc77e4 100644 --- a/iSolarCloud/WebIscmAppService/getOrgNodeInfo/data.go +++ b/iSolarCloud/WebIscmAppService/getOrgNodeInfo/data.go @@ -2,8 +2,8 @@ package getOrgNodeInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getOrgNodeInfo/struct.go b/iSolarCloud/WebIscmAppService/getOrgNodeInfo/struct.go index 89097a88a..3ea67de3e 100644 --- a/iSolarCloud/WebIscmAppService/getOrgNodeInfo/struct.go +++ b/iSolarCloud/WebIscmAppService/getOrgNodeInfo/struct.go @@ -6,8 +6,8 @@ package getOrgNodeInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getOrgStationList/data.go b/iSolarCloud/WebIscmAppService/getOrgStationList/data.go index 735f0a8ba..f4352c2ca 100644 --- a/iSolarCloud/WebIscmAppService/getOrgStationList/data.go +++ b/iSolarCloud/WebIscmAppService/getOrgStationList/data.go @@ -2,8 +2,8 @@ package getOrgStationList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getOrgStationList/struct.go b/iSolarCloud/WebIscmAppService/getOrgStationList/struct.go index d26d17dbc..e7bdffe2b 100644 --- a/iSolarCloud/WebIscmAppService/getOrgStationList/struct.go +++ b/iSolarCloud/WebIscmAppService/getOrgStationList/struct.go @@ -6,8 +6,8 @@ package getOrgStationList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getOrgStationListByPage/data.go b/iSolarCloud/WebIscmAppService/getOrgStationListByPage/data.go index 829485df6..f9feb8ab8 100644 --- a/iSolarCloud/WebIscmAppService/getOrgStationListByPage/data.go +++ b/iSolarCloud/WebIscmAppService/getOrgStationListByPage/data.go @@ -2,8 +2,8 @@ package getOrgStationListByPage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getOrgStationListByPage/struct.go b/iSolarCloud/WebIscmAppService/getOrgStationListByPage/struct.go index 587161105..9dea8df1d 100644 --- a/iSolarCloud/WebIscmAppService/getOrgStationListByPage/struct.go +++ b/iSolarCloud/WebIscmAppService/getOrgStationListByPage/struct.go @@ -6,8 +6,8 @@ package getOrgStationListByPage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getOrgUserList/data.go b/iSolarCloud/WebIscmAppService/getOrgUserList/data.go index 61d8d3829..d2a75c8b5 100644 --- a/iSolarCloud/WebIscmAppService/getOrgUserList/data.go +++ b/iSolarCloud/WebIscmAppService/getOrgUserList/data.go @@ -2,8 +2,8 @@ package getOrgUserList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getOrgUserList/struct.go b/iSolarCloud/WebIscmAppService/getOrgUserList/struct.go index 255f090d5..4105b82e0 100644 --- a/iSolarCloud/WebIscmAppService/getOrgUserList/struct.go +++ b/iSolarCloud/WebIscmAppService/getOrgUserList/struct.go @@ -6,8 +6,8 @@ package getOrgUserList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getOrgUserMapData/data.go b/iSolarCloud/WebIscmAppService/getOrgUserMapData/data.go index 10cae3502..b9e4de86c 100644 --- a/iSolarCloud/WebIscmAppService/getOrgUserMapData/data.go +++ b/iSolarCloud/WebIscmAppService/getOrgUserMapData/data.go @@ -2,8 +2,8 @@ package getOrgUserMapData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -25,13 +25,13 @@ func (rd RequestData) Help() string { } type ResultData struct { - CurPage valueTypes.Integer `json:"curPage"` - IsMore interface{} `json:"isMore"` - PageList []interface{} `json:"pageList"` - RowCount valueTypes.Integer `json:"rowCount"` + CurPage valueTypes.Integer `json:"curPage" PointId:"cur_page"` + IsMore interface{} `json:"isMore" PointId:"is_more"` + PageList []interface{} `json:"pageList" PointId:"page_list"` + RowCount valueTypes.Integer `json:"rowCount" PointId:"row_count"` Size valueTypes.Integer `json:"size"` - StartIndex interface{} `json:"startIndex"` - TotalPage interface{} `json:"totalPage"` + StartIndex interface{} `json:"startIndex" PointId:"start_index"` + TotalPage interface{} `json:"totalPage" PointId:"total_page"` } func (e *ResultData) IsValid() error { diff --git a/iSolarCloud/WebIscmAppService/getOrgUserMapData/struct.go b/iSolarCloud/WebIscmAppService/getOrgUserMapData/struct.go index 90bda17f9..646774c3f 100644 --- a/iSolarCloud/WebIscmAppService/getOrgUserMapData/struct.go +++ b/iSolarCloud/WebIscmAppService/getOrgUserMapData/struct.go @@ -6,8 +6,8 @@ package getOrgUserMapData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getOrgZtree/data.go b/iSolarCloud/WebIscmAppService/getOrgZtree/data.go index fdc225eff..846c88df9 100644 --- a/iSolarCloud/WebIscmAppService/getOrgZtree/data.go +++ b/iSolarCloud/WebIscmAppService/getOrgZtree/data.go @@ -2,8 +2,8 @@ package getOrgZtree import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getOrgZtree/struct.go b/iSolarCloud/WebIscmAppService/getOrgZtree/struct.go index 12b3f8969..92e0e038f 100644 --- a/iSolarCloud/WebIscmAppService/getOrgZtree/struct.go +++ b/iSolarCloud/WebIscmAppService/getOrgZtree/struct.go @@ -6,8 +6,8 @@ package getOrgZtree import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getOrgZtree4User/data.go b/iSolarCloud/WebIscmAppService/getOrgZtree4User/data.go index fa71b74f7..4496ae576 100644 --- a/iSolarCloud/WebIscmAppService/getOrgZtree4User/data.go +++ b/iSolarCloud/WebIscmAppService/getOrgZtree4User/data.go @@ -2,8 +2,8 @@ package getOrgZtree4User import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getOrgZtree4User/struct.go b/iSolarCloud/WebIscmAppService/getOrgZtree4User/struct.go index dc42c4122..ae6ed2087 100644 --- a/iSolarCloud/WebIscmAppService/getOrgZtree4User/struct.go +++ b/iSolarCloud/WebIscmAppService/getOrgZtree4User/struct.go @@ -6,8 +6,8 @@ package getOrgZtree4User import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getOrgZtreeAsync/data.go b/iSolarCloud/WebIscmAppService/getOrgZtreeAsync/data.go index b068a87fb..3a3667fb7 100644 --- a/iSolarCloud/WebIscmAppService/getOrgZtreeAsync/data.go +++ b/iSolarCloud/WebIscmAppService/getOrgZtreeAsync/data.go @@ -2,8 +2,8 @@ package getOrgZtreeAsync import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getOrgZtreeAsync/struct.go b/iSolarCloud/WebIscmAppService/getOrgZtreeAsync/struct.go index b4507d591..e0b33df6c 100644 --- a/iSolarCloud/WebIscmAppService/getOrgZtreeAsync/struct.go +++ b/iSolarCloud/WebIscmAppService/getOrgZtreeAsync/struct.go @@ -6,8 +6,8 @@ package getOrgZtreeAsync import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getOrgZtreeForUser/data.go b/iSolarCloud/WebIscmAppService/getOrgZtreeForUser/data.go index 363470cf0..0f9acc6a0 100644 --- a/iSolarCloud/WebIscmAppService/getOrgZtreeForUser/data.go +++ b/iSolarCloud/WebIscmAppService/getOrgZtreeForUser/data.go @@ -2,8 +2,8 @@ package getOrgZtreeForUser import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getOrgZtreeForUser/struct.go b/iSolarCloud/WebIscmAppService/getOrgZtreeForUser/struct.go index 772e86f3d..00c2c644d 100644 --- a/iSolarCloud/WebIscmAppService/getOrgZtreeForUser/struct.go +++ b/iSolarCloud/WebIscmAppService/getOrgZtreeForUser/struct.go @@ -6,8 +6,8 @@ package getOrgZtreeForUser import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getPictureList/data.go b/iSolarCloud/WebIscmAppService/getPictureList/data.go index 9b27169cc..e08ffbd94 100644 --- a/iSolarCloud/WebIscmAppService/getPictureList/data.go +++ b/iSolarCloud/WebIscmAppService/getPictureList/data.go @@ -2,8 +2,8 @@ package getPictureList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getPictureList/struct.go b/iSolarCloud/WebIscmAppService/getPictureList/struct.go index 3d0536a9f..db8f2b866 100644 --- a/iSolarCloud/WebIscmAppService/getPictureList/struct.go +++ b/iSolarCloud/WebIscmAppService/getPictureList/struct.go @@ -6,8 +6,8 @@ package getPictureList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getPointInfo/data.go b/iSolarCloud/WebIscmAppService/getPointInfo/data.go index 93191832a..01176c6c5 100644 --- a/iSolarCloud/WebIscmAppService/getPointInfo/data.go +++ b/iSolarCloud/WebIscmAppService/getPointInfo/data.go @@ -2,8 +2,8 @@ package getPointInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -58,7 +58,7 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg // + "." + e.Request.PsId.String() entries.StructToDataMap(*e, "system", nil) diff --git a/iSolarCloud/WebIscmAppService/getPointInfo/struct.go b/iSolarCloud/WebIscmAppService/getPointInfo/struct.go index 720163f1e..ba5975dfe 100644 --- a/iSolarCloud/WebIscmAppService/getPointInfo/struct.go +++ b/iSolarCloud/WebIscmAppService/getPointInfo/struct.go @@ -6,8 +6,8 @@ package getPointInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getPointInfoPage/data.go b/iSolarCloud/WebIscmAppService/getPointInfoPage/data.go index c2a41dde0..aef9f0460 100644 --- a/iSolarCloud/WebIscmAppService/getPointInfoPage/data.go +++ b/iSolarCloud/WebIscmAppService/getPointInfoPage/data.go @@ -2,8 +2,8 @@ package getPointInfoPage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getPointInfoPage/struct.go b/iSolarCloud/WebIscmAppService/getPointInfoPage/struct.go index b1c1a9e7a..2e4172444 100644 --- a/iSolarCloud/WebIscmAppService/getPointInfoPage/struct.go +++ b/iSolarCloud/WebIscmAppService/getPointInfoPage/struct.go @@ -6,8 +6,8 @@ package getPointInfoPage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getPowerDevice/data.go b/iSolarCloud/WebIscmAppService/getPowerDevice/data.go index 9d1ca048f..976a03c41 100644 --- a/iSolarCloud/WebIscmAppService/getPowerDevice/data.go +++ b/iSolarCloud/WebIscmAppService/getPowerDevice/data.go @@ -2,8 +2,8 @@ package getPowerDevice import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getPowerDevice/struct.go b/iSolarCloud/WebIscmAppService/getPowerDevice/struct.go index 8392ffd57..53cac5be1 100644 --- a/iSolarCloud/WebIscmAppService/getPowerDevice/struct.go +++ b/iSolarCloud/WebIscmAppService/getPowerDevice/struct.go @@ -6,8 +6,8 @@ package getPowerDevice import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getPowerDeviceChannl/data.go b/iSolarCloud/WebIscmAppService/getPowerDeviceChannl/data.go index c5350041f..f35b4aad5 100644 --- a/iSolarCloud/WebIscmAppService/getPowerDeviceChannl/data.go +++ b/iSolarCloud/WebIscmAppService/getPowerDeviceChannl/data.go @@ -2,8 +2,8 @@ package getPowerDeviceChannl import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getPowerDeviceChannl/struct.go b/iSolarCloud/WebIscmAppService/getPowerDeviceChannl/struct.go index 5f8087ccf..29b16c650 100644 --- a/iSolarCloud/WebIscmAppService/getPowerDeviceChannl/struct.go +++ b/iSolarCloud/WebIscmAppService/getPowerDeviceChannl/struct.go @@ -6,8 +6,8 @@ package getPowerDeviceChannl import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getPowerDeviceFactory/data.go b/iSolarCloud/WebIscmAppService/getPowerDeviceFactory/data.go index 90e8879fb..2fbebed76 100644 --- a/iSolarCloud/WebIscmAppService/getPowerDeviceFactory/data.go +++ b/iSolarCloud/WebIscmAppService/getPowerDeviceFactory/data.go @@ -2,8 +2,8 @@ package getPowerDeviceFactory import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getPowerDeviceFactory/struct.go b/iSolarCloud/WebIscmAppService/getPowerDeviceFactory/struct.go index 0fa513248..6e1023e66 100644 --- a/iSolarCloud/WebIscmAppService/getPowerDeviceFactory/struct.go +++ b/iSolarCloud/WebIscmAppService/getPowerDeviceFactory/struct.go @@ -6,8 +6,8 @@ package getPowerDeviceFactory import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getPowerDeviceFactoryListCount/data.go b/iSolarCloud/WebIscmAppService/getPowerDeviceFactoryListCount/data.go index 314f688fd..c3a7e10ff 100644 --- a/iSolarCloud/WebIscmAppService/getPowerDeviceFactoryListCount/data.go +++ b/iSolarCloud/WebIscmAppService/getPowerDeviceFactoryListCount/data.go @@ -2,8 +2,8 @@ package getPowerDeviceFactoryListCount import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getPowerDeviceFactoryListCount/struct.go b/iSolarCloud/WebIscmAppService/getPowerDeviceFactoryListCount/struct.go index 9fd03bcfd..2fb255159 100644 --- a/iSolarCloud/WebIscmAppService/getPowerDeviceFactoryListCount/struct.go +++ b/iSolarCloud/WebIscmAppService/getPowerDeviceFactoryListCount/struct.go @@ -6,8 +6,8 @@ package getPowerDeviceFactoryListCount import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getPowerDeviceInfo/data.go b/iSolarCloud/WebIscmAppService/getPowerDeviceInfo/data.go index d9b673dba..4180ad92c 100644 --- a/iSolarCloud/WebIscmAppService/getPowerDeviceInfo/data.go +++ b/iSolarCloud/WebIscmAppService/getPowerDeviceInfo/data.go @@ -2,8 +2,8 @@ package getPowerDeviceInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getPowerDeviceInfo/struct.go b/iSolarCloud/WebIscmAppService/getPowerDeviceInfo/struct.go index cce3d0902..15d3dafcc 100644 --- a/iSolarCloud/WebIscmAppService/getPowerDeviceInfo/struct.go +++ b/iSolarCloud/WebIscmAppService/getPowerDeviceInfo/struct.go @@ -6,8 +6,8 @@ package getPowerDeviceInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getPowerDeviceModelList/data.go b/iSolarCloud/WebIscmAppService/getPowerDeviceModelList/data.go index 1bc23f47d..16932f631 100644 --- a/iSolarCloud/WebIscmAppService/getPowerDeviceModelList/data.go +++ b/iSolarCloud/WebIscmAppService/getPowerDeviceModelList/data.go @@ -2,8 +2,8 @@ package getPowerDeviceModelList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -17,7 +17,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getPowerDeviceModelList/struct.go b/iSolarCloud/WebIscmAppService/getPowerDeviceModelList/struct.go index 13c23749c..dfa9355f1 100644 --- a/iSolarCloud/WebIscmAppService/getPowerDeviceModelList/struct.go +++ b/iSolarCloud/WebIscmAppService/getPowerDeviceModelList/struct.go @@ -6,8 +6,8 @@ package getPowerDeviceModelList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getPowerDeviceModelTechList/data.go b/iSolarCloud/WebIscmAppService/getPowerDeviceModelTechList/data.go index 910ed9eb0..2feff5b17 100644 --- a/iSolarCloud/WebIscmAppService/getPowerDeviceModelTechList/data.go +++ b/iSolarCloud/WebIscmAppService/getPowerDeviceModelTechList/data.go @@ -2,8 +2,8 @@ package getPowerDeviceModelTechList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getPowerDeviceModelTechList/struct.go b/iSolarCloud/WebIscmAppService/getPowerDeviceModelTechList/struct.go index 0527e4ae7..0bad1ed8d 100644 --- a/iSolarCloud/WebIscmAppService/getPowerDeviceModelTechList/struct.go +++ b/iSolarCloud/WebIscmAppService/getPowerDeviceModelTechList/struct.go @@ -6,8 +6,8 @@ package getPowerDeviceModelTechList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getPowerDeviceTypeList/data.go b/iSolarCloud/WebIscmAppService/getPowerDeviceTypeList/data.go index 90fbbd40b..c85708eb1 100644 --- a/iSolarCloud/WebIscmAppService/getPowerDeviceTypeList/data.go +++ b/iSolarCloud/WebIscmAppService/getPowerDeviceTypeList/data.go @@ -2,8 +2,8 @@ package getPowerDeviceTypeList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getPowerDeviceTypeList/struct.go b/iSolarCloud/WebIscmAppService/getPowerDeviceTypeList/struct.go index d15f46cc7..b9727bf72 100644 --- a/iSolarCloud/WebIscmAppService/getPowerDeviceTypeList/struct.go +++ b/iSolarCloud/WebIscmAppService/getPowerDeviceTypeList/struct.go @@ -6,8 +6,8 @@ package getPowerDeviceTypeList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getPowerPlanList/data.go b/iSolarCloud/WebIscmAppService/getPowerPlanList/data.go index 38c01e7eb..fc1938106 100644 --- a/iSolarCloud/WebIscmAppService/getPowerPlanList/data.go +++ b/iSolarCloud/WebIscmAppService/getPowerPlanList/data.go @@ -2,8 +2,8 @@ package getPowerPlanList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getPowerPlanList/struct.go b/iSolarCloud/WebIscmAppService/getPowerPlanList/struct.go index fc372ba47..0b0f87f5b 100644 --- a/iSolarCloud/WebIscmAppService/getPowerPlanList/struct.go +++ b/iSolarCloud/WebIscmAppService/getPowerPlanList/struct.go @@ -6,8 +6,8 @@ package getPowerPlanList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getPowerStation/data.go b/iSolarCloud/WebIscmAppService/getPowerStation/data.go index 768387357..c5d7c2540 100644 --- a/iSolarCloud/WebIscmAppService/getPowerStation/data.go +++ b/iSolarCloud/WebIscmAppService/getPowerStation/data.go @@ -2,8 +2,8 @@ package getPowerStation import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getPowerStation/struct.go b/iSolarCloud/WebIscmAppService/getPowerStation/struct.go index 7e42d6c4b..e93a4636b 100644 --- a/iSolarCloud/WebIscmAppService/getPowerStation/struct.go +++ b/iSolarCloud/WebIscmAppService/getPowerStation/struct.go @@ -6,8 +6,8 @@ package getPowerStation import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getPowerStationInfo/data.go b/iSolarCloud/WebIscmAppService/getPowerStationInfo/data.go index 8e8dc4420..001e2173f 100644 --- a/iSolarCloud/WebIscmAppService/getPowerStationInfo/data.go +++ b/iSolarCloud/WebIscmAppService/getPowerStationInfo/data.go @@ -2,8 +2,8 @@ package getPowerStationInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -46,7 +46,7 @@ type ResultData struct { IsOpenProtocol valueTypes.String `json:"is_open_protocol"` IsReceiveNotice valueTypes.String `json:"is_receive_notice"` IsSharePosition valueTypes.String `json:"is_share_position"` - MobleTel interface{} `json:"moble_tel"` + MobleTel interface{} `json:"moble_tel" PointId:"mobile_tel"` Monetary interface{} `json:"monetary"` ParamCo2 float64 `json:"param_co2"` ParamConverRate valueTypes.Integer `json:"param_conver_rate"` @@ -139,11 +139,11 @@ type ResultData struct { } `json:"psMap"` RemindType interface{} `json:"remindType"` SnInfoList []struct { - ChnnlDesc interface{} `json:"chnnl_desc"` - ChnnlID valueTypes.Integer `json:"chnnl_id"` - ChnnlName valueTypes.String `json:"chnnl_name"` - CrtDate valueTypes.String `json:"crt_date"` - CrtUserName interface{} `json:"crt_user_name"` + ChnnlDesc interface{} `json:"chnnl_desc" PointId:"channel_description"` + ChnnlID valueTypes.Integer `json:"chnnl_id" PointId:"channel_id"` + ChnnlName valueTypes.String `json:"chnnl_name PointId:"channel_name"` + CrtDate valueTypes.String `json:"crt_date" PointId:"create_date"` + CrtUserName interface{} `json:"crt_user_name" PointId:"create_username"` DataFlag valueTypes.Integer `json:"data_flag"` FlagServer interface{} `json:"flag_server"` HostIP interface{} `json:"host_ip"` diff --git a/iSolarCloud/WebIscmAppService/getPowerStationInfo/struct.go b/iSolarCloud/WebIscmAppService/getPowerStationInfo/struct.go index 3ff3c30d6..a5ebb9e99 100644 --- a/iSolarCloud/WebIscmAppService/getPowerStationInfo/struct.go +++ b/iSolarCloud/WebIscmAppService/getPowerStationInfo/struct.go @@ -6,8 +6,8 @@ package getPowerStationInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getPowerStationList/data.go b/iSolarCloud/WebIscmAppService/getPowerStationList/data.go index 0a9e7fb57..9d6bf9b06 100644 --- a/iSolarCloud/WebIscmAppService/getPowerStationList/data.go +++ b/iSolarCloud/WebIscmAppService/getPowerStationList/data.go @@ -2,8 +2,8 @@ package getPowerStationList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getPowerStationList/struct.go b/iSolarCloud/WebIscmAppService/getPowerStationList/struct.go index 30af9c68f..11e29c9f0 100644 --- a/iSolarCloud/WebIscmAppService/getPowerStationList/struct.go +++ b/iSolarCloud/WebIscmAppService/getPowerStationList/struct.go @@ -6,8 +6,8 @@ package getPowerStationList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getPowerStore/data.go b/iSolarCloud/WebIscmAppService/getPowerStore/data.go index 3496b38a2..5198292f6 100644 --- a/iSolarCloud/WebIscmAppService/getPowerStore/data.go +++ b/iSolarCloud/WebIscmAppService/getPowerStore/data.go @@ -2,8 +2,8 @@ package getPowerStore import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getPowerStore/struct.go b/iSolarCloud/WebIscmAppService/getPowerStore/struct.go index 9e06fd146..632edba40 100644 --- a/iSolarCloud/WebIscmAppService/getPowerStore/struct.go +++ b/iSolarCloud/WebIscmAppService/getPowerStore/struct.go @@ -6,8 +6,8 @@ package getPowerStore import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getProvcnNew/data.go b/iSolarCloud/WebIscmAppService/getProvcnNew/data.go index 266c7bb3b..c1fd1394e 100644 --- a/iSolarCloud/WebIscmAppService/getProvcnNew/data.go +++ b/iSolarCloud/WebIscmAppService/getProvcnNew/data.go @@ -2,8 +2,8 @@ package getProvcnNew import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getProvcnNew/struct.go b/iSolarCloud/WebIscmAppService/getProvcnNew/struct.go index db590b663..b13eb3f9b 100644 --- a/iSolarCloud/WebIscmAppService/getProvcnNew/struct.go +++ b/iSolarCloud/WebIscmAppService/getProvcnNew/struct.go @@ -6,8 +6,8 @@ package getProvcnNew import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getPsTreeMenu/data.go b/iSolarCloud/WebIscmAppService/getPsTreeMenu/data.go index 78287f49c..797325bfe 100644 --- a/iSolarCloud/WebIscmAppService/getPsTreeMenu/data.go +++ b/iSolarCloud/WebIscmAppService/getPsTreeMenu/data.go @@ -2,8 +2,8 @@ package getPsTreeMenu import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getPsTreeMenu/struct.go b/iSolarCloud/WebIscmAppService/getPsTreeMenu/struct.go index 0ca043536..f945df991 100644 --- a/iSolarCloud/WebIscmAppService/getPsTreeMenu/struct.go +++ b/iSolarCloud/WebIscmAppService/getPsTreeMenu/struct.go @@ -6,8 +6,8 @@ package getPsTreeMenu import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getRoleByUserIds/data.go b/iSolarCloud/WebIscmAppService/getRoleByUserIds/data.go index 5a40e5590..418ab5678 100644 --- a/iSolarCloud/WebIscmAppService/getRoleByUserIds/data.go +++ b/iSolarCloud/WebIscmAppService/getRoleByUserIds/data.go @@ -2,8 +2,8 @@ package getRoleByUserIds import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getRoleByUserIds/struct.go b/iSolarCloud/WebIscmAppService/getRoleByUserIds/struct.go index ef9cc5bcb..d80abce18 100644 --- a/iSolarCloud/WebIscmAppService/getRoleByUserIds/struct.go +++ b/iSolarCloud/WebIscmAppService/getRoleByUserIds/struct.go @@ -6,8 +6,8 @@ package getRoleByUserIds import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getRootOrgInfoByUserId/data.go b/iSolarCloud/WebIscmAppService/getRootOrgInfoByUserId/data.go index a3225eadb..3001f8e6d 100644 --- a/iSolarCloud/WebIscmAppService/getRootOrgInfoByUserId/data.go +++ b/iSolarCloud/WebIscmAppService/getRootOrgInfoByUserId/data.go @@ -2,8 +2,8 @@ package getRootOrgInfoByUserId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getRootOrgInfoByUserId/struct.go b/iSolarCloud/WebIscmAppService/getRootOrgInfoByUserId/struct.go index 554e56fe0..75b913660 100644 --- a/iSolarCloud/WebIscmAppService/getRootOrgInfoByUserId/struct.go +++ b/iSolarCloud/WebIscmAppService/getRootOrgInfoByUserId/struct.go @@ -6,8 +6,8 @@ package getRootOrgInfoByUserId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getSettingUserMapData/data.go b/iSolarCloud/WebIscmAppService/getSettingUserMapData/data.go index 9605a82d0..eff2f14e5 100644 --- a/iSolarCloud/WebIscmAppService/getSettingUserMapData/data.go +++ b/iSolarCloud/WebIscmAppService/getSettingUserMapData/data.go @@ -2,8 +2,8 @@ package getSettingUserMapData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getSettingUserMapData/struct.go b/iSolarCloud/WebIscmAppService/getSettingUserMapData/struct.go index 34e1523f4..2d95d3a66 100644 --- a/iSolarCloud/WebIscmAppService/getSettingUserMapData/struct.go +++ b/iSolarCloud/WebIscmAppService/getSettingUserMapData/struct.go @@ -6,8 +6,8 @@ package getSettingUserMapData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getStateNew/data.go b/iSolarCloud/WebIscmAppService/getStateNew/data.go index f9e12b899..7deb6d317 100644 --- a/iSolarCloud/WebIscmAppService/getStateNew/data.go +++ b/iSolarCloud/WebIscmAppService/getStateNew/data.go @@ -2,8 +2,8 @@ package getStateNew import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getStateNew/struct.go b/iSolarCloud/WebIscmAppService/getStateNew/struct.go index cf70d275c..901cf63be 100644 --- a/iSolarCloud/WebIscmAppService/getStateNew/struct.go +++ b/iSolarCloud/WebIscmAppService/getStateNew/struct.go @@ -6,8 +6,8 @@ package getStateNew import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getSubTypeDevice/data.go b/iSolarCloud/WebIscmAppService/getSubTypeDevice/data.go index 0429502f6..ede7ceb87 100644 --- a/iSolarCloud/WebIscmAppService/getSubTypeDevice/data.go +++ b/iSolarCloud/WebIscmAppService/getSubTypeDevice/data.go @@ -2,8 +2,8 @@ package getSubTypeDevice import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getSubTypeDevice/struct.go b/iSolarCloud/WebIscmAppService/getSubTypeDevice/struct.go index 28e4c5ba8..4bb6dc6f3 100644 --- a/iSolarCloud/WebIscmAppService/getSubTypeDevice/struct.go +++ b/iSolarCloud/WebIscmAppService/getSubTypeDevice/struct.go @@ -6,8 +6,8 @@ package getSubTypeDevice import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getSysHomeList2/data.go b/iSolarCloud/WebIscmAppService/getSysHomeList2/data.go index 43e915c9a..40d86eba6 100644 --- a/iSolarCloud/WebIscmAppService/getSysHomeList2/data.go +++ b/iSolarCloud/WebIscmAppService/getSysHomeList2/data.go @@ -2,8 +2,8 @@ package getSysHomeList2 import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getSysHomeList2/struct.go b/iSolarCloud/WebIscmAppService/getSysHomeList2/struct.go index c69f39505..666d9030e 100644 --- a/iSolarCloud/WebIscmAppService/getSysHomeList2/struct.go +++ b/iSolarCloud/WebIscmAppService/getSysHomeList2/struct.go @@ -6,8 +6,8 @@ package getSysHomeList2 import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getSysMenu/data.go b/iSolarCloud/WebIscmAppService/getSysMenu/data.go index ef2faea95..9340ad6b0 100644 --- a/iSolarCloud/WebIscmAppService/getSysMenu/data.go +++ b/iSolarCloud/WebIscmAppService/getSysMenu/data.go @@ -2,8 +2,8 @@ package getSysMenu import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getSysMenu/struct.go b/iSolarCloud/WebIscmAppService/getSysMenu/struct.go index e5fd480eb..84b5a0186 100644 --- a/iSolarCloud/WebIscmAppService/getSysMenu/struct.go +++ b/iSolarCloud/WebIscmAppService/getSysMenu/struct.go @@ -6,8 +6,8 @@ package getSysMenu import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getSysOrgPro/data.go b/iSolarCloud/WebIscmAppService/getSysOrgPro/data.go index 06543a096..80a542e5e 100644 --- a/iSolarCloud/WebIscmAppService/getSysOrgPro/data.go +++ b/iSolarCloud/WebIscmAppService/getSysOrgPro/data.go @@ -2,8 +2,8 @@ package getSysOrgPro import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getSysOrgPro/struct.go b/iSolarCloud/WebIscmAppService/getSysOrgPro/struct.go index b937734e4..b07f967c2 100644 --- a/iSolarCloud/WebIscmAppService/getSysOrgPro/struct.go +++ b/iSolarCloud/WebIscmAppService/getSysOrgPro/struct.go @@ -6,8 +6,8 @@ package getSysOrgPro import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getSysUser/data.go b/iSolarCloud/WebIscmAppService/getSysUser/data.go index bac09099e..cceb67e46 100644 --- a/iSolarCloud/WebIscmAppService/getSysUser/data.go +++ b/iSolarCloud/WebIscmAppService/getSysUser/data.go @@ -2,8 +2,8 @@ package getSysUser import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getSysUser/struct.go b/iSolarCloud/WebIscmAppService/getSysUser/struct.go index 3e2b86383..ec48070fd 100644 --- a/iSolarCloud/WebIscmAppService/getSysUser/struct.go +++ b/iSolarCloud/WebIscmAppService/getSysUser/struct.go @@ -6,8 +6,8 @@ package getSysUser import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getSystemOrgInfo/data.go b/iSolarCloud/WebIscmAppService/getSystemOrgInfo/data.go index 6c400b4a5..3d6b62989 100644 --- a/iSolarCloud/WebIscmAppService/getSystemOrgInfo/data.go +++ b/iSolarCloud/WebIscmAppService/getSystemOrgInfo/data.go @@ -2,8 +2,8 @@ package getSystemOrgInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getSystemOrgInfo/struct.go b/iSolarCloud/WebIscmAppService/getSystemOrgInfo/struct.go index f9aa62b43..0ba8c2e02 100644 --- a/iSolarCloud/WebIscmAppService/getSystemOrgInfo/struct.go +++ b/iSolarCloud/WebIscmAppService/getSystemOrgInfo/struct.go @@ -6,8 +6,8 @@ package getSystemOrgInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getSystemRoleInfo/data.go b/iSolarCloud/WebIscmAppService/getSystemRoleInfo/data.go index 4571d7df5..b6382cc75 100644 --- a/iSolarCloud/WebIscmAppService/getSystemRoleInfo/data.go +++ b/iSolarCloud/WebIscmAppService/getSystemRoleInfo/data.go @@ -2,8 +2,8 @@ package getSystemRoleInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getSystemRoleInfo/struct.go b/iSolarCloud/WebIscmAppService/getSystemRoleInfo/struct.go index 47d2b2843..a231c9684 100644 --- a/iSolarCloud/WebIscmAppService/getSystemRoleInfo/struct.go +++ b/iSolarCloud/WebIscmAppService/getSystemRoleInfo/struct.go @@ -6,8 +6,8 @@ package getSystemRoleInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getSystemRoleList2/data.go b/iSolarCloud/WebIscmAppService/getSystemRoleList2/data.go index 7f5b2db27..38ba73ea2 100644 --- a/iSolarCloud/WebIscmAppService/getSystemRoleList2/data.go +++ b/iSolarCloud/WebIscmAppService/getSystemRoleList2/data.go @@ -2,8 +2,8 @@ package getSystemRoleList2 import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getSystemRoleList2/struct.go b/iSolarCloud/WebIscmAppService/getSystemRoleList2/struct.go index f0327d931..4a310746f 100644 --- a/iSolarCloud/WebIscmAppService/getSystemRoleList2/struct.go +++ b/iSolarCloud/WebIscmAppService/getSystemRoleList2/struct.go @@ -6,8 +6,8 @@ package getSystemRoleList2 import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getTownValueNew/data.go b/iSolarCloud/WebIscmAppService/getTownValueNew/data.go index 7ebc54937..dc775e9c4 100644 --- a/iSolarCloud/WebIscmAppService/getTownValueNew/data.go +++ b/iSolarCloud/WebIscmAppService/getTownValueNew/data.go @@ -2,8 +2,8 @@ package getTownValueNew import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getTownValueNew/struct.go b/iSolarCloud/WebIscmAppService/getTownValueNew/struct.go index 5c7bdc4cc..fe931ca6a 100644 --- a/iSolarCloud/WebIscmAppService/getTownValueNew/struct.go +++ b/iSolarCloud/WebIscmAppService/getTownValueNew/struct.go @@ -6,8 +6,8 @@ package getTownValueNew import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getUserMenuLs/data.go b/iSolarCloud/WebIscmAppService/getUserMenuLs/data.go index 2c56eb5c8..ae1ce1ca1 100644 --- a/iSolarCloud/WebIscmAppService/getUserMenuLs/data.go +++ b/iSolarCloud/WebIscmAppService/getUserMenuLs/data.go @@ -2,8 +2,8 @@ package getUserMenuLs import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getUserMenuLs/struct.go b/iSolarCloud/WebIscmAppService/getUserMenuLs/struct.go index b52406de5..8a79eae78 100644 --- a/iSolarCloud/WebIscmAppService/getUserMenuLs/struct.go +++ b/iSolarCloud/WebIscmAppService/getUserMenuLs/struct.go @@ -6,8 +6,8 @@ package getUserMenuLs import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getUserOrgPage/data.go b/iSolarCloud/WebIscmAppService/getUserOrgPage/data.go index 8a58c49a1..65c30ca69 100644 --- a/iSolarCloud/WebIscmAppService/getUserOrgPage/data.go +++ b/iSolarCloud/WebIscmAppService/getUserOrgPage/data.go @@ -2,8 +2,8 @@ package getUserOrgPage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getUserOrgPage/struct.go b/iSolarCloud/WebIscmAppService/getUserOrgPage/struct.go index 497eefeda..32117d9d6 100644 --- a/iSolarCloud/WebIscmAppService/getUserOrgPage/struct.go +++ b/iSolarCloud/WebIscmAppService/getUserOrgPage/struct.go @@ -6,8 +6,8 @@ package getUserOrgPage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getVillageList/data.go b/iSolarCloud/WebIscmAppService/getVillageList/data.go index 0d07f9bc2..23f862f96 100644 --- a/iSolarCloud/WebIscmAppService/getVillageList/data.go +++ b/iSolarCloud/WebIscmAppService/getVillageList/data.go @@ -2,7 +2,7 @@ package getVillageList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" + "GoSungrow/iSolarCloud/api/GoStruct" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -15,7 +15,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getVillageList/struct.go b/iSolarCloud/WebIscmAppService/getVillageList/struct.go index 76cd4ad4b..2898a0c85 100644 --- a/iSolarCloud/WebIscmAppService/getVillageList/struct.go +++ b/iSolarCloud/WebIscmAppService/getVillageList/struct.go @@ -6,8 +6,8 @@ package getVillageList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getVillageListNew/data.go b/iSolarCloud/WebIscmAppService/getVillageListNew/data.go index c60efa3de..c4cf67c21 100644 --- a/iSolarCloud/WebIscmAppService/getVillageListNew/data.go +++ b/iSolarCloud/WebIscmAppService/getVillageListNew/data.go @@ -2,8 +2,8 @@ package getVillageListNew import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getVillageListNew/struct.go b/iSolarCloud/WebIscmAppService/getVillageListNew/struct.go index 3b7e3af29..39f548515 100644 --- a/iSolarCloud/WebIscmAppService/getVillageListNew/struct.go +++ b/iSolarCloud/WebIscmAppService/getVillageListNew/struct.go @@ -6,8 +6,8 @@ package getVillageListNew import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getZtreeAsyncSysMenu/data.go b/iSolarCloud/WebIscmAppService/getZtreeAsyncSysMenu/data.go index 4565c6676..8a2b36d14 100644 --- a/iSolarCloud/WebIscmAppService/getZtreeAsyncSysMenu/data.go +++ b/iSolarCloud/WebIscmAppService/getZtreeAsyncSysMenu/data.go @@ -2,8 +2,8 @@ package getZtreeAsyncSysMenu import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getZtreeAsyncSysMenu/struct.go b/iSolarCloud/WebIscmAppService/getZtreeAsyncSysMenu/struct.go index 47091ec91..f6146c786 100644 --- a/iSolarCloud/WebIscmAppService/getZtreeAsyncSysMenu/struct.go +++ b/iSolarCloud/WebIscmAppService/getZtreeAsyncSysMenu/struct.go @@ -6,8 +6,8 @@ package getZtreeAsyncSysMenu import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getZtreeChildMenu/data.go b/iSolarCloud/WebIscmAppService/getZtreeChildMenu/data.go index afea8cbde..a22ed8351 100644 --- a/iSolarCloud/WebIscmAppService/getZtreeChildMenu/data.go +++ b/iSolarCloud/WebIscmAppService/getZtreeChildMenu/data.go @@ -2,8 +2,8 @@ package getZtreeChildMenu import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getZtreeChildMenu/struct.go b/iSolarCloud/WebIscmAppService/getZtreeChildMenu/struct.go index fe23b55b4..e88ed954f 100644 --- a/iSolarCloud/WebIscmAppService/getZtreeChildMenu/struct.go +++ b/iSolarCloud/WebIscmAppService/getZtreeChildMenu/struct.go @@ -6,8 +6,8 @@ package getZtreeChildMenu import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getZtreeMenu/data.go b/iSolarCloud/WebIscmAppService/getZtreeMenu/data.go index 243135fc1..1c92c2544 100644 --- a/iSolarCloud/WebIscmAppService/getZtreeMenu/data.go +++ b/iSolarCloud/WebIscmAppService/getZtreeMenu/data.go @@ -2,8 +2,8 @@ package getZtreeMenu import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getZtreeMenu/struct.go b/iSolarCloud/WebIscmAppService/getZtreeMenu/struct.go index fe4ffbbc1..dee2cc319 100644 --- a/iSolarCloud/WebIscmAppService/getZtreeMenu/struct.go +++ b/iSolarCloud/WebIscmAppService/getZtreeMenu/struct.go @@ -6,8 +6,8 @@ package getZtreeMenu import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getZtreeSysMenu/data.go b/iSolarCloud/WebIscmAppService/getZtreeSysMenu/data.go index dce3bdd9b..0cd48eeb0 100644 --- a/iSolarCloud/WebIscmAppService/getZtreeSysMenu/data.go +++ b/iSolarCloud/WebIscmAppService/getZtreeSysMenu/data.go @@ -2,8 +2,8 @@ package getZtreeSysMenu import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getZtreeSysMenu/struct.go b/iSolarCloud/WebIscmAppService/getZtreeSysMenu/struct.go index 39087cb47..d9860cd30 100644 --- a/iSolarCloud/WebIscmAppService/getZtreeSysMenu/struct.go +++ b/iSolarCloud/WebIscmAppService/getZtreeSysMenu/struct.go @@ -6,8 +6,8 @@ package getZtreeSysMenu import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/getZtreeSysMenu2/data.go b/iSolarCloud/WebIscmAppService/getZtreeSysMenu2/data.go index 0fac5d774..199f7b9fb 100644 --- a/iSolarCloud/WebIscmAppService/getZtreeSysMenu2/data.go +++ b/iSolarCloud/WebIscmAppService/getZtreeSysMenu2/data.go @@ -2,8 +2,8 @@ package getZtreeSysMenu2 import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/getZtreeSysMenu2/struct.go b/iSolarCloud/WebIscmAppService/getZtreeSysMenu2/struct.go index 5297fdb2e..537c343e0 100644 --- a/iSolarCloud/WebIscmAppService/getZtreeSysMenu2/struct.go +++ b/iSolarCloud/WebIscmAppService/getZtreeSysMenu2/struct.go @@ -6,8 +6,8 @@ package getZtreeSysMenu2 import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/goToDevicePropertyPage/data.go b/iSolarCloud/WebIscmAppService/goToDevicePropertyPage/data.go index 3505d6ae6..195321bad 100644 --- a/iSolarCloud/WebIscmAppService/goToDevicePropertyPage/data.go +++ b/iSolarCloud/WebIscmAppService/goToDevicePropertyPage/data.go @@ -2,8 +2,8 @@ package goToDevicePropertyPage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/goToDevicePropertyPage/struct.go b/iSolarCloud/WebIscmAppService/goToDevicePropertyPage/struct.go index 940aceb37..013b2e1b8 100644 --- a/iSolarCloud/WebIscmAppService/goToDevicePropertyPage/struct.go +++ b/iSolarCloud/WebIscmAppService/goToDevicePropertyPage/struct.go @@ -6,8 +6,8 @@ package goToDevicePropertyPage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/isCanAddUser/data.go b/iSolarCloud/WebIscmAppService/isCanAddUser/data.go index 0749198b4..757d96298 100644 --- a/iSolarCloud/WebIscmAppService/isCanAddUser/data.go +++ b/iSolarCloud/WebIscmAppService/isCanAddUser/data.go @@ -2,8 +2,8 @@ package isCanAddUser import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/isCanAddUser/struct.go b/iSolarCloud/WebIscmAppService/isCanAddUser/struct.go index f93dfa81d..ec0c3c75f 100644 --- a/iSolarCloud/WebIscmAppService/isCanAddUser/struct.go +++ b/iSolarCloud/WebIscmAppService/isCanAddUser/struct.go @@ -6,8 +6,8 @@ package isCanAddUser import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/isHasIrradiationData/data.go b/iSolarCloud/WebIscmAppService/isHasIrradiationData/data.go index 7585060ff..f4be31d84 100644 --- a/iSolarCloud/WebIscmAppService/isHasIrradiationData/data.go +++ b/iSolarCloud/WebIscmAppService/isHasIrradiationData/data.go @@ -2,8 +2,8 @@ package isHasIrradiationData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/isHasIrradiationData/struct.go b/iSolarCloud/WebIscmAppService/isHasIrradiationData/struct.go index 7dd37d838..945cc686c 100644 --- a/iSolarCloud/WebIscmAppService/isHasIrradiationData/struct.go +++ b/iSolarCloud/WebIscmAppService/isHasIrradiationData/struct.go @@ -6,8 +6,8 @@ package isHasIrradiationData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/isHasPlan/data.go b/iSolarCloud/WebIscmAppService/isHasPlan/data.go index 957cf3d13..150430670 100644 --- a/iSolarCloud/WebIscmAppService/isHasPlan/data.go +++ b/iSolarCloud/WebIscmAppService/isHasPlan/data.go @@ -2,8 +2,8 @@ package isHasPlan import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/isHasPlan/struct.go b/iSolarCloud/WebIscmAppService/isHasPlan/struct.go index 8c48fe1ef..5591f91d9 100644 --- a/iSolarCloud/WebIscmAppService/isHasPlan/struct.go +++ b/iSolarCloud/WebIscmAppService/isHasPlan/struct.go @@ -6,8 +6,8 @@ package isHasPlan import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/loadDevice/data.go b/iSolarCloud/WebIscmAppService/loadDevice/data.go index 2d673cd2c..f51111c6d 100644 --- a/iSolarCloud/WebIscmAppService/loadDevice/data.go +++ b/iSolarCloud/WebIscmAppService/loadDevice/data.go @@ -2,8 +2,8 @@ package loadDevice import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/loadDevice/struct.go b/iSolarCloud/WebIscmAppService/loadDevice/struct.go index 482428062..6460f3dff 100644 --- a/iSolarCloud/WebIscmAppService/loadDevice/struct.go +++ b/iSolarCloud/WebIscmAppService/loadDevice/struct.go @@ -6,8 +6,8 @@ package loadDevice import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/modelPointsPage/data.go b/iSolarCloud/WebIscmAppService/modelPointsPage/data.go index 4f61969bd..68b945adb 100644 --- a/iSolarCloud/WebIscmAppService/modelPointsPage/data.go +++ b/iSolarCloud/WebIscmAppService/modelPointsPage/data.go @@ -2,8 +2,8 @@ package modelPointsPage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -17,7 +17,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -30,16 +30,16 @@ type ResultData struct { DeviceModelId valueTypes.Integer `json:"device_model_id"` DeviceModel valueTypes.String `json:"device_model"` DeviceModelCode valueTypes.String `json:"device_model_code"` - } `json:"modelList" PointId:"model_list" DataTable:"true"` + } `json:"modelList" PointId:"model_list" DataTable:"true" DataTableSortOn:"DeviceModelId"` PointList []struct { - PointId valueTypes.Integer `json:"point_id" DataTableSort:"true"` + PointId valueTypes.Integer `json:"point_id"` PointName valueTypes.String `json:"point_name"` CodeId valueTypes.Integer `json:"code_id"` DeviceModelId valueTypes.Integer `json:"device_model_id"` IsShow valueTypes.Bool `json:"is_show"` IsSupportSecondData valueTypes.Bool `json:"is_support_second_data"` OrderNum valueTypes.Integer `json:"order_num"` - } `json:"pointList" PointId:"point_list" DataTable:"true"` + } `json:"pointList" PointId:"point_list" DataTable:"true" DataTableSortOn:"PointId"` } func (e *ResultData) IsValid() error { diff --git a/iSolarCloud/WebIscmAppService/modelPointsPage/struct.go b/iSolarCloud/WebIscmAppService/modelPointsPage/struct.go index 263290629..ba6f2058c 100644 --- a/iSolarCloud/WebIscmAppService/modelPointsPage/struct.go +++ b/iSolarCloud/WebIscmAppService/modelPointsPage/struct.go @@ -6,8 +6,8 @@ package modelPointsPage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/modifyDevice/data.go b/iSolarCloud/WebIscmAppService/modifyDevice/data.go index ed0af6a81..10d44f2a2 100644 --- a/iSolarCloud/WebIscmAppService/modifyDevice/data.go +++ b/iSolarCloud/WebIscmAppService/modifyDevice/data.go @@ -2,8 +2,8 @@ package modifyDevice import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/modifyDevice/struct.go b/iSolarCloud/WebIscmAppService/modifyDevice/struct.go index ce2b35234..13a256c5c 100644 --- a/iSolarCloud/WebIscmAppService/modifyDevice/struct.go +++ b/iSolarCloud/WebIscmAppService/modifyDevice/struct.go @@ -6,8 +6,8 @@ package modifyDevice import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/modifyPowerDeviceChannl/data.go b/iSolarCloud/WebIscmAppService/modifyPowerDeviceChannl/data.go index 47d59af7b..632f02edc 100644 --- a/iSolarCloud/WebIscmAppService/modifyPowerDeviceChannl/data.go +++ b/iSolarCloud/WebIscmAppService/modifyPowerDeviceChannl/data.go @@ -2,8 +2,8 @@ package modifyPowerDeviceChannl import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/modifyPowerDeviceChannl/struct.go b/iSolarCloud/WebIscmAppService/modifyPowerDeviceChannl/struct.go index 7d42b7fd0..60a7f7dd8 100644 --- a/iSolarCloud/WebIscmAppService/modifyPowerDeviceChannl/struct.go +++ b/iSolarCloud/WebIscmAppService/modifyPowerDeviceChannl/struct.go @@ -6,8 +6,8 @@ package modifyPowerDeviceChannl import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/modifySysOrg/data.go b/iSolarCloud/WebIscmAppService/modifySysOrg/data.go index 99714a38c..e7dd67ffa 100644 --- a/iSolarCloud/WebIscmAppService/modifySysOrg/data.go +++ b/iSolarCloud/WebIscmAppService/modifySysOrg/data.go @@ -2,8 +2,8 @@ package modifySysOrg import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/modifySysOrg/struct.go b/iSolarCloud/WebIscmAppService/modifySysOrg/struct.go index 84a5cf838..d6a3b34c6 100644 --- a/iSolarCloud/WebIscmAppService/modifySysOrg/struct.go +++ b/iSolarCloud/WebIscmAppService/modifySysOrg/struct.go @@ -6,8 +6,8 @@ package modifySysOrg import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/modifySystemMenu/data.go b/iSolarCloud/WebIscmAppService/modifySystemMenu/data.go index 97b79eb97..5c390dea6 100644 --- a/iSolarCloud/WebIscmAppService/modifySystemMenu/data.go +++ b/iSolarCloud/WebIscmAppService/modifySystemMenu/data.go @@ -2,8 +2,8 @@ package modifySystemMenu import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/modifySystemMenu/struct.go b/iSolarCloud/WebIscmAppService/modifySystemMenu/struct.go index 58a06667b..f51586a9e 100644 --- a/iSolarCloud/WebIscmAppService/modifySystemMenu/struct.go +++ b/iSolarCloud/WebIscmAppService/modifySystemMenu/struct.go @@ -6,8 +6,8 @@ package modifySystemMenu import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/modifySystemOrgNode/data.go b/iSolarCloud/WebIscmAppService/modifySystemOrgNode/data.go index c1fe3ec05..a528df1d8 100644 --- a/iSolarCloud/WebIscmAppService/modifySystemOrgNode/data.go +++ b/iSolarCloud/WebIscmAppService/modifySystemOrgNode/data.go @@ -2,8 +2,8 @@ package modifySystemOrgNode import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/modifySystemOrgNode/struct.go b/iSolarCloud/WebIscmAppService/modifySystemOrgNode/struct.go index b9e230ab9..0ed63f43c 100644 --- a/iSolarCloud/WebIscmAppService/modifySystemOrgNode/struct.go +++ b/iSolarCloud/WebIscmAppService/modifySystemOrgNode/struct.go @@ -6,8 +6,8 @@ package modifySystemOrgNode import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/modifySystemRole/data.go b/iSolarCloud/WebIscmAppService/modifySystemRole/data.go index d204a2b1c..0bd43299d 100644 --- a/iSolarCloud/WebIscmAppService/modifySystemRole/data.go +++ b/iSolarCloud/WebIscmAppService/modifySystemRole/data.go @@ -2,8 +2,8 @@ package modifySystemRole import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/modifySystemRole/struct.go b/iSolarCloud/WebIscmAppService/modifySystemRole/struct.go index 27c8e3fbc..d2bc4ad88 100644 --- a/iSolarCloud/WebIscmAppService/modifySystemRole/struct.go +++ b/iSolarCloud/WebIscmAppService/modifySystemRole/struct.go @@ -6,8 +6,8 @@ package modifySystemRole import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/modifySystemUser/data.go b/iSolarCloud/WebIscmAppService/modifySystemUser/data.go index b473ca378..3fabf2c6a 100644 --- a/iSolarCloud/WebIscmAppService/modifySystemUser/data.go +++ b/iSolarCloud/WebIscmAppService/modifySystemUser/data.go @@ -2,8 +2,8 @@ package modifySystemUser import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/modifySystemUser/struct.go b/iSolarCloud/WebIscmAppService/modifySystemUser/struct.go index 8e6ff547d..971b2ec6d 100644 --- a/iSolarCloud/WebIscmAppService/modifySystemUser/struct.go +++ b/iSolarCloud/WebIscmAppService/modifySystemUser/struct.go @@ -6,8 +6,8 @@ package modifySystemUser import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/publishNotice/data.go b/iSolarCloud/WebIscmAppService/publishNotice/data.go index 6486393dd..2dee03892 100644 --- a/iSolarCloud/WebIscmAppService/publishNotice/data.go +++ b/iSolarCloud/WebIscmAppService/publishNotice/data.go @@ -2,8 +2,8 @@ package publishNotice import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/publishNotice/struct.go b/iSolarCloud/WebIscmAppService/publishNotice/struct.go index 8276bbdfa..a329dfe83 100644 --- a/iSolarCloud/WebIscmAppService/publishNotice/struct.go +++ b/iSolarCloud/WebIscmAppService/publishNotice/struct.go @@ -6,8 +6,8 @@ package publishNotice import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/queryDeviceList/data.go b/iSolarCloud/WebIscmAppService/queryDeviceList/data.go index 145546d4b..41dfd2021 100644 --- a/iSolarCloud/WebIscmAppService/queryDeviceList/data.go +++ b/iSolarCloud/WebIscmAppService/queryDeviceList/data.go @@ -2,8 +2,8 @@ package queryDeviceList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -25,7 +25,7 @@ func (rd RequestData) Help() string { } type ResultData []struct { - ChnnlID valueTypes.Integer `json:"chnnl_id"` + ChnnlID valueTypes.Integer `json:"chnnl_id" PointId:"channel_id"` DeviceCode valueTypes.Integer `json:"device_code"` DeviceID valueTypes.Integer `json:"device_id"` DeviceName valueTypes.String `json:"device_name"` diff --git a/iSolarCloud/WebIscmAppService/queryDeviceList/struct.go b/iSolarCloud/WebIscmAppService/queryDeviceList/struct.go index 8c95cd172..b6fad25b9 100644 --- a/iSolarCloud/WebIscmAppService/queryDeviceList/struct.go +++ b/iSolarCloud/WebIscmAppService/queryDeviceList/struct.go @@ -6,8 +6,8 @@ package queryDeviceList import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/queryDutyType/data.go b/iSolarCloud/WebIscmAppService/queryDutyType/data.go index 4416b94ca..5178a49de 100644 --- a/iSolarCloud/WebIscmAppService/queryDutyType/data.go +++ b/iSolarCloud/WebIscmAppService/queryDutyType/data.go @@ -2,8 +2,8 @@ package queryDutyType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/queryDutyType/struct.go b/iSolarCloud/WebIscmAppService/queryDutyType/struct.go index 4392b432d..b80f4b70e 100644 --- a/iSolarCloud/WebIscmAppService/queryDutyType/struct.go +++ b/iSolarCloud/WebIscmAppService/queryDutyType/struct.go @@ -6,8 +6,8 @@ package queryDutyType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/queryReportDataById/data.go b/iSolarCloud/WebIscmAppService/queryReportDataById/data.go index 2489521fb..55e0c6dcf 100644 --- a/iSolarCloud/WebIscmAppService/queryReportDataById/data.go +++ b/iSolarCloud/WebIscmAppService/queryReportDataById/data.go @@ -2,8 +2,8 @@ package queryReportDataById import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/queryReportDataById/struct.go b/iSolarCloud/WebIscmAppService/queryReportDataById/struct.go index b570bfe9c..6ce05d5bc 100644 --- a/iSolarCloud/WebIscmAppService/queryReportDataById/struct.go +++ b/iSolarCloud/WebIscmAppService/queryReportDataById/struct.go @@ -6,8 +6,8 @@ package queryReportDataById import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/resetPasW/data.go b/iSolarCloud/WebIscmAppService/resetPasW/data.go index 91dc0d71d..27838e317 100644 --- a/iSolarCloud/WebIscmAppService/resetPasW/data.go +++ b/iSolarCloud/WebIscmAppService/resetPasW/data.go @@ -2,8 +2,8 @@ package resetPasW import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/resetPasW/struct.go b/iSolarCloud/WebIscmAppService/resetPasW/struct.go index 900badc02..16872f51c 100644 --- a/iSolarCloud/WebIscmAppService/resetPasW/struct.go +++ b/iSolarCloud/WebIscmAppService/resetPasW/struct.go @@ -6,8 +6,8 @@ package resetPasW import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/saveAuthKey/data.go b/iSolarCloud/WebIscmAppService/saveAuthKey/data.go index 346de5c27..ed6626af6 100644 --- a/iSolarCloud/WebIscmAppService/saveAuthKey/data.go +++ b/iSolarCloud/WebIscmAppService/saveAuthKey/data.go @@ -2,8 +2,8 @@ package saveAuthKey import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/saveAuthKey/struct.go b/iSolarCloud/WebIscmAppService/saveAuthKey/struct.go index f23790bf0..05c40ae6f 100644 --- a/iSolarCloud/WebIscmAppService/saveAuthKey/struct.go +++ b/iSolarCloud/WebIscmAppService/saveAuthKey/struct.go @@ -6,8 +6,8 @@ package saveAuthKey import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/saveDevice/data.go b/iSolarCloud/WebIscmAppService/saveDevice/data.go index 6f33e84de..da0739ec0 100644 --- a/iSolarCloud/WebIscmAppService/saveDevice/data.go +++ b/iSolarCloud/WebIscmAppService/saveDevice/data.go @@ -2,8 +2,8 @@ package saveDevice import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/saveDevice/struct.go b/iSolarCloud/WebIscmAppService/saveDevice/struct.go index b6aeb8b20..da0e22881 100644 --- a/iSolarCloud/WebIscmAppService/saveDevice/struct.go +++ b/iSolarCloud/WebIscmAppService/saveDevice/struct.go @@ -6,8 +6,8 @@ package saveDevice import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/saveDeviceFactory/data.go b/iSolarCloud/WebIscmAppService/saveDeviceFactory/data.go index af7a1207e..785220b51 100644 --- a/iSolarCloud/WebIscmAppService/saveDeviceFactory/data.go +++ b/iSolarCloud/WebIscmAppService/saveDeviceFactory/data.go @@ -2,8 +2,8 @@ package saveDeviceFactory import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/saveDeviceFactory/struct.go b/iSolarCloud/WebIscmAppService/saveDeviceFactory/struct.go index 305f09aca..b1faeb4ed 100644 --- a/iSolarCloud/WebIscmAppService/saveDeviceFactory/struct.go +++ b/iSolarCloud/WebIscmAppService/saveDeviceFactory/struct.go @@ -6,8 +6,8 @@ package saveDeviceFactory import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/saveDeviceType/data.go b/iSolarCloud/WebIscmAppService/saveDeviceType/data.go index 7197c5a9b..98aa31e88 100644 --- a/iSolarCloud/WebIscmAppService/saveDeviceType/data.go +++ b/iSolarCloud/WebIscmAppService/saveDeviceType/data.go @@ -2,8 +2,8 @@ package saveDeviceType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/saveDeviceType/struct.go b/iSolarCloud/WebIscmAppService/saveDeviceType/struct.go index 2b6d231ba..82a7ddbd1 100644 --- a/iSolarCloud/WebIscmAppService/saveDeviceType/struct.go +++ b/iSolarCloud/WebIscmAppService/saveDeviceType/struct.go @@ -6,8 +6,8 @@ package saveDeviceType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/saveIrradiationData/data.go b/iSolarCloud/WebIscmAppService/saveIrradiationData/data.go index e2e931c48..e2a152f75 100644 --- a/iSolarCloud/WebIscmAppService/saveIrradiationData/data.go +++ b/iSolarCloud/WebIscmAppService/saveIrradiationData/data.go @@ -2,8 +2,8 @@ package saveIrradiationData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/saveIrradiationData/struct.go b/iSolarCloud/WebIscmAppService/saveIrradiationData/struct.go index daa2ef258..167c90663 100644 --- a/iSolarCloud/WebIscmAppService/saveIrradiationData/struct.go +++ b/iSolarCloud/WebIscmAppService/saveIrradiationData/struct.go @@ -6,8 +6,8 @@ package saveIrradiationData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/saveModelPoints/data.go b/iSolarCloud/WebIscmAppService/saveModelPoints/data.go index 0d074b235..f8689078e 100644 --- a/iSolarCloud/WebIscmAppService/saveModelPoints/data.go +++ b/iSolarCloud/WebIscmAppService/saveModelPoints/data.go @@ -2,8 +2,8 @@ package saveModelPoints import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/saveModelPoints/struct.go b/iSolarCloud/WebIscmAppService/saveModelPoints/struct.go index c91ff1dff..a6ec5d5a9 100644 --- a/iSolarCloud/WebIscmAppService/saveModelPoints/struct.go +++ b/iSolarCloud/WebIscmAppService/saveModelPoints/struct.go @@ -6,8 +6,8 @@ package saveModelPoints import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/saveNewNotice/data.go b/iSolarCloud/WebIscmAppService/saveNewNotice/data.go index db56a32d1..b0908a883 100644 --- a/iSolarCloud/WebIscmAppService/saveNewNotice/data.go +++ b/iSolarCloud/WebIscmAppService/saveNewNotice/data.go @@ -2,8 +2,8 @@ package saveNewNotice import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/saveNewNotice/struct.go b/iSolarCloud/WebIscmAppService/saveNewNotice/struct.go index 576b6b0b7..cb2edb043 100644 --- a/iSolarCloud/WebIscmAppService/saveNewNotice/struct.go +++ b/iSolarCloud/WebIscmAppService/saveNewNotice/struct.go @@ -6,8 +6,8 @@ package saveNewNotice import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/saveOrUpdateReport/data.go b/iSolarCloud/WebIscmAppService/saveOrUpdateReport/data.go index 562475884..1c9e18607 100644 --- a/iSolarCloud/WebIscmAppService/saveOrUpdateReport/data.go +++ b/iSolarCloud/WebIscmAppService/saveOrUpdateReport/data.go @@ -2,8 +2,8 @@ package saveOrUpdateReport import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/saveOrUpdateReport/struct.go b/iSolarCloud/WebIscmAppService/saveOrUpdateReport/struct.go index 297170591..65c4ca931 100644 --- a/iSolarCloud/WebIscmAppService/saveOrUpdateReport/struct.go +++ b/iSolarCloud/WebIscmAppService/saveOrUpdateReport/struct.go @@ -6,8 +6,8 @@ package saveOrUpdateReport import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/saveOrgNode/data.go b/iSolarCloud/WebIscmAppService/saveOrgNode/data.go index 948bce6dd..a68fa31fe 100644 --- a/iSolarCloud/WebIscmAppService/saveOrgNode/data.go +++ b/iSolarCloud/WebIscmAppService/saveOrgNode/data.go @@ -2,8 +2,8 @@ package saveOrgNode import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/saveOrgNode/struct.go b/iSolarCloud/WebIscmAppService/saveOrgNode/struct.go index 5aa4502f8..db4375a9b 100644 --- a/iSolarCloud/WebIscmAppService/saveOrgNode/struct.go +++ b/iSolarCloud/WebIscmAppService/saveOrgNode/struct.go @@ -6,8 +6,8 @@ package saveOrgNode import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/saveOrgUsers/data.go b/iSolarCloud/WebIscmAppService/saveOrgUsers/data.go index 5a81a78db..5b2944096 100644 --- a/iSolarCloud/WebIscmAppService/saveOrgUsers/data.go +++ b/iSolarCloud/WebIscmAppService/saveOrgUsers/data.go @@ -2,8 +2,8 @@ package saveOrgUsers import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/saveOrgUsers/struct.go b/iSolarCloud/WebIscmAppService/saveOrgUsers/struct.go index f840d06df..9009d27e3 100644 --- a/iSolarCloud/WebIscmAppService/saveOrgUsers/struct.go +++ b/iSolarCloud/WebIscmAppService/saveOrgUsers/struct.go @@ -6,8 +6,8 @@ package saveOrgUsers import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/savePicture/data.go b/iSolarCloud/WebIscmAppService/savePicture/data.go index 798c99a80..d890a73fe 100644 --- a/iSolarCloud/WebIscmAppService/savePicture/data.go +++ b/iSolarCloud/WebIscmAppService/savePicture/data.go @@ -2,8 +2,8 @@ package savePicture import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/savePicture/struct.go b/iSolarCloud/WebIscmAppService/savePicture/struct.go index 737c1229d..273aad9fc 100644 --- a/iSolarCloud/WebIscmAppService/savePicture/struct.go +++ b/iSolarCloud/WebIscmAppService/savePicture/struct.go @@ -6,8 +6,8 @@ package savePicture import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/savePointManage/data.go b/iSolarCloud/WebIscmAppService/savePointManage/data.go index 4caf05dbf..f6f04433c 100644 --- a/iSolarCloud/WebIscmAppService/savePointManage/data.go +++ b/iSolarCloud/WebIscmAppService/savePointManage/data.go @@ -2,8 +2,8 @@ package savePointManage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/savePointManage/struct.go b/iSolarCloud/WebIscmAppService/savePointManage/struct.go index 72c591f15..8d21dad10 100644 --- a/iSolarCloud/WebIscmAppService/savePointManage/struct.go +++ b/iSolarCloud/WebIscmAppService/savePointManage/struct.go @@ -6,8 +6,8 @@ package savePointManage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/savePowerDeviceChannl/data.go b/iSolarCloud/WebIscmAppService/savePowerDeviceChannl/data.go index f10ee542d..032539a9e 100644 --- a/iSolarCloud/WebIscmAppService/savePowerDeviceChannl/data.go +++ b/iSolarCloud/WebIscmAppService/savePowerDeviceChannl/data.go @@ -2,8 +2,8 @@ package savePowerDeviceChannl import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/savePowerDeviceChannl/struct.go b/iSolarCloud/WebIscmAppService/savePowerDeviceChannl/struct.go index fd38c4134..8025361b6 100644 --- a/iSolarCloud/WebIscmAppService/savePowerDeviceChannl/struct.go +++ b/iSolarCloud/WebIscmAppService/savePowerDeviceChannl/struct.go @@ -6,8 +6,8 @@ package savePowerDeviceChannl import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/savePowerDeviceModel/data.go b/iSolarCloud/WebIscmAppService/savePowerDeviceModel/data.go index 44621de85..37d0327f3 100644 --- a/iSolarCloud/WebIscmAppService/savePowerDeviceModel/data.go +++ b/iSolarCloud/WebIscmAppService/savePowerDeviceModel/data.go @@ -2,8 +2,8 @@ package savePowerDeviceModel import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/savePowerDeviceModel/struct.go b/iSolarCloud/WebIscmAppService/savePowerDeviceModel/struct.go index e08846633..9efdefc16 100644 --- a/iSolarCloud/WebIscmAppService/savePowerDeviceModel/struct.go +++ b/iSolarCloud/WebIscmAppService/savePowerDeviceModel/struct.go @@ -6,8 +6,8 @@ package savePowerDeviceModel import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/savePowerDeviceParameterPage/data.go b/iSolarCloud/WebIscmAppService/savePowerDeviceParameterPage/data.go index b87697621..cc6143d6e 100644 --- a/iSolarCloud/WebIscmAppService/savePowerDeviceParameterPage/data.go +++ b/iSolarCloud/WebIscmAppService/savePowerDeviceParameterPage/data.go @@ -2,8 +2,8 @@ package savePowerDeviceParameterPage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/savePowerDeviceParameterPage/struct.go b/iSolarCloud/WebIscmAppService/savePowerDeviceParameterPage/struct.go index 6f7c3dfaf..e9fc88fca 100644 --- a/iSolarCloud/WebIscmAppService/savePowerDeviceParameterPage/struct.go +++ b/iSolarCloud/WebIscmAppService/savePowerDeviceParameterPage/struct.go @@ -6,8 +6,8 @@ package savePowerDeviceParameterPage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/savePowerDeviceSubType/data.go b/iSolarCloud/WebIscmAppService/savePowerDeviceSubType/data.go index 83830fa70..411f48a96 100644 --- a/iSolarCloud/WebIscmAppService/savePowerDeviceSubType/data.go +++ b/iSolarCloud/WebIscmAppService/savePowerDeviceSubType/data.go @@ -2,8 +2,8 @@ package savePowerDeviceSubType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/savePowerDeviceSubType/struct.go b/iSolarCloud/WebIscmAppService/savePowerDeviceSubType/struct.go index 08eca836d..756cfc731 100644 --- a/iSolarCloud/WebIscmAppService/savePowerDeviceSubType/struct.go +++ b/iSolarCloud/WebIscmAppService/savePowerDeviceSubType/struct.go @@ -6,8 +6,8 @@ package savePowerDeviceSubType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/savePowerDeviceTechnical/data.go b/iSolarCloud/WebIscmAppService/savePowerDeviceTechnical/data.go index 8042e3d1a..620cee269 100644 --- a/iSolarCloud/WebIscmAppService/savePowerDeviceTechnical/data.go +++ b/iSolarCloud/WebIscmAppService/savePowerDeviceTechnical/data.go @@ -2,8 +2,8 @@ package savePowerDeviceTechnical import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/savePowerDeviceTechnical/struct.go b/iSolarCloud/WebIscmAppService/savePowerDeviceTechnical/struct.go index fbab0b30d..b3917b237 100644 --- a/iSolarCloud/WebIscmAppService/savePowerDeviceTechnical/struct.go +++ b/iSolarCloud/WebIscmAppService/savePowerDeviceTechnical/struct.go @@ -6,8 +6,8 @@ package savePowerDeviceTechnical import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/savePowerPlan/data.go b/iSolarCloud/WebIscmAppService/savePowerPlan/data.go index 6ec31255c..5317d8b98 100644 --- a/iSolarCloud/WebIscmAppService/savePowerPlan/data.go +++ b/iSolarCloud/WebIscmAppService/savePowerPlan/data.go @@ -2,8 +2,8 @@ package savePowerPlan import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/savePowerPlan/struct.go b/iSolarCloud/WebIscmAppService/savePowerPlan/struct.go index c41959b27..8e8d56d30 100644 --- a/iSolarCloud/WebIscmAppService/savePowerPlan/struct.go +++ b/iSolarCloud/WebIscmAppService/savePowerPlan/struct.go @@ -6,8 +6,8 @@ package savePowerPlan import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/savePowerStationByPowerStore/data.go b/iSolarCloud/WebIscmAppService/savePowerStationByPowerStore/data.go index 9bb8cb077..827d27577 100644 --- a/iSolarCloud/WebIscmAppService/savePowerStationByPowerStore/data.go +++ b/iSolarCloud/WebIscmAppService/savePowerStationByPowerStore/data.go @@ -2,8 +2,8 @@ package savePowerStationByPowerStore import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/savePowerStationByPowerStore/struct.go b/iSolarCloud/WebIscmAppService/savePowerStationByPowerStore/struct.go index 150174587..cc0701cc3 100644 --- a/iSolarCloud/WebIscmAppService/savePowerStationByPowerStore/struct.go +++ b/iSolarCloud/WebIscmAppService/savePowerStationByPowerStore/struct.go @@ -6,8 +6,8 @@ package savePowerStationByPowerStore import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/savePowerStore/data.go b/iSolarCloud/WebIscmAppService/savePowerStore/data.go index 456689879..06a13f3a7 100644 --- a/iSolarCloud/WebIscmAppService/savePowerStore/data.go +++ b/iSolarCloud/WebIscmAppService/savePowerStore/data.go @@ -2,8 +2,8 @@ package savePowerStore import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/savePowerStore/struct.go b/iSolarCloud/WebIscmAppService/savePowerStore/struct.go index 8dd281116..da75a7754 100644 --- a/iSolarCloud/WebIscmAppService/savePowerStore/struct.go +++ b/iSolarCloud/WebIscmAppService/savePowerStore/struct.go @@ -6,8 +6,8 @@ package savePowerStore import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/savePsOrg/data.go b/iSolarCloud/WebIscmAppService/savePsOrg/data.go index f4771ac68..4ef01a6a1 100644 --- a/iSolarCloud/WebIscmAppService/savePsOrg/data.go +++ b/iSolarCloud/WebIscmAppService/savePsOrg/data.go @@ -2,8 +2,8 @@ package savePsOrg import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/savePsOrg/struct.go b/iSolarCloud/WebIscmAppService/savePsOrg/struct.go index c3480744e..c5e3f3e1d 100644 --- a/iSolarCloud/WebIscmAppService/savePsOrg/struct.go +++ b/iSolarCloud/WebIscmAppService/savePsOrg/struct.go @@ -6,8 +6,8 @@ package savePsOrg import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/saveRelDevice/data.go b/iSolarCloud/WebIscmAppService/saveRelDevice/data.go index 42667c516..95aee9c8f 100644 --- a/iSolarCloud/WebIscmAppService/saveRelDevice/data.go +++ b/iSolarCloud/WebIscmAppService/saveRelDevice/data.go @@ -2,8 +2,8 @@ package saveRelDevice import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/saveRelDevice/struct.go b/iSolarCloud/WebIscmAppService/saveRelDevice/struct.go index 4b83c8241..1f6e761ee 100644 --- a/iSolarCloud/WebIscmAppService/saveRelDevice/struct.go +++ b/iSolarCloud/WebIscmAppService/saveRelDevice/struct.go @@ -6,8 +6,8 @@ package saveRelDevice import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/saveRoleAssign/data.go b/iSolarCloud/WebIscmAppService/saveRoleAssign/data.go index c6da7d8c1..96f4966d4 100644 --- a/iSolarCloud/WebIscmAppService/saveRoleAssign/data.go +++ b/iSolarCloud/WebIscmAppService/saveRoleAssign/data.go @@ -2,8 +2,8 @@ package saveRoleAssign import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/saveRoleAssign/struct.go b/iSolarCloud/WebIscmAppService/saveRoleAssign/struct.go index 48757195f..2f42615f5 100644 --- a/iSolarCloud/WebIscmAppService/saveRoleAssign/struct.go +++ b/iSolarCloud/WebIscmAppService/saveRoleAssign/struct.go @@ -6,8 +6,8 @@ package saveRoleAssign import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/saveSysMenu/data.go b/iSolarCloud/WebIscmAppService/saveSysMenu/data.go index c72a72209..1832864be 100644 --- a/iSolarCloud/WebIscmAppService/saveSysMenu/data.go +++ b/iSolarCloud/WebIscmAppService/saveSysMenu/data.go @@ -2,8 +2,8 @@ package saveSysMenu import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/saveSysMenu/struct.go b/iSolarCloud/WebIscmAppService/saveSysMenu/struct.go index 97e895447..30b464904 100644 --- a/iSolarCloud/WebIscmAppService/saveSysMenu/struct.go +++ b/iSolarCloud/WebIscmAppService/saveSysMenu/struct.go @@ -6,8 +6,8 @@ package saveSysMenu import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/saveSysOrg/data.go b/iSolarCloud/WebIscmAppService/saveSysOrg/data.go index 8ce43ddb8..9a53bdabf 100644 --- a/iSolarCloud/WebIscmAppService/saveSysOrg/data.go +++ b/iSolarCloud/WebIscmAppService/saveSysOrg/data.go @@ -2,8 +2,8 @@ package saveSysOrg import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/saveSysOrg/struct.go b/iSolarCloud/WebIscmAppService/saveSysOrg/struct.go index 4e3e46408..0ba91dba1 100644 --- a/iSolarCloud/WebIscmAppService/saveSysOrg/struct.go +++ b/iSolarCloud/WebIscmAppService/saveSysOrg/struct.go @@ -6,8 +6,8 @@ package saveSysOrg import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/saveSysRole/data.go b/iSolarCloud/WebIscmAppService/saveSysRole/data.go index 81d83ea6e..9b784f8f3 100644 --- a/iSolarCloud/WebIscmAppService/saveSysRole/data.go +++ b/iSolarCloud/WebIscmAppService/saveSysRole/data.go @@ -2,8 +2,8 @@ package saveSysRole import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/saveSysRole/struct.go b/iSolarCloud/WebIscmAppService/saveSysRole/struct.go index 3b283268a..0bfc103dc 100644 --- a/iSolarCloud/WebIscmAppService/saveSysRole/struct.go +++ b/iSolarCloud/WebIscmAppService/saveSysRole/struct.go @@ -6,8 +6,8 @@ package saveSysRole import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/saveSysUser/data.go b/iSolarCloud/WebIscmAppService/saveSysUser/data.go index 7100e530a..6e9e543c6 100644 --- a/iSolarCloud/WebIscmAppService/saveSysUser/data.go +++ b/iSolarCloud/WebIscmAppService/saveSysUser/data.go @@ -2,8 +2,8 @@ package saveSysUser import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/saveSysUser/struct.go b/iSolarCloud/WebIscmAppService/saveSysUser/struct.go index e9aa3bb31..84e6cc42e 100644 --- a/iSolarCloud/WebIscmAppService/saveSysUser/struct.go +++ b/iSolarCloud/WebIscmAppService/saveSysUser/struct.go @@ -6,8 +6,8 @@ package saveSysUser import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/saveUserNode/data.go b/iSolarCloud/WebIscmAppService/saveUserNode/data.go index 8e12f5b3a..8f9c46eb9 100644 --- a/iSolarCloud/WebIscmAppService/saveUserNode/data.go +++ b/iSolarCloud/WebIscmAppService/saveUserNode/data.go @@ -2,8 +2,8 @@ package saveUserNode import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/saveUserNode/struct.go b/iSolarCloud/WebIscmAppService/saveUserNode/struct.go index ce39403f8..121b6db9a 100644 --- a/iSolarCloud/WebIscmAppService/saveUserNode/struct.go +++ b/iSolarCloud/WebIscmAppService/saveUserNode/struct.go @@ -6,8 +6,8 @@ package saveUserNode import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/saveUserRole/data.go b/iSolarCloud/WebIscmAppService/saveUserRole/data.go index 61c015c4c..324d31f33 100644 --- a/iSolarCloud/WebIscmAppService/saveUserRole/data.go +++ b/iSolarCloud/WebIscmAppService/saveUserRole/data.go @@ -2,8 +2,8 @@ package saveUserRole import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/saveUserRole/struct.go b/iSolarCloud/WebIscmAppService/saveUserRole/struct.go index 29cb65118..69caef42b 100644 --- a/iSolarCloud/WebIscmAppService/saveUserRole/struct.go +++ b/iSolarCloud/WebIscmAppService/saveUserRole/struct.go @@ -6,8 +6,8 @@ package saveUserRole import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/searchIrradiationData/data.go b/iSolarCloud/WebIscmAppService/searchIrradiationData/data.go index 3a209d624..4e679a62f 100644 --- a/iSolarCloud/WebIscmAppService/searchIrradiationData/data.go +++ b/iSolarCloud/WebIscmAppService/searchIrradiationData/data.go @@ -2,8 +2,8 @@ package searchIrradiationData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/searchIrradiationData/struct.go b/iSolarCloud/WebIscmAppService/searchIrradiationData/struct.go index 63ae60374..2e89b3193 100644 --- a/iSolarCloud/WebIscmAppService/searchIrradiationData/struct.go +++ b/iSolarCloud/WebIscmAppService/searchIrradiationData/struct.go @@ -6,8 +6,8 @@ package searchIrradiationData import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/searchTechnicalNums/data.go b/iSolarCloud/WebIscmAppService/searchTechnicalNums/data.go index 100cf4685..a4fc96d7a 100644 --- a/iSolarCloud/WebIscmAppService/searchTechnicalNums/data.go +++ b/iSolarCloud/WebIscmAppService/searchTechnicalNums/data.go @@ -2,8 +2,8 @@ package searchTechnicalNums import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/searchTechnicalNums/struct.go b/iSolarCloud/WebIscmAppService/searchTechnicalNums/struct.go index ab186c3b4..96b6f6baa 100644 --- a/iSolarCloud/WebIscmAppService/searchTechnicalNums/struct.go +++ b/iSolarCloud/WebIscmAppService/searchTechnicalNums/struct.go @@ -6,8 +6,8 @@ package searchTechnicalNums import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/selectDeviceTypeByPsId/data.go b/iSolarCloud/WebIscmAppService/selectDeviceTypeByPsId/data.go index 98825c705..67f1f0883 100644 --- a/iSolarCloud/WebIscmAppService/selectDeviceTypeByPsId/data.go +++ b/iSolarCloud/WebIscmAppService/selectDeviceTypeByPsId/data.go @@ -2,8 +2,8 @@ package selectDeviceTypeByPsId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/selectDeviceTypeByPsId/struct.go b/iSolarCloud/WebIscmAppService/selectDeviceTypeByPsId/struct.go index 39e2db50f..55b85359d 100644 --- a/iSolarCloud/WebIscmAppService/selectDeviceTypeByPsId/struct.go +++ b/iSolarCloud/WebIscmAppService/selectDeviceTypeByPsId/struct.go @@ -6,8 +6,8 @@ package selectDeviceTypeByPsId import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/selectPowerDeviceTechnicals/data.go b/iSolarCloud/WebIscmAppService/selectPowerDeviceTechnicals/data.go index 8a520a437..921ab4561 100644 --- a/iSolarCloud/WebIscmAppService/selectPowerDeviceTechnicals/data.go +++ b/iSolarCloud/WebIscmAppService/selectPowerDeviceTechnicals/data.go @@ -2,8 +2,8 @@ package selectPowerDeviceTechnicals import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/selectPowerDeviceTechnicals/struct.go b/iSolarCloud/WebIscmAppService/selectPowerDeviceTechnicals/struct.go index 38aceaafd..6d58f6909 100644 --- a/iSolarCloud/WebIscmAppService/selectPowerDeviceTechnicals/struct.go +++ b/iSolarCloud/WebIscmAppService/selectPowerDeviceTechnicals/struct.go @@ -6,8 +6,8 @@ package selectPowerDeviceTechnicals import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/selectPowerDeviceType/data.go b/iSolarCloud/WebIscmAppService/selectPowerDeviceType/data.go index 4db393bcc..a710f5054 100644 --- a/iSolarCloud/WebIscmAppService/selectPowerDeviceType/data.go +++ b/iSolarCloud/WebIscmAppService/selectPowerDeviceType/data.go @@ -2,8 +2,8 @@ package selectPowerDeviceType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/selectPowerDeviceType/struct.go b/iSolarCloud/WebIscmAppService/selectPowerDeviceType/struct.go index fec61d0f9..35ec012f8 100644 --- a/iSolarCloud/WebIscmAppService/selectPowerDeviceType/struct.go +++ b/iSolarCloud/WebIscmAppService/selectPowerDeviceType/struct.go @@ -6,8 +6,8 @@ package selectPowerDeviceType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/setupUserRole4AddUser/data.go b/iSolarCloud/WebIscmAppService/setupUserRole4AddUser/data.go index ca8706428..4b70b6961 100644 --- a/iSolarCloud/WebIscmAppService/setupUserRole4AddUser/data.go +++ b/iSolarCloud/WebIscmAppService/setupUserRole4AddUser/data.go @@ -2,8 +2,8 @@ package setupUserRole4AddUser import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/setupUserRole4AddUser/struct.go b/iSolarCloud/WebIscmAppService/setupUserRole4AddUser/struct.go index 55e1c8ce5..36a160e2b 100644 --- a/iSolarCloud/WebIscmAppService/setupUserRole4AddUser/struct.go +++ b/iSolarCloud/WebIscmAppService/setupUserRole4AddUser/struct.go @@ -6,8 +6,8 @@ package setupUserRole4AddUser import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/startWorkFlow/data.go b/iSolarCloud/WebIscmAppService/startWorkFlow/data.go index 0fb0a5eac..a00fae445 100644 --- a/iSolarCloud/WebIscmAppService/startWorkFlow/data.go +++ b/iSolarCloud/WebIscmAppService/startWorkFlow/data.go @@ -2,8 +2,8 @@ package startWorkFlow import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/startWorkFlow/struct.go b/iSolarCloud/WebIscmAppService/startWorkFlow/struct.go index 09a71d054..2a69c32be 100644 --- a/iSolarCloud/WebIscmAppService/startWorkFlow/struct.go +++ b/iSolarCloud/WebIscmAppService/startWorkFlow/struct.go @@ -6,8 +6,8 @@ package startWorkFlow import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/struct.go b/iSolarCloud/WebIscmAppService/struct.go index f5bbe829c..9120ef55c 100644 --- a/iSolarCloud/WebIscmAppService/struct.go +++ b/iSolarCloud/WebIscmAppService/struct.go @@ -1,4 +1,4 @@ -// API endpoints pulled from the sqlite database, (./assets/interface.db), contained within the Android app com.isolarcloud.manager +// Package WebIscmAppService - API endpoints pulled from the sqlite database, (./assets/interface.db), contained within the Android app com.isolarcloud.manager package WebIscmAppService import ( @@ -187,7 +187,7 @@ import ( "GoSungrow/iSolarCloud/WebIscmAppService/workFlowIsStart" "GoSungrow/iSolarCloud/WebIscmAppService/workFlowTransferStep" "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" "fmt" ) diff --git a/iSolarCloud/WebIscmAppService/updateDevice/data.go b/iSolarCloud/WebIscmAppService/updateDevice/data.go index 46363e9d2..588a8031a 100644 --- a/iSolarCloud/WebIscmAppService/updateDevice/data.go +++ b/iSolarCloud/WebIscmAppService/updateDevice/data.go @@ -2,8 +2,8 @@ package updateDevice import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/updateDevice/struct.go b/iSolarCloud/WebIscmAppService/updateDevice/struct.go index be6a4884f..743cf86ac 100644 --- a/iSolarCloud/WebIscmAppService/updateDevice/struct.go +++ b/iSolarCloud/WebIscmAppService/updateDevice/struct.go @@ -6,8 +6,8 @@ package updateDevice import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/updateDeviceType/data.go b/iSolarCloud/WebIscmAppService/updateDeviceType/data.go index 5af950421..6072e214d 100644 --- a/iSolarCloud/WebIscmAppService/updateDeviceType/data.go +++ b/iSolarCloud/WebIscmAppService/updateDeviceType/data.go @@ -2,8 +2,8 @@ package updateDeviceType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/updateDeviceType/struct.go b/iSolarCloud/WebIscmAppService/updateDeviceType/struct.go index cab2b10d0..e17818584 100644 --- a/iSolarCloud/WebIscmAppService/updateDeviceType/struct.go +++ b/iSolarCloud/WebIscmAppService/updateDeviceType/struct.go @@ -6,8 +6,8 @@ package updateDeviceType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/updateFaultLevel/data.go b/iSolarCloud/WebIscmAppService/updateFaultLevel/data.go index 1b5625d5c..49d99c8e1 100644 --- a/iSolarCloud/WebIscmAppService/updateFaultLevel/data.go +++ b/iSolarCloud/WebIscmAppService/updateFaultLevel/data.go @@ -2,8 +2,8 @@ package updateFaultLevel import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/updateFaultLevel/struct.go b/iSolarCloud/WebIscmAppService/updateFaultLevel/struct.go index 72a145213..80bef5369 100644 --- a/iSolarCloud/WebIscmAppService/updateFaultLevel/struct.go +++ b/iSolarCloud/WebIscmAppService/updateFaultLevel/struct.go @@ -6,8 +6,8 @@ package updateFaultLevel import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/updateNotice/data.go b/iSolarCloud/WebIscmAppService/updateNotice/data.go index caa480ee9..d073a0a38 100644 --- a/iSolarCloud/WebIscmAppService/updateNotice/data.go +++ b/iSolarCloud/WebIscmAppService/updateNotice/data.go @@ -2,8 +2,8 @@ package updateNotice import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/updateNotice/struct.go b/iSolarCloud/WebIscmAppService/updateNotice/struct.go index 7057a147f..39409f733 100644 --- a/iSolarCloud/WebIscmAppService/updateNotice/struct.go +++ b/iSolarCloud/WebIscmAppService/updateNotice/struct.go @@ -6,8 +6,8 @@ package updateNotice import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/updatePointInfo/data.go b/iSolarCloud/WebIscmAppService/updatePointInfo/data.go index dae312d97..f7fd8da8e 100644 --- a/iSolarCloud/WebIscmAppService/updatePointInfo/data.go +++ b/iSolarCloud/WebIscmAppService/updatePointInfo/data.go @@ -2,8 +2,8 @@ package updatePointInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/updatePointInfo/struct.go b/iSolarCloud/WebIscmAppService/updatePointInfo/struct.go index 471f5d582..2b337157e 100644 --- a/iSolarCloud/WebIscmAppService/updatePointInfo/struct.go +++ b/iSolarCloud/WebIscmAppService/updatePointInfo/struct.go @@ -6,8 +6,8 @@ package updatePointInfo import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/updatePowerDeviceModel/data.go b/iSolarCloud/WebIscmAppService/updatePowerDeviceModel/data.go index 8d69c0234..107b72d9c 100644 --- a/iSolarCloud/WebIscmAppService/updatePowerDeviceModel/data.go +++ b/iSolarCloud/WebIscmAppService/updatePowerDeviceModel/data.go @@ -2,8 +2,8 @@ package updatePowerDeviceModel import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/updatePowerDeviceModel/struct.go b/iSolarCloud/WebIscmAppService/updatePowerDeviceModel/struct.go index 1da87e275..04f6c2b01 100644 --- a/iSolarCloud/WebIscmAppService/updatePowerDeviceModel/struct.go +++ b/iSolarCloud/WebIscmAppService/updatePowerDeviceModel/struct.go @@ -6,8 +6,8 @@ package updatePowerDeviceModel import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/updatePowerDeviceParameterPage/data.go b/iSolarCloud/WebIscmAppService/updatePowerDeviceParameterPage/data.go index 308d0f128..da66e28aa 100644 --- a/iSolarCloud/WebIscmAppService/updatePowerDeviceParameterPage/data.go +++ b/iSolarCloud/WebIscmAppService/updatePowerDeviceParameterPage/data.go @@ -2,8 +2,8 @@ package updatePowerDeviceParameterPage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/updatePowerDeviceParameterPage/struct.go b/iSolarCloud/WebIscmAppService/updatePowerDeviceParameterPage/struct.go index 727ac3f5f..30339d7bf 100644 --- a/iSolarCloud/WebIscmAppService/updatePowerDeviceParameterPage/struct.go +++ b/iSolarCloud/WebIscmAppService/updatePowerDeviceParameterPage/struct.go @@ -6,8 +6,8 @@ package updatePowerDeviceParameterPage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/updatePowerDeviceSubType/data.go b/iSolarCloud/WebIscmAppService/updatePowerDeviceSubType/data.go index 99342f16e..90695214f 100644 --- a/iSolarCloud/WebIscmAppService/updatePowerDeviceSubType/data.go +++ b/iSolarCloud/WebIscmAppService/updatePowerDeviceSubType/data.go @@ -2,8 +2,8 @@ package updatePowerDeviceSubType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/updatePowerDeviceSubType/struct.go b/iSolarCloud/WebIscmAppService/updatePowerDeviceSubType/struct.go index 599b68416..087a00290 100644 --- a/iSolarCloud/WebIscmAppService/updatePowerDeviceSubType/struct.go +++ b/iSolarCloud/WebIscmAppService/updatePowerDeviceSubType/struct.go @@ -6,8 +6,8 @@ package updatePowerDeviceSubType import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/updatePowerDeviceTechnical/data.go b/iSolarCloud/WebIscmAppService/updatePowerDeviceTechnical/data.go index f2161e69a..be1b37544 100644 --- a/iSolarCloud/WebIscmAppService/updatePowerDeviceTechnical/data.go +++ b/iSolarCloud/WebIscmAppService/updatePowerDeviceTechnical/data.go @@ -2,8 +2,8 @@ package updatePowerDeviceTechnical import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/updatePowerDeviceTechnical/struct.go b/iSolarCloud/WebIscmAppService/updatePowerDeviceTechnical/struct.go index 46ae44d7a..fbe71a5ec 100644 --- a/iSolarCloud/WebIscmAppService/updatePowerDeviceTechnical/struct.go +++ b/iSolarCloud/WebIscmAppService/updatePowerDeviceTechnical/struct.go @@ -6,8 +6,8 @@ package updatePowerDeviceTechnical import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/updateProcessManage/data.go b/iSolarCloud/WebIscmAppService/updateProcessManage/data.go index d1b395b80..74e845e16 100644 --- a/iSolarCloud/WebIscmAppService/updateProcessManage/data.go +++ b/iSolarCloud/WebIscmAppService/updateProcessManage/data.go @@ -2,8 +2,8 @@ package updateProcessManage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "github.com/MickMake/GoUnify/Only" "fmt" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/updateProcessManage/struct.go b/iSolarCloud/WebIscmAppService/updateProcessManage/struct.go index b201060e6..9b2b6cc66 100644 --- a/iSolarCloud/WebIscmAppService/updateProcessManage/struct.go +++ b/iSolarCloud/WebIscmAppService/updateProcessManage/struct.go @@ -6,8 +6,8 @@ package updateProcessManage import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/updateSysOrgPro/data.go b/iSolarCloud/WebIscmAppService/updateSysOrgPro/data.go index 13bdbf63d..ad1fd08a6 100644 --- a/iSolarCloud/WebIscmAppService/updateSysOrgPro/data.go +++ b/iSolarCloud/WebIscmAppService/updateSysOrgPro/data.go @@ -2,8 +2,8 @@ package updateSysOrgPro import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/updateSysOrgPro/struct.go b/iSolarCloud/WebIscmAppService/updateSysOrgPro/struct.go index 5544cdf2e..0d1b8abc3 100644 --- a/iSolarCloud/WebIscmAppService/updateSysOrgPro/struct.go +++ b/iSolarCloud/WebIscmAppService/updateSysOrgPro/struct.go @@ -6,8 +6,8 @@ package updateSysOrgPro import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/updateSysRoleValidFlag/data.go b/iSolarCloud/WebIscmAppService/updateSysRoleValidFlag/data.go index 11c23c403..9425e9a2f 100644 --- a/iSolarCloud/WebIscmAppService/updateSysRoleValidFlag/data.go +++ b/iSolarCloud/WebIscmAppService/updateSysRoleValidFlag/data.go @@ -2,8 +2,8 @@ package updateSysRoleValidFlag import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/updateSysRoleValidFlag/struct.go b/iSolarCloud/WebIscmAppService/updateSysRoleValidFlag/struct.go index e918225aa..4cc2e0a2e 100644 --- a/iSolarCloud/WebIscmAppService/updateSysRoleValidFlag/struct.go +++ b/iSolarCloud/WebIscmAppService/updateSysRoleValidFlag/struct.go @@ -6,8 +6,8 @@ package updateSysRoleValidFlag import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "encoding/json" "errors" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/updateUserValidFlag/data.go b/iSolarCloud/WebIscmAppService/updateUserValidFlag/data.go index 847cea271..ecb835664 100644 --- a/iSolarCloud/WebIscmAppService/updateUserValidFlag/data.go +++ b/iSolarCloud/WebIscmAppService/updateUserValidFlag/data.go @@ -2,8 +2,8 @@ package updateUserValidFlag import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/updateUserValidFlag/struct.go b/iSolarCloud/WebIscmAppService/updateUserValidFlag/struct.go index bf1427d40..4a8b5b2e1 100644 --- a/iSolarCloud/WebIscmAppService/updateUserValidFlag/struct.go +++ b/iSolarCloud/WebIscmAppService/updateUserValidFlag/struct.go @@ -6,8 +6,8 @@ package updateUserValidFlag import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "github.com/MickMake/GoUnify/Only" "encoding/json" @@ -36,7 +36,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -94,7 +94,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -174,18 +174,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -222,7 +222,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/updateValidFlag/data.go b/iSolarCloud/WebIscmAppService/updateValidFlag/data.go index 68cd48e2f..259aa50ae 100644 --- a/iSolarCloud/WebIscmAppService/updateValidFlag/data.go +++ b/iSolarCloud/WebIscmAppService/updateValidFlag/data.go @@ -2,8 +2,8 @@ package updateValidFlag import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/updateValidFlag/struct.go b/iSolarCloud/WebIscmAppService/updateValidFlag/struct.go index fd28ad73f..07cb31f6d 100644 --- a/iSolarCloud/WebIscmAppService/updateValidFlag/struct.go +++ b/iSolarCloud/WebIscmAppService/updateValidFlag/struct.go @@ -6,8 +6,8 @@ package updateValidFlag import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "encoding/json" "errors" "fmt" @@ -35,7 +35,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -93,7 +93,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -173,18 +173,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -221,7 +221,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/viewDeviceModel/data.go b/iSolarCloud/WebIscmAppService/viewDeviceModel/data.go index c87a815f0..0a5e88e74 100644 --- a/iSolarCloud/WebIscmAppService/viewDeviceModel/data.go +++ b/iSolarCloud/WebIscmAppService/viewDeviceModel/data.go @@ -2,8 +2,8 @@ package viewDeviceModel import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -70,7 +70,7 @@ func (e *EndPoint) GetData() api.DataMap { entries := api.NewDataMap() for range Only.Once { - // pkg := apiReflect.GetName("", *e) + // pkg := reflection.GetName("", *e) // dt := valueTypes.NewDateTime(valueTypes.Now) // name := pkg + "." + e.Request.PsId.String() entries.StructToDataMap(*e, "system", nil) diff --git a/iSolarCloud/WebIscmAppService/viewDeviceModel/struct.go b/iSolarCloud/WebIscmAppService/viewDeviceModel/struct.go index b3a7575ef..d552c8356 100644 --- a/iSolarCloud/WebIscmAppService/viewDeviceModel/struct.go +++ b/iSolarCloud/WebIscmAppService/viewDeviceModel/struct.go @@ -6,8 +6,8 @@ package viewDeviceModel import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "encoding/json" "errors" "fmt" @@ -35,7 +35,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -93,7 +93,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -173,18 +173,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -221,7 +221,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/viewDeviceParameter/data.go b/iSolarCloud/WebIscmAppService/viewDeviceParameter/data.go index 177481248..639b7c465 100644 --- a/iSolarCloud/WebIscmAppService/viewDeviceParameter/data.go +++ b/iSolarCloud/WebIscmAppService/viewDeviceParameter/data.go @@ -2,8 +2,8 @@ package viewDeviceParameter import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { @@ -26,7 +26,32 @@ func (rd RequestData) Help() string { type ResultData struct { - Dummy valueTypes.String `json:"dummy"` + PageDataList []struct { + AapProtocolNum valueTypes.String `json:"aap_protocol_num"` + AapProtocolVersion valueTypes.String `json:"aap_protocol_version"` + ComType valueTypes.String `json:"com_type"` + CountryID valueTypes.Integer `json:"country_id"` + CountryName valueTypes.String `json:"country_name"` + DeviceModel valueTypes.String `json:"device_model"` + DeviceModelID valueTypes.String `json:"device_model_id"` + GridTypeID valueTypes.Integer `json:"grid_type_id"` + IacProtocolNum valueTypes.String `json:"iac_protocol_num"` + IacProtocolVersion valueTypes.String `json:"iac_protocol_version"` + ID valueTypes.Integer `json:"id"` + IsCountryCheck valueTypes.Integer `json:"is_country_check"` + IsReadSet valueTypes.Integer `json:"is_read_set"` + IsReset valueTypes.Integer `json:"is_reset"` + IsThirdParty valueTypes.Integer `json:"is_third_party"` + IsUseProtocolGetTemplate valueTypes.Integer `json:"is_use_protocol_get_template"` + MdspVersion valueTypes.String `json:"mdsp_version"` + Remark valueTypes.String `json:"remark"` + SdspVersion valueTypes.String `json:"sdsp_version"` + Series valueTypes.String `json:"series"` + SetID valueTypes.Integer `json:"set_id"` + SetName valueTypes.String `json:"set_name"` + TemplateType valueTypes.Integer `json:"template_type"` + Version valueTypes.String `json:"version"` + } `json:"pageDataList" PointId:"page_data_list" DataTable:"true"` } func (e *ResultData) IsValid() error { diff --git a/iSolarCloud/WebIscmAppService/viewDeviceParameter/struct.go b/iSolarCloud/WebIscmAppService/viewDeviceParameter/struct.go index 817a29d3d..51faf0fec 100644 --- a/iSolarCloud/WebIscmAppService/viewDeviceParameter/struct.go +++ b/iSolarCloud/WebIscmAppService/viewDeviceParameter/struct.go @@ -6,8 +6,8 @@ package viewDeviceParameter import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "encoding/json" "errors" "fmt" @@ -35,7 +35,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -93,7 +93,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -173,18 +173,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -221,7 +221,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/workFlowImplementStep/data.go b/iSolarCloud/WebIscmAppService/workFlowImplementStep/data.go index f48a183c6..9419284f6 100644 --- a/iSolarCloud/WebIscmAppService/workFlowImplementStep/data.go +++ b/iSolarCloud/WebIscmAppService/workFlowImplementStep/data.go @@ -2,8 +2,8 @@ package workFlowImplementStep import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/workFlowImplementStep/struct.go b/iSolarCloud/WebIscmAppService/workFlowImplementStep/struct.go index f392417ca..4e96da69a 100644 --- a/iSolarCloud/WebIscmAppService/workFlowImplementStep/struct.go +++ b/iSolarCloud/WebIscmAppService/workFlowImplementStep/struct.go @@ -6,8 +6,8 @@ package workFlowImplementStep import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "encoding/json" "errors" "fmt" @@ -35,7 +35,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -93,7 +93,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -173,18 +173,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -221,7 +221,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/workFlowIsStart/data.go b/iSolarCloud/WebIscmAppService/workFlowIsStart/data.go index 37ba6bfdb..ca43fabc7 100644 --- a/iSolarCloud/WebIscmAppService/workFlowIsStart/data.go +++ b/iSolarCloud/WebIscmAppService/workFlowIsStart/data.go @@ -2,8 +2,8 @@ package workFlowIsStart import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/workFlowIsStart/struct.go b/iSolarCloud/WebIscmAppService/workFlowIsStart/struct.go index 81683fd46..77542e919 100644 --- a/iSolarCloud/WebIscmAppService/workFlowIsStart/struct.go +++ b/iSolarCloud/WebIscmAppService/workFlowIsStart/struct.go @@ -6,8 +6,8 @@ package workFlowIsStart import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "encoding/json" "errors" "fmt" @@ -35,7 +35,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -93,7 +93,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -173,18 +173,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -221,7 +221,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/WebIscmAppService/workFlowTransferStep/data.go b/iSolarCloud/WebIscmAppService/workFlowTransferStep/data.go index 46a15cb47..666eeaa5c 100644 --- a/iSolarCloud/WebIscmAppService/workFlowTransferStep/data.go +++ b/iSolarCloud/WebIscmAppService/workFlowTransferStep/data.go @@ -2,8 +2,8 @@ package workFlowTransferStep import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "fmt" "github.com/MickMake/GoUnify/Only" ) @@ -16,7 +16,7 @@ type RequestData struct { } func (rd RequestData) IsValid() error { - return apiReflect.VerifyOptionsRequired(rd) + return GoStruct.VerifyOptionsRequired(rd) } func (rd RequestData) Help() string { diff --git a/iSolarCloud/WebIscmAppService/workFlowTransferStep/struct.go b/iSolarCloud/WebIscmAppService/workFlowTransferStep/struct.go index 8e280e907..53f36b943 100644 --- a/iSolarCloud/WebIscmAppService/workFlowTransferStep/struct.go +++ b/iSolarCloud/WebIscmAppService/workFlowTransferStep/struct.go @@ -6,8 +6,8 @@ package workFlowTransferStep import ( "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/apiReflect" - "GoSungrow/iSolarCloud/api/output" + "GoSungrow/iSolarCloud/api/GoStruct/output" + "GoSungrow/iSolarCloud/api/GoStruct/reflection" "encoding/json" "errors" "fmt" @@ -35,7 +35,7 @@ type Request struct { // Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields. type Response struct { api.ResponseCommon - ResultData ResultData `json:"result_data"` + ResultData ResultData `json:"result_data" PointNameAppend:"false"` } // Init - Used to initialize a new endpoint instance. Usually called from an area. @@ -93,7 +93,7 @@ func AssertResultData(e api.EndPoint) ResultData { // Help - Return help information on the JSON structure used to populate RequestData. func (e EndPoint) Help() string { - ret := apiReflect.HelpOptions(e.Request.RequestData) + ret := reflection.HelpOptions(e.Request.RequestData) ret += fmt.Sprintf("JSON request:\t%s\n", e.GetRequestJson()) ret += e.Request.Help() return ret @@ -173,18 +173,18 @@ func (e EndPoint) WriteDataFile() error { // SetRequest - Save an interface reference as either api.RequestCommon or RequestData. func (e EndPoint) SetRequest(ref interface{}) api.EndPoint { for range Only.Once { - if apiReflect.GetPkgType(ref) == "api.RequestCommon" { + if reflection.GetPkgType(ref) == "api.RequestCommon" { e.Request.RequestCommon = ref.(api.RequestCommon) break } - if apiReflect.GetType(ref) == "RequestData" { + if reflection.GetType(ref) == "RequestData" { e.Request.RequestData = ref.(RequestData) e.Error = e.IsRequestValid() break } - e.Error = apiReflect.DoPkgTypesMatch(e.Request, ref) + e.Error = reflection.DoPkgTypesMatch(e.Request, ref) if e.Error != nil { break } @@ -221,7 +221,7 @@ func (e EndPoint) GetRequestJson() output.Json { // // GetFingerprint - Used to formulate cache filenames. // func (e EndPoint) GetFingerprint() string { -// return apiReflect.GetFingerprint(e.Request.RequestData) +// return GoStruct.GetFingerprint(e.Request.RequestData) // } // IsRequestValid - Is api.RequestCommon and RequestData valid? diff --git a/iSolarCloud/z b/iSolarCloud/z deleted file mode 100755 index 1fa45b3a2..000000000 --- a/iSolarCloud/z +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -echo "################################################################################" -echo "# $1" -awk '!/^\t"/{print;next} !visited[$0]++{print}' $1 > /tmp/z -diff $1 /tmp/z -cp /tmp/z $1 - diff --git a/mmHa/sensors.go b/mmHa/sensors.go index a921b5e1b..13314389c 100644 --- a/mmHa/sensors.go +++ b/mmHa/sensors.go @@ -56,6 +56,10 @@ func (m *Mqtt) SensorPublishConfig(config EntityConfig) error { // config.DeviceClass = "temperature" // // point.Unit = "C" // + // case "℉": + // config.DeviceClass = "temperature" + // // point.Unit = "C" + // // case "C": // config.DeviceClass = "temperature" // config.Units = "℃" diff --git a/mmHa/struct.go b/mmHa/struct.go index 4d7fa7b40..63dfcec78 100644 --- a/mmHa/struct.go +++ b/mmHa/struct.go @@ -4,7 +4,7 @@ import ( "GoSungrow/Only" "GoSungrow/iSolarCloud/AppService/getDeviceList" "GoSungrow/iSolarCloud/api" - "GoSungrow/iSolarCloud/api/valueTypes" + "GoSungrow/iSolarCloud/api/GoStruct/valueTypes" "encoding/json" "errors" "fmt" @@ -611,6 +611,12 @@ func (config *EntityConfig) FixConfig() { config.Icon = SetDefault(config.Icon, "mdi:current-ac") config.ValueTemplate = SetDefault(config.ValueTemplate, "{{ value_json.value | float }}") + case "°F": + fallthrough + case "F": + fallthrough + case "℉": + fallthrough case "°C": fallthrough case "C":