Documentation ¶
Overview ¶
Package getReportData - This file is auto-generated from the update_all.sh script. Do not modify anything here. Any changes to this EndPoint should be made in the data.go file. The only exception is the AppService.login package.
Index ¶
- Constants
- type DataList
- type EndPoint
- func (e EndPoint) CacheFilename() string
- func (e EndPoint) Call() api.EndPoint
- func (e EndPoint) GetArea() api.AreaName
- func (e EndPoint) GetCacheTimeout() time.Duration
- func (e *EndPoint) GetData() api.DataMap
- func (e EndPoint) GetEndPointData() api.DataMap
- func (e EndPoint) GetEndPointDataTables() output.Tables
- func (e EndPoint) GetEndPointResultTable() output.Table
- func (e EndPoint) GetError() error
- func (e EndPoint) GetJsonData(raw bool) output.Json
- func (e EndPoint) GetName() api.EndPointName
- func (e EndPoint) GetRequest() Request
- func (e EndPoint) GetRequestArgNames() map[string]string
- func (e EndPoint) GetRequestJson() output.Json
- func (e EndPoint) GetResponse() Response
- func (e EndPoint) GetResponseJson() output.Json
- func (e EndPoint) GetUrl() api.EndPointUrl
- func (e EndPoint) Help() string
- func (e EndPoint) Init(apiRoot api.Web) *EndPoint
- func (e EndPoint) IsDebug() bool
- func (e EndPoint) IsDisabled() bool
- func (e EndPoint) IsError() bool
- func (e EndPoint) IsRequestValid() error
- func (e EndPoint) IsResponseValid() error
- func (e EndPoint) MarshalJSON() ([]byte, error)
- func (e EndPoint) ReadDataFile() error
- func (e EndPoint) RequestFingerprint() string
- func (e EndPoint) RequestRef() interface{}
- func (e EndPoint) RequestString() string
- func (e EndPoint) ResponseRef() interface{}
- func (e EndPoint) ResponseString() string
- func (e EndPoint) ResultDataRef() ResultData
- func (e EndPoint) SetCacheTimeout(duration time.Duration) api.EndPoint
- func (e EndPoint) SetError(format string, a ...interface{}) api.EndPoint
- func (e EndPoint) SetFilenamePrefix(format string, args ...interface{}) string
- func (e EndPoint) SetRequest(ref interface{}) api.EndPoint
- func (e EndPoint) SetRequestByJson(j output.Json) api.EndPoint
- func (e EndPoint) SetResponse(ref []byte) api.EndPoint
- func (e EndPoint) String() string
- func (e EndPoint) WriteDataFile() error
- type Request
- type RequestData
- type Response
- type ResultData
Constants ¶
const Disabled = false
const EndPointName = "AppService.getReportData"
const Url = "/v1/powerStationService/getReportData"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataList ¶
type DataList struct { GoStruct GoStruct.GoStruct `json:"-" PointIgnoreIfNil:"UpdateTime" PointIdFromChild:"DateId" PointNameDateFormat:"DateLayoutDay" PointIdReplace:"false"` DateId valueTypes.DateTime `json:"date_id" PointTimestampFrom:"UpdateTime" PointNameDateFormat:"DateLayoutDay"` PsId valueTypes.PsId `json:"ps_id" PointTimestampFrom:"UpdateTime"` TimeStamp valueTypes.Generic `json:"time_stamp" PointTimestampFrom:"UpdateTime"` // Sad that this alternates between string and valueTypes.Integer. UpdateTime valueTypes.DateTime `json:"update_time" PointTimestampFrom:"UpdateTime" PointNameDateFormat:"DateTimeLayout"` DeviceName interface{} `json:"device_name" PointTimestampFrom:"UpdateTime"` UUID interface{} `json:"uuid" PointTimestampFrom:"UpdateTime"` Co2Reduce valueTypes.Float `json:"co2_reduce" PointTimestampFrom:"UpdateTime"` CitySubsidyCharge valueTypes.Float `json:"city_subsidy_charge" PointTimestampFrom:"UpdateTime" PointUnitFrom:"CitySubsidyChargeOriginalUnit"` CitySubsidyChargeOriginalUnit valueTypes.String `json:"city_subsidy_charge_original_unit" PointIgnore:"true"` CitySubsidyChargeTran valueTypes.Float `json:"city_subsidy_charge_tran" PointTimestampFrom:"UpdateTime" PointUnitFrom:"CitySubsidyChargeUnit" PointIgnore:"true"` CitySubsidyChargeUnit valueTypes.String `json:"city_subsidy_charge_unit" PointIgnore:"true"` CountrySubsidyCharge valueTypes.Float `json:"country_subsidy_charge" PointTimestampFrom:"UpdateTime" PointUnitFrom:"CountrySubsidyChargeOriginalUnit"` CountrySubsidyChargeOriginalUnit valueTypes.String `json:"country_subsidy_charge_original_unit" PointIgnore:"true"` CountrySubsidyChargeTran valueTypes.Float `` /* 126-byte string literal not displayed */ CountrySubsidyChargeUnit valueTypes.String `json:"country_subsidy_charge_unit" PointIgnore:"true"` CountySubsidyCharge valueTypes.Float `json:"county_subsidy_charge" PointTimestampFrom:"UpdateTime" PointUnitFrom:"CountySubsidyChargeOriginalUnit"` CountySubsidyChargeOriginalUnit valueTypes.String `json:"county_subsidy_charge_original_unit" PointIgnore:"true"` CountySubsidyChargeTran valueTypes.Float `json:"county_subsidy_charge_tran" PointTimestampFrom:"UpdateTime" PointUnitFrom:"CountySubsidyChargeUnit" PointIgnore:"true"` CountySubsidyChargeUnit valueTypes.String `json:"county_subsidy_charge_unit" PointIgnore:"true"` CuspCharge valueTypes.Float `json:"cusp_charge" PointTimestampFrom:"UpdateTime" PointUnitFrom:"CuspChargeOriginalUnit"` CuspChargeOriginalUnit valueTypes.String `json:"cusp_charge_original_unit" PointIgnore:"true"` CuspChargeTran valueTypes.Float `json:"cusp_charge_tran" PointTimestampFrom:"UpdateTime" PointUnitFrom:"CuspChargeUnit" PointIgnore:"true"` CuspChargeUnit valueTypes.String `json:"cusp_charge_unit" PointIgnore:"true"` FlatCharge valueTypes.Float `json:"flat_charge" PointTimestampFrom:"UpdateTime" PointUnitFrom:"FlatChargeOriginalUnit"` FlatChargeOriginalUnit valueTypes.String `json:"flat_charge_original_unit" PointIgnore:"true"` FlatChargeTran valueTypes.Float `json:"flat_charge_tran" PointTimestampFrom:"UpdateTime" PointUnitFrom:"FlatChargeUnit"` FlatChargeUnit valueTypes.String `json:"flat_charge_unit" PointIgnore:"true"` PeakCharge valueTypes.Float `json:"peak_charge" PointTimestampFrom:"UpdateTime" PointUnitFrom:"PeakChargeOriginalUnit"` PeakChargeOriginalUnit valueTypes.String `json:"peak_charge_original_unit" PointIgnore:"true"` PeakChargeTran valueTypes.Float `json:"peak_charge_tran" PointTimestampFrom:"UpdateTime" PointUnitFrom:"PeakChargeUnit"` PeakChargeUnit valueTypes.String `json:"peak_charge_unit" PointIgnore:"true"` ProvinceSubsidyCharge valueTypes.Float `json:"province_subsidy_charge" PointTimestampFrom:"UpdateTime" PointUnitFrom:"ProvinceSubsidyChargeOriginalUnit"` ProvinceSubsidyChargeOriginalUnit valueTypes.String `json:"province_subsidy_charge_original_unit" PointIgnore:"true"` ProvinceSubsidyChargeTran valueTypes.Float `json:"province_subsidy_charge_tran" PointTimestampFrom:"UpdateTime" PointUnitFrom:"ProvinceSubsidyChargeUnit"` ProvinceSubsidyChargeUnit valueTypes.String `json:"province_subsidy_charge_unit" PointIgnore:"true"` ValleyCharge valueTypes.Float `json:"valley_charge" PointTimestampFrom:"UpdateTime" PointUnitFrom:"ValleyChargeOriginalUnit"` ValleyChargeOriginalUnit valueTypes.String `json:"valley_charge_original_unit" PointIgnore:"true"` ValleyChargeTran valueTypes.Float `json:"valley_charge_tran" PointTimestampFrom:"UpdateTime" PointUnitFrom:"ValleyChargeUnit" PointIgnore:"true"` ValleyChargeUnit valueTypes.String `json:"valley_charge_unit" PointIgnore:"true"` NetPowerProfit valueTypes.Float `json:"net_power_profit" PointTimestampFrom:"UpdateTime" PointUnitFrom:"NetPowerProfitOriginalUnit"` NetPowerProfitOriginalUnit valueTypes.String `json:"net_power_profit_original_unit" PointIgnore:"true"` NetPowerProfitTran valueTypes.Float `json:"net_power_profit_tran" PointTimestampFrom:"UpdateTime" PointUnitFrom:"NetPowerProfitUnit" PointIgnore:"true"` NetPowerProfitUnit valueTypes.String `json:"net_power_profit_unit" PointIgnore:"true"` SubsidyProfit valueTypes.Float `json:"subsidy_profit" PointTimestampFrom:"UpdateTime" PointUnitFrom:"SubsidyProfitOriginalUnit"` SubsidyProfitOriginalUnit valueTypes.String `json:"subsidy_profit_original_unit" PointIgnore:"true"` SubsidyProfitTran valueTypes.Float `json:"subsidy_profit_tran" PointTimestampFrom:"UpdateTime" PointUnitFrom:"SubsidyProfitUnit"` SubsidyProfitUnit valueTypes.String `json:"subsidy_profit_unit" PointIgnore:"true"` TotalProfit valueTypes.Float `json:"total_profit" PointTimestampFrom:"UpdateTime" PointUnitFrom:"TotalProfitOriginalUnit"` TotalProfitOriginalUnit valueTypes.String `json:"total_profit_original_unit" PointIgnore:"true"` TotalProfitTran valueTypes.Float `json:"total_profit_tran" PointTimestampFrom:"UpdateTime" PointUnitFrom:"TotalProfitUnit" PointIgnore:"true"` TotalProfitUnit valueTypes.String `json:"total_profit_unit" PointIgnore:"true"` UsePowerByDiscountProfit valueTypes.Float `json:"use_power_by_discount_profit" PointTimestampFrom:"UpdateTime" PointUnitFrom:"UsePowerByDiscountProfitOriginalUnit"` UsePowerByDiscountProfitOriginalUnit valueTypes.String `json:"use_power_by_discount_profit_original_unit" PointIgnore:"true"` UsePowerByDiscountProfitTran valueTypes.Float `` /* 136-byte string literal not displayed */ UsePowerByDiscountProfitUnit valueTypes.String `json:"use_power_by_discount_profit_unit" PointIgnore:"true"` UsePowerProfit valueTypes.Float `json:"use_power_profit" PointTimestampFrom:"UpdateTime" PointUnitFrom:"UsePowerProfitOriginalUnit"` UsePowerProfitOriginalUnit valueTypes.String `json:"use_power_profit_original_unit" PointIgnore:"true"` UsePowerProfitTran valueTypes.Float `json:"use_power_profit_tran" PointTimestampFrom:"UpdateTime" PointUnitFrom:"UsePowerProfitUnit" PointIgnore:"true"` UsePowerProfitUnit valueTypes.String `json:"use_power_profit_unit" PointIgnore:"true"` CuspNetPowerQuantity valueTypes.Float `json:"cusp_net_power_quantity" PointTimestampFrom:"UpdateTime" PointUnitFrom:"CuspNetPowerQuantityUnit"` CuspNetPowerQuantityTran valueTypes.Float `` /* 127-byte string literal not displayed */ CuspNetPowerQuantityUnit valueTypes.String `json:"cusp_net_power_quantity_unit" PointIgnore:"true"` CuspPowerQuantity valueTypes.Float `json:"cusp_power_quantity" PointTimestampFrom:"UpdateTime" PointUnitFrom:"CuspPowerQuantityUnit"` CuspPowerQuantityTran valueTypes.Float `json:"cusp_power_quantity_tran" PointTimestampFrom:"UpdateTime" PointUnitFrom:"CuspPowerQuantityUnit" PointIgnore:"true"` CuspPowerQuantityUnit valueTypes.String `json:"cusp_power_quantity_unit" PointIgnore:"true"` CuspUsePowerQuantity valueTypes.Float `json:"cusp_use_power_quantity" PointTimestampFrom:"UpdateTime" PointUnitFrom:"CuspUsePowerQuantityUnit"` CuspUsePowerQuantityTran valueTypes.Float `` /* 127-byte string literal not displayed */ CuspUsePowerQuantityUnit valueTypes.String `json:"cusp_use_power_quantity_unit" PointIgnore:"true"` FlatNetPowerQuantity valueTypes.Float `json:"flat_net_power_quantity" PointTimestampFrom:"UpdateTime" PointUnitFrom:"FlatNetPowerQuantityUnit"` FlatNetPowerQuantityTran valueTypes.Float `` /* 127-byte string literal not displayed */ FlatNetPowerQuantityUnit valueTypes.String `json:"flat_net_power_quantity_unit" PointIgnore:"true"` FlatPowerQuantity valueTypes.Float `json:"flat_power_quantity" PointTimestampFrom:"UpdateTime" PointUnitFrom:"FlatPowerQuantityUnit"` FlatPowerQuantityTran valueTypes.Float `json:"flat_power_quantity_tran" PointTimestampFrom:"UpdateTime" PointUnitFrom:"FlatPowerQuantityUnit" PointIgnore:"true"` FlatPowerQuantityUnit valueTypes.String `json:"flat_power_quantity_unit" PointIgnore:"true"` FlatUsePowerQuantity valueTypes.Float `json:"flat_use_power_quantity" PointTimestampFrom:"UpdateTime" PointUnitFrom:"FlatUsePowerQuantityUnit"` FlatUsePowerQuantityTran valueTypes.Float `` /* 127-byte string literal not displayed */ FlatUsePowerQuantityUnit valueTypes.String `json:"flat_use_power_quantity_unit" PointIgnore:"true"` NetPowerQuantityTotal valueTypes.Float `json:"net_power_quantity_total" PointTimestampFrom:"UpdateTime" PointUnitFrom:"NetPowerQuantityTotalUnit"` NetPowerQuantityTotalTran valueTypes.Float `` /* 129-byte string literal not displayed */ NetPowerQuantityTotalUnit valueTypes.String `json:"net_power_quantity_total_unit" PointIgnore:"true"` PeakNetPowerQuantity valueTypes.Float `json:"peak_net_power_quantity" PointTimestampFrom:"UpdateTime" PointUnitFrom:"PeakNetPowerQuantityUnit"` PeakNetPowerQuantityTran valueTypes.Float `` /* 127-byte string literal not displayed */ PeakNetPowerQuantityUnit valueTypes.String `json:"peak_net_power_quantity_unit" PointIgnore:"true"` PeakPowerQuantity valueTypes.Float `json:"peak_power_quantity" PointTimestampFrom:"UpdateTime" PointUnitFrom:"PeakPowerQuantityUnit"` PeakPowerQuantityTran valueTypes.Float `json:"peak_power_quantity_tran" PointTimestampFrom:"UpdateTime" PointUnitFrom:"PeakPowerQuantityUnit" PointIgnore:"true"` PeakPowerQuantityUnit valueTypes.String `json:"peak_power_quantity_unit" PointIgnore:"true"` PeakUsePowerQuantity valueTypes.Float `json:"peak_use_power_quantity" PointTimestampFrom:"UpdateTime" PointUnitFrom:"PeakUsePowerQuantityUnit"` PeakUsePowerQuantityTran valueTypes.Float `` /* 127-byte string literal not displayed */ PeakUsePowerQuantityUnit valueTypes.String `json:"peak_use_power_quantity_unit" PointIgnore:"true"` PowerQuantityTotal valueTypes.Float `json:"power_quantity_total" PointTimestampFrom:"UpdateTime" PointUnitFrom:"PowerQuantityTotalUnit"` PowerQuantityTotalTran valueTypes.Float `json:"power_quantity_total_tran" PointTimestampFrom:"UpdateTime" PointUnitFrom:"PowerQuantityTotalUnit" PointIgnore:"true"` PowerQuantityTotalUnit valueTypes.String `json:"power_quantity_total_unit" PointIgnore:"true"` UsePowerQuantityTotal valueTypes.Float `json:"use_power_quantity_total" PointTimestampFrom:"UpdateTime" PointUnitFrom:"UsePowerQuantityTotalUnit"` UsePowerQuantityTotalTran valueTypes.Float `` /* 129-byte string literal not displayed */ UsePowerQuantityTotalUnit valueTypes.String `json:"use_power_quantity_total_unit" PointIgnore:"true"` ValleyNetPowerQuantity valueTypes.Float `json:"valley_net_power_quantity" PointTimestampFrom:"UpdateTime" PointUnitFrom:"ValleyNetPowerQuantityUnit"` ValleyNetPowerQuantityTran valueTypes.Float `` /* 131-byte string literal not displayed */ ValleyNetPowerQuantityUnit valueTypes.String `json:"valley_net_power_quantity_unit" PointIgnore:"true"` ValleyPowerQuantity valueTypes.Float `json:"valley_power_quantity" PointTimestampFrom:"UpdateTime" PointUnitFrom:"ValleyPowerQuantityUnit"` ValleyPowerQuantityTran valueTypes.Float `json:"valley_power_quantity_tran" PointTimestampFrom:"UpdateTime" PointUnitFrom:"ValleyPowerQuantityUnit" PointIgnore:"true"` ValleyPowerQuantityUnit valueTypes.String `json:"valley_power_quantity_unit" PointIgnore:"true"` ValleyUsePowerQuantity valueTypes.Float `json:"valley_use_power_quantity" PointTimestampFrom:"UpdateTime" PointUnitFrom:"ValleyUsePowerQuantityUnit"` ValleyUsePowerQuantityTran valueTypes.Float `` /* 131-byte string literal not displayed */ ValleyUsePowerQuantityUnit valueTypes.String `json:"valley_use_power_quantity_unit" PointIgnore:"true"` }
type EndPoint ¶
type EndPoint struct { api.EndPointStruct Request Request Response Response }
EndPoint - Holds the request, response and web method structures.
func Assert ¶
Assert - Used to obtain locally scoped EndPoint methods, (not visible from api.EndPoint).
func (EndPoint) CacheFilename ¶
CacheFilename - Check if a cache file exists for this EndPoint.
func (EndPoint) Call ¶
Call - Once RequestData is populated, this will access the iSolarCloud API and populate ResultData.
func (EndPoint) GetCacheTimeout ¶
GetCacheTimeout - Return the cache timeout for this EndPoint.
func (EndPoint) GetEndPointData ¶
func (EndPoint) GetEndPointDataTables ¶
func (EndPoint) GetEndPointResultTable ¶
func (EndPoint) GetJsonData ¶
GetJsonData - Get the JSON representation of ResultData, either as condensed or "pretty".
func (EndPoint) GetName ¶
func (e EndPoint) GetName() api.EndPointName
GetName - Returns the API EndPoint name.
func (EndPoint) GetRequest ¶
GetRequest - Get the Request structure as scoped by this endpoint.
func (EndPoint) GetRequestArgNames ¶
GetRequestArgNames -
func (EndPoint) GetRequestJson ¶
GetRequestJson - Return the Request structure as a JSON string.
func (EndPoint) GetResponse ¶
GetResponse - Get the Response structure as scoped by this endpoint.
func (EndPoint) GetResponseJson ¶
GetResponseJson - Return the Response structure as a JSON string.
func (EndPoint) GetUrl ¶
func (e EndPoint) GetUrl() api.EndPointUrl
GetUrl - Returns the API EndPoint url.
func (EndPoint) Help ¶
Help - Return help information on the JSON structure used to populate RequestData.
func (EndPoint) IsDisabled ¶
IsDisabled - Is this endpoint disabled? See data.go Disabled constant.
func (EndPoint) IsRequestValid ¶
IsRequestValid - Is api.RequestCommon and RequestData valid?
func (EndPoint) IsResponseValid ¶
IsResponseValid - Is api.ResponseCommon and ResultData valid?
func (EndPoint) MarshalJSON ¶
MarshalJSON - Marshall the EndPoint.
func (EndPoint) ReadDataFile ¶
ReadDataFile - Read a JSON file and populate the ResultData structure. (File names will default to AREA-ENDPOINT.json )
func (EndPoint) RequestFingerprint ¶
RequestFingerprint - Check if a cache file exists for this EndPoint.
func (EndPoint) RequestRef ¶
func (e EndPoint) RequestRef() interface{}
RequestRef - Return the locally scoped Request structure.
func (EndPoint) RequestString ¶
RequestString - Return the Request structure as a human-readable string.
func (EndPoint) ResponseRef ¶
func (e EndPoint) ResponseRef() interface{}
ResponseRef - Return the locally scoped Response structure.
func (EndPoint) ResponseString ¶
ResponseString - Return the Response structure as a human-readable string.
func (EndPoint) ResultDataRef ¶
func (e EndPoint) ResultDataRef() ResultData
ResultDataRef - Return the locally scoped ResultData structure.
func (EndPoint) SetCacheTimeout ¶
SetCacheTimeout - Set the cache timeout for this EndPoint. (Defaults to 1 hour.)
func (EndPoint) SetFilenamePrefix ¶
SetFilenamePrefix - Produce filename based on area and endpoint name.
func (EndPoint) SetRequest ¶
SetRequest - Save an interface reference as either api.RequestCommon or RequestData.
func (EndPoint) SetRequestByJson ¶
SetRequestByJson - Save RequestData from a JSON string.
func (EndPoint) SetResponse ¶
SetResponse - Save a JSON string to the Response structure. (Used by the web call method.)
func (EndPoint) WriteDataFile ¶
WriteDataFile - Write to a file, the contents of ResultData as JSON. (File names will default to AREA-ENDPOINT.json )
type Request ¶
type Request struct { api.RequestCommon RequestData }
Request - Holds the api.RequestCommon and user RequestData structures. See data.go for request fields.
type RequestData ¶
type RequestData struct { PsId valueTypes.PsId `json:"ps_id" required:"true"` ReportType valueTypes.Integer `json:"report_type" required:"true"` }
func (RequestData) Help ¶
func (rd RequestData) Help() string
func (RequestData) IsValid ¶
func (rd RequestData) IsValid() error
type Response ¶
type Response struct { api.ResponseCommon ResultData ResultData `json:"result_data" PointIdReplace:"true"` }
Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields.
type ResultData ¶
type ResultData struct { MinDateId interface{} `json:"min_date_id"` Info Common.ReportInfo `json:"info" PointArrayFlatten:"false"` DataList []DataList `json:"dataList" PointId:"data_list" PointIdReplace:"true" DataTable:"true"` Total []DataList `json:"total" PointId:"total" PointIdReplace:"true" DataTable:"true"` }
func AssertResultData ¶
func AssertResultData(e api.EndPoint) ResultData
AssertResultData - Used to obtain locally scoped ResultData methods, (not visible from api.EndPoint).
func (*ResultData) IsValid ¶
func (e *ResultData) IsValid() error