Documentation ¶
Overview ¶
Package getPsDetailWithPsType - 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) GetData() api.DataMap
- func (e *EndPoint) GetDataTable() output.Table
- func (e *EndPoint) GetDeviceModelCode() string
- func (e *EndPoint) GetDeviceName() string
- func (e *EndPoint) GetDeviceSerial() string
- func (e EndPoint) GetError() error
- func (e EndPoint) GetJsonData(raw bool) output.Json
- func (e EndPoint) GetName() api.EndPointName
- func (e *EndPoint) GetPsKey() string
- func (e *EndPoint) GetPsKeys() []string
- func (e *EndPoint) GetPsName() string
- func (e *EndPoint) GetPsState() string
- 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/getPsDetailWithPsType"
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) GetDataTable ¶
func (*EndPoint) GetDeviceModelCode ¶
func (*EndPoint) GetDeviceName ¶
func (*EndPoint) GetDeviceSerial ¶
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) GetPsState ¶
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"`
}
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 { BatteryLevelPercent string `json:"battery_level_percent"` ChargingDischargingPowerMap api.UnitValue `json:"charging_discharging_power_map"` Co2ReduceTotal api.UnitValue `json:"co2_reduce_total"` CoalReduceTotal api.UnitValue `json:"coal_reduce_total"` ConnectType string `json:"connect_type"` CurrPower api.UnitValue `json:"curr_power"` DesignCapacity api.UnitValue `json:"design_capacity"` EnergyScheme interface{} `json:"energy_scheme"` GcjLatitude string `json:"gcj_latitude"` GcjLongitude string `json:"gcj_longitude"` HasAmmeter int64 `json:"has_ammeter"` HouseholdInverterData interface{} `json:"household_inverter_data"` InstallerPsFaultStatus string `json:"installer_ps_fault_status"` IsHaveEsInverter int64 `json:"is_have_es_inverter"` IsSingleInverter int64 `json:"is_single_inverter"` IsTransformSystem string `json:"is_transform_system"` Latitude float64 `json:"latitude"` LoadPowerMap api.UnitValue `json:"load_power_map"` LoadPowerMapVirgin api.UnitValue `json:"load_power_map_virgin"` Longitude float64 `json:"longitude"` MapLatitude string `json:"map_latitude"` MapLongitude string `json:"map_longitude"` MeterReduceTotal api.UnitValue `json:"meter_reduce_total"` MobleTel string `json:"moble_tel"` MonthEnergy api.UnitValue `json:"month_energy"` MonthEnergyVirgin api.UnitValue `json:"month_energy_virgin"` MonthIncome api.UnitValue `json:"month_income"` NegativeLoadMsg interface{} `json:"negative_load_msg"` OwnerPsFaultStatus string `json:"owner_ps_fault_status"` P83081Map api.UnitValue `json:"p83081_map"` P83081MapVirgin api.UnitValue `json:"p83081_map_virgin"` P83102Map api.UnitValue `json:"p83102_map"` P83102MapVirgin api.UnitValue `json:"p83102_map_virgin"` P83102Percent string `json:"p83102_percent"` P83118Map api.UnitValue `json:"p83118_map"` P83118MapVirgin api.UnitValue `json:"p83118_map_virgin"` P83119Map api.UnitValue `json:"p83119_map"` P83119MapVirgin api.UnitValue `json:"p83119_map_virgin"` P83120Map api.UnitValue `json:"p83120_map"` P83120MapVirgin api.UnitValue `json:"p83120_map_virgin"` P83122 string `json:"p83122"` P83124Map api.UnitValue `json:"p83124_map"` P83124MapVirgin api.UnitValue `json:"p83124_map_virgin"` P83202Map api.UnitValue `json:"p83202_map"` P83202MapVirgin api.UnitValue `json:"p83202_map_virgin"` P83532MapVirgin api.UnitValue `json:"p83532_map_virgin"` PowerChargeSetted int64 `json:"power_charge_setted"` PowerGridPowerMap api.UnitValue `json:"power_grid_power_map"` PowerGridPowerMapVirgin api.UnitValue `json:"power_grid_power_map_virgin"` PsCountryID int64 `json:"ps_country_id"` PsDeviceType string `json:"ps_device_type"` PsFaultStatus string `json:"ps_fault_status"` PsHealthStatus string `json:"ps_health_status"` PsLocation string `json:"ps_location"` PsName string `json:"ps_name"` PsPsKey string `json:"ps_ps_key"` PsState string `json:"ps_state"` PsType int64 `json:"ps_type"` PvPowerMap api.UnitValue `json:"pv_power_map"` PvPowerMapVirgin api.UnitValue `json:"pv_power_map_virgin"` RobotNumSweepCapacity struct { Num int64 `json:"num"` SweepCapacity float64 `json:"sweep_capacity"` } `json:"robot_num_sweep_capacity"` SelfConsumptionOffsetReminder int64 `json:"self_consumption_offset_reminder"` So2ReduceTotal api.UnitValue `json:"so2_reduce_total"` StorageInverterData []struct { CommunicationDevSn string `json:"communication_dev_sn"` DevStatus int64 `json:"dev_status"` DeviceCode int64 `json:"device_code"` DeviceModelCode string `json:"device_model_code"` DeviceName string `json:"device_name"` DeviceState string `json:"device_state"` DeviceType int64 `json:"device_type"` DrmStatus string `json:"drm_status"` DrmStatusName string `json:"drm_status_name"` EnergyFlow []string `json:"energy_flow"` HasAmmeter int64 `json:"has_ammeter"` InstallerDevFaultStatus int64 `json:"installer_dev_fault_status"` InverterSn string `json:"inverter_sn"` OwnerDevFaultStatus int64 `json:"owner_dev_fault_status"` P13003Map api.UnitValue `json:"p13003_map"` P13003MapVirgin api.UnitValue `json:"p13003_map_virgin"` P13119Map api.UnitValue `json:"p13119_map"` P13119MapVirgin api.UnitValue `json:"p13119_map_virgin"` P13121Map api.UnitValue `json:"p13121_map"` P13121MapVirgin api.UnitValue `json:"p13121_map_virgin"` P13126Map api.UnitValue `json:"p13126_map"` P13126MapVirgin api.UnitValue `json:"p13126_map_virgin"` P13141 string `json:"p13141"` P13149Map api.UnitValue `json:"p13149_map"` P13149MapVirgin api.UnitValue `json:"p13149_map_virgin"` P13150Map api.UnitValue `json:"p13150_map"` P13150MapVirgin api.UnitValue `json:"p13150_map_virgin"` PsKey string `json:"ps_key"` UUID int64 `json:"uuid"` } `json:"storage_inverter_data"` TodayEnergy api.UnitValue `json:"today_energy"` TodayEnergyVirgin api.UnitValue `json:"today_energy_virgin"` TodayIncome api.UnitValue `json:"today_income"` TotalEnergy api.UnitValue `json:"total_energy"` TotalEnergyVirgin api.UnitValue `json:"total_energy_virgin"` TotalIncome api.UnitValue `json:"total_income"` TreeReduceTotal api.UnitValue `json:"tree_reduce_total"` ValidFlag int64 `json:"valid_flag"` WgsLatitude float64 `json:"wgs_latitude"` WgsLongitude float64 `json:"wgs_longitude"` ZfzyMap api.UnitValue `json:"zfzy_map"` ZfzyMapVirgin api.UnitValue `json:"zfzy_map_virgin"` ZjzzMap api.UnitValue `json:"zjzz_map"` ZjzzMapVirgin api.UnitValue `json:"zjzz_map_virgin"` }
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