reportList

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2022 License: GPL-2.0 Imports: 8 Imported by: 0

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

View Source
const Disabled = false
View Source
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

func Assert(e api.EndPoint) EndPoint

Assert - Used to obtain locally scoped EndPoint methods, (not visible from api.EndPoint).

func Init

func Init(apiRoot api.Web) EndPoint

Init - Used to initialize a new endpoint instance. Usually called from an area.

func (EndPoint) CacheFilename

func (e EndPoint) CacheFilename() string

CacheFilename - Check if a cache file exists for this EndPoint.

func (EndPoint) Call

func (e EndPoint) Call() api.EndPoint

Call - Once RequestData is populated, this will access the iSolarCloud API and populate ResultData.

func (EndPoint) GetArea

func (e EndPoint) GetArea() api.AreaName

GetArea - Returns the API area that this EndPoint is located.

func (EndPoint) GetCacheTimeout

func (e EndPoint) GetCacheTimeout() time.Duration

GetCacheTimeout - Return the cache timeout for this EndPoint.

func (EndPoint) GetError

func (e EndPoint) GetError() error

GetError - Get the error code for this EndPoint.

func (EndPoint) GetJsonData

func (e EndPoint) GetJsonData(raw bool) output.Json

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

func (e EndPoint) GetRequest() Request

GetRequest - Get the Request structure as scoped by this endpoint.

func (EndPoint) GetRequestJson

func (e EndPoint) GetRequestJson() output.Json

GetRequestJson - Return the Request structure as a JSON string.

func (EndPoint) GetResponse

func (e EndPoint) GetResponse() Response

GetResponse - Get the Response structure as scoped by this endpoint.

func (EndPoint) GetResponseJson

func (e EndPoint) GetResponseJson() output.Json

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

func (e EndPoint) Help() string

Help - Return help information on the JSON structure used to populate RequestData.

func (EndPoint) Init

func (e EndPoint) Init(apiRoot api.Web) *EndPoint

Init - If the endpoint needs to be re-initialized.

func (EndPoint) IsDisabled

func (e EndPoint) IsDisabled() bool

IsDisabled - Is this endpoint disabled? See data.go Disabled constant.

func (EndPoint) IsError

func (e EndPoint) IsError() bool

IsError - Is there an error?

func (EndPoint) IsRequestValid

func (e EndPoint) IsRequestValid() error

IsRequestValid - Is api.RequestCommon and RequestData valid?

func (EndPoint) IsResponseValid

func (e EndPoint) IsResponseValid() error

IsResponseValid - Is api.ResponseCommon and ResultData valid?

func (EndPoint) MarshalJSON

func (e EndPoint) MarshalJSON() ([]byte, error)

MarshalJSON - Marshall the EndPoint.

func (EndPoint) ReadDataFile

func (e EndPoint) ReadDataFile() error

ReadDataFile - Read a JSON file and populate the ResultData structure. (File names will default to AREA-ENDPOINT.json )

func (EndPoint) RequestFingerprint

func (e EndPoint) RequestFingerprint() string

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

func (e EndPoint) RequestString() string

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

func (e EndPoint) ResponseString() string

ResponseString - Return the Response structure as a human-readable string.

func (EndPoint) SetCacheTimeout

func (e EndPoint) SetCacheTimeout(duration time.Duration) api.EndPoint

SetCacheTimeout - Set the cache timeout for this EndPoint. (Defaults to 1 hour.)

func (EndPoint) SetError

func (e EndPoint) SetError(format string, a ...interface{}) api.EndPoint

SetError - Set the error code for this EndPoint.

func (EndPoint) SetRequest

func (e EndPoint) SetRequest(ref interface{}) api.EndPoint

SetRequest - Save an interface reference as either api.RequestCommon or RequestData.

func (EndPoint) SetRequestByJson

func (e EndPoint) SetRequestByJson(j output.Json) api.EndPoint

SetRequestByJson - Save RequestData from a JSON string.

func (EndPoint) SetResponse

func (e EndPoint) SetResponse(ref []byte) api.EndPoint

SetResponse - Save a JSON string to the Response structure. (Used by the web call method.)

func (EndPoint) String

func (e EndPoint) String() string

String - Stringer method for this EndPoint.

func (EndPoint) WriteDataFile

func (e EndPoint) WriteDataFile() error

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

Jump to

Keyboard shortcuts

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