Documentation
¶
Overview ¶
Package reportList - 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 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) GetError() error
- func (e EndPoint) GetJsonData(raw bool) output.Json
- func (e EndPoint) GetName() api.EndPointName
- func (e EndPoint) GetRequest() Request
- 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) 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) SetCacheTimeout(duration time.Duration) api.EndPoint
- func (e EndPoint) SetError(format string, a ...interface{}) api.EndPoint
- 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 Url = "/v1/powerStationService/reportList"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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) 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) 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) SetCacheTimeout ¶
SetCacheTimeout - Set the cache timeout for this EndPoint. (Defaults to 1 hour.)
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 string `json:"ps_id" required:"true"`
ReportType string `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"`
}
Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields.
type ResultData ¶
type ResultData struct {
DataList []struct {
CitySubsidyCharge string `json:"city_subsidy_charge"`
CitySubsidyChargeOriginalUnit string `json:"city_subsidy_charge_original_unit"`
CitySubsidyChargeTran string `json:"city_subsidy_charge_tran"`
CitySubsidyChargeUnit string `json:"city_subsidy_charge_unit"`
Co2Reduce float64 `json:"co2_reduce"`
CountrySubsidyCharge string `json:"country_subsidy_charge"`
CountrySubsidyChargeOriginalUnit string `json:"country_subsidy_charge_original_unit"`
CountrySubsidyChargeTran string `json:"country_subsidy_charge_tran"`
CountrySubsidyChargeUnit string `json:"country_subsidy_charge_unit"`
CountySubsidyCharge string `json:"county_subsidy_charge"`
CountySubsidyChargeOriginalUnit string `json:"county_subsidy_charge_original_unit"`
CountySubsidyChargeTran string `json:"county_subsidy_charge_tran"`
CountySubsidyChargeUnit string `json:"county_subsidy_charge_unit"`
CuspCharge string `json:"cusp_charge"`
CuspChargeOriginalUnit string `json:"cusp_charge_original_unit"`
CuspChargeTran string `json:"cusp_charge_tran"`
CuspChargeUnit string `json:"cusp_charge_unit"`
CuspNetPowerQuantity string `json:"cusp_net_power_quantity"`
CuspNetPowerQuantityTran string `json:"cusp_net_power_quantity_tran"`
CuspNetPowerQuantityUnit string `json:"cusp_net_power_quantity_unit"`
CuspPowerQuantity string `json:"cusp_power_quantity"`
CuspPowerQuantityTran string `json:"cusp_power_quantity_tran"`
CuspPowerQuantityUnit string `json:"cusp_power_quantity_unit"`
CuspUsePowerQuantity string `json:"cusp_use_power_quantity"`
CuspUsePowerQuantityTran string `json:"cusp_use_power_quantity_tran"`
CuspUsePowerQuantityUnit string `json:"cusp_use_power_quantity_unit"`
DateID string `json:"date_id"`
DeviceName interface{} `json:"device_name"`
FlatCharge string `json:"flat_charge"`
FlatChargeOriginalUnit string `json:"flat_charge_original_unit"`
FlatChargeTran string `json:"flat_charge_tran"`
FlatChargeUnit string `json:"flat_charge_unit"`
FlatNetPowerQuantity string `json:"flat_net_power_quantity"`
FlatNetPowerQuantityTran string `json:"flat_net_power_quantity_tran"`
FlatNetPowerQuantityUnit string `json:"flat_net_power_quantity_unit"`
FlatPowerQuantity string `json:"flat_power_quantity"`
FlatPowerQuantityTran string `json:"flat_power_quantity_tran"`
FlatPowerQuantityUnit string `json:"flat_power_quantity_unit"`
FlatUsePowerQuantity string `json:"flat_use_power_quantity"`
FlatUsePowerQuantityTran string `json:"flat_use_power_quantity_tran"`
FlatUsePowerQuantityUnit string `json:"flat_use_power_quantity_unit"`
NetPowerProfit string `json:"net_power_profit"`
NetPowerProfitOriginalUnit string `json:"net_power_profit_original_unit"`
NetPowerProfitTran string `json:"net_power_profit_tran"`
NetPowerProfitUnit string `json:"net_power_profit_unit"`
NetPowerQuantityTotal string `json:"net_power_quantity_total"`
NetPowerQuantityTotalTran string `json:"net_power_quantity_total_tran"`
NetPowerQuantityTotalUnit string `json:"net_power_quantity_total_unit"`
PeakCharge string `json:"peak_charge"`
PeakChargeOriginalUnit string `json:"peak_charge_original_unit"`
PeakChargeTran string `json:"peak_charge_tran"`
PeakChargeUnit string `json:"peak_charge_unit"`
PeakNetPowerQuantity string `json:"peak_net_power_quantity"`
PeakNetPowerQuantityTran string `json:"peak_net_power_quantity_tran"`
PeakNetPowerQuantityUnit string `json:"peak_net_power_quantity_unit"`
PeakPowerQuantity string `json:"peak_power_quantity"`
PeakPowerQuantityTran string `json:"peak_power_quantity_tran"`
PeakPowerQuantityUnit string `json:"peak_power_quantity_unit"`
PeakUsePowerQuantity string `json:"peak_use_power_quantity"`
PeakUsePowerQuantityTran string `json:"peak_use_power_quantity_tran"`
PeakUsePowerQuantityUnit string `json:"peak_use_power_quantity_unit"`
PowerQuantityTotal string `json:"power_quantity_total"`
PowerQuantityTotalTran string `json:"power_quantity_total_tran"`
PowerQuantityTotalUnit string `json:"power_quantity_total_unit"`
ProvinceSubsidyCharge string `json:"province_subsidy_charge"`
ProvinceSubsidyChargeOriginalUnit string `json:"province_subsidy_charge_original_unit"`
ProvinceSubsidyChargeTran string `json:"province_subsidy_charge_tran"`
ProvinceSubsidyChargeUnit string `json:"province_subsidy_charge_unit"`
PsID int64 `json:"ps_id"`
SubsidyProfit string `json:"subsidy_profit"`
SubsidyProfitOriginalUnit string `json:"subsidy_profit_original_unit"`
SubsidyProfitTran string `json:"subsidy_profit_tran"`
SubsidyProfitUnit string `json:"subsidy_profit_unit"`
TimeStamp string `json:"time_stamp"`
TotalProfit string `json:"total_profit"`
TotalProfitOriginalUnit string `json:"total_profit_original_unit"`
TotalProfitTran string `json:"total_profit_tran"`
TotalProfitUnit string `json:"total_profit_unit"`
UpdateTime string `json:"update_time"`
UsePowerByDiscountProfit string `json:"use_power_by_discount_profit"`
UsePowerByDiscountProfitOriginalUnit string `json:"use_power_by_discount_profit_original_unit"`
UsePowerByDiscountProfitTran string `json:"use_power_by_discount_profit_tran"`
UsePowerByDiscountProfitUnit string `json:"use_power_by_discount_profit_unit"`
UsePowerProfit string `json:"use_power_profit"`
UsePowerProfitOriginalUnit string `json:"use_power_profit_original_unit"`
UsePowerProfitTran string `json:"use_power_profit_tran"`
UsePowerProfitUnit string `json:"use_power_profit_unit"`
UsePowerQuantityTotal string `json:"use_power_quantity_total"`
UsePowerQuantityTotalTran string `json:"use_power_quantity_total_tran"`
UsePowerQuantityTotalUnit string `json:"use_power_quantity_total_unit"`
UUID interface{} `json:"uuid"`
ValleyCharge string `json:"valley_charge"`
ValleyChargeOriginalUnit string `json:"valley_charge_original_unit"`
ValleyChargeTran string `json:"valley_charge_tran"`
ValleyChargeUnit string `json:"valley_charge_unit"`
ValleyNetPowerQuantity string `json:"valley_net_power_quantity"`
ValleyNetPowerQuantityTran string `json:"valley_net_power_quantity_tran"`
ValleyNetPowerQuantityUnit string `json:"valley_net_power_quantity_unit"`
ValleyPowerQuantity string `json:"valley_power_quantity"`
ValleyPowerQuantityTran string `json:"valley_power_quantity_tran"`
ValleyPowerQuantityUnit string `json:"valley_power_quantity_unit"`
ValleyUsePowerQuantity string `json:"valley_use_power_quantity"`
ValleyUsePowerQuantityTran string `json:"valley_use_power_quantity_tran"`
ValleyUsePowerQuantityUnit string `json:"valley_use_power_quantity_unit"`
} `json:"dataList"`
Info []struct {
DesignCapacity float64 `json:"design_capacity"`
InstallerPsFaultStatus int64 `json:"installer_ps_fault_status"`
OwnerPsFaultStatus int64 `json:"owner_ps_fault_status"`
PsFaultStatus int64 `json:"ps_fault_status"`
PsID int64 `json:"ps_id"`
PsName string `json:"ps_name"`
PsStatus int64 `json:"ps_status"`
PsType int64 `json:"ps_type"`
PsTypeName string `json:"ps_type_name"`
SysScheme int64 `json:"sys_scheme"`
SysSchemeName string `json:"sys_scheme_name"`
ValidFlag int64 `json:"valid_flag"`
} `json:"info"`
MinDateID interface{} `json:"min_date_id"`
Total []struct {
CitySubsidyCharge string `json:"city_subsidy_charge"`
CitySubsidyChargeOriginalUnit string `json:"city_subsidy_charge_original_unit"`
CitySubsidyChargeTran string `json:"city_subsidy_charge_tran"`
CitySubsidyChargeUnit string `json:"city_subsidy_charge_unit"`
CountrySubsidyCharge string `json:"country_subsidy_charge"`
CountrySubsidyChargeOriginalUnit string `json:"country_subsidy_charge_original_unit"`
CountrySubsidyChargeTran string `json:"country_subsidy_charge_tran"`
CountrySubsidyChargeUnit string `json:"country_subsidy_charge_unit"`
CountySubsidyCharge string `json:"county_subsidy_charge"`
CountySubsidyChargeOriginalUnit string `json:"county_subsidy_charge_original_unit"`
CountySubsidyChargeTran string `json:"county_subsidy_charge_tran"`
CountySubsidyChargeUnit string `json:"county_subsidy_charge_unit"`
CuspCharge string `json:"cusp_charge"`
CuspChargeOriginalUnit string `json:"cusp_charge_original_unit"`
CuspChargeTran string `json:"cusp_charge_tran"`
CuspChargeUnit string `json:"cusp_charge_unit"`
CuspNetPowerQuantity string `json:"cusp_net_power_quantity"`
CuspNetPowerQuantityTran string `json:"cusp_net_power_quantity_tran"`
CuspNetPowerQuantityUnit string `json:"cusp_net_power_quantity_unit"`
CuspPowerQuantity string `json:"cusp_power_quantity"`
CuspPowerQuantityTran string `json:"cusp_power_quantity_tran"`
CuspPowerQuantityUnit string `json:"cusp_power_quantity_unit"`
CuspUsePowerQuantity string `json:"cusp_use_power_quantity"`
CuspUsePowerQuantityTran string `json:"cusp_use_power_quantity_tran"`
CuspUsePowerQuantityUnit string `json:"cusp_use_power_quantity_unit"`
FlatCharge string `json:"flat_charge"`
FlatChargeOriginalUnit string `json:"flat_charge_original_unit"`
FlatChargeTran string `json:"flat_charge_tran"`
FlatChargeUnit string `json:"flat_charge_unit"`
FlatNetPowerQuantity string `json:"flat_net_power_quantity"`
FlatNetPowerQuantityTran string `json:"flat_net_power_quantity_tran"`
FlatNetPowerQuantityUnit string `json:"flat_net_power_quantity_unit"`
FlatPowerQuantity string `json:"flat_power_quantity"`
FlatPowerQuantityTran string `json:"flat_power_quantity_tran"`
FlatPowerQuantityUnit string `json:"flat_power_quantity_unit"`
FlatUsePowerQuantity string `json:"flat_use_power_quantity"`
FlatUsePowerQuantityTran string `json:"flat_use_power_quantity_tran"`
FlatUsePowerQuantityUnit string `json:"flat_use_power_quantity_unit"`
NetPowerProfit string `json:"net_power_profit"`
NetPowerProfitOriginalUnit string `json:"net_power_profit_original_unit"`
NetPowerProfitTran string `json:"net_power_profit_tran"`
NetPowerProfitUnit string `json:"net_power_profit_unit"`
NetPowerQuantityTotal string `json:"net_power_quantity_total"`
NetPowerQuantityTotalTran string `json:"net_power_quantity_total_tran"`
NetPowerQuantityTotalUnit string `json:"net_power_quantity_total_unit"`
PeakCharge string `json:"peak_charge"`
PeakChargeOriginalUnit string `json:"peak_charge_original_unit"`
PeakChargeTran string `json:"peak_charge_tran"`
PeakChargeUnit string `json:"peak_charge_unit"`
PeakNetPowerQuantity string `json:"peak_net_power_quantity"`
PeakNetPowerQuantityTran string `json:"peak_net_power_quantity_tran"`
PeakNetPowerQuantityUnit string `json:"peak_net_power_quantity_unit"`
PeakPowerQuantity string `json:"peak_power_quantity"`
PeakPowerQuantityTran string `json:"peak_power_quantity_tran"`
PeakPowerQuantityUnit string `json:"peak_power_quantity_unit"`
PeakUsePowerQuantity string `json:"peak_use_power_quantity"`
PeakUsePowerQuantityTran string `json:"peak_use_power_quantity_tran"`
PeakUsePowerQuantityUnit string `json:"peak_use_power_quantity_unit"`
PowerQuantityTotal string `json:"power_quantity_total"`
PowerQuantityTotalTran string `json:"power_quantity_total_tran"`
PowerQuantityTotalUnit string `json:"power_quantity_total_unit"`
ProvinceSubsidyCharge string `json:"province_subsidy_charge"`
ProvinceSubsidyChargeOriginalUnit string `json:"province_subsidy_charge_original_unit"`
ProvinceSubsidyChargeTran string `json:"province_subsidy_charge_tran"`
ProvinceSubsidyChargeUnit string `json:"province_subsidy_charge_unit"`
PsID int64 `json:"ps_id"`
SubsidyProfit string `json:"subsidy_profit"`
SubsidyProfitOriginalUnit string `json:"subsidy_profit_original_unit"`
SubsidyProfitTran string `json:"subsidy_profit_tran"`
SubsidyProfitUnit string `json:"subsidy_profit_unit"`
TotalProfit string `json:"total_profit"`
TotalProfitOriginalUnit string `json:"total_profit_original_unit"`
TotalProfitTran string `json:"total_profit_tran"`
TotalProfitUnit string `json:"total_profit_unit"`
UpdateTime string `json:"update_time"`
UsePowerByDiscountProfit string `json:"use_power_by_discount_profit"`
UsePowerByDiscountProfitOriginalUnit string `json:"use_power_by_discount_profit_original_unit"`
UsePowerByDiscountProfitTran string `json:"use_power_by_discount_profit_tran"`
UsePowerByDiscountProfitUnit string `json:"use_power_by_discount_profit_unit"`
UsePowerProfit string `json:"use_power_profit"`
UsePowerProfitOriginalUnit string `json:"use_power_profit_original_unit"`
UsePowerProfitTran string `json:"use_power_profit_tran"`
UsePowerProfitUnit string `json:"use_power_profit_unit"`
UsePowerQuantityTotal string `json:"use_power_quantity_total"`
UsePowerQuantityTotalTran string `json:"use_power_quantity_total_tran"`
UsePowerQuantityTotalUnit string `json:"use_power_quantity_total_unit"`
ValleyCharge string `json:"valley_charge"`
ValleyChargeOriginalUnit string `json:"valley_charge_original_unit"`
ValleyChargeTran string `json:"valley_charge_tran"`
ValleyChargeUnit string `json:"valley_charge_unit"`
ValleyNetPowerQuantity string `json:"valley_net_power_quantity"`
ValleyNetPowerQuantityTran string `json:"valley_net_power_quantity_tran"`
ValleyNetPowerQuantityUnit string `json:"valley_net_power_quantity_unit"`
ValleyPowerQuantity string `json:"valley_power_quantity"`
ValleyPowerQuantityTran string `json:"valley_power_quantity_tran"`
ValleyPowerQuantityUnit string `json:"valley_power_quantity_unit"`
ValleyUsePowerQuantity string `json:"valley_use_power_quantity"`
ValleyUsePowerQuantityTran string `json:"valley_use_power_quantity_tran"`
ValleyUsePowerQuantityUnit string `json:"valley_use_power_quantity_unit"`
} `json:"total"`
}
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