getPsDetail

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 getPsDetail - 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/getPsDetail"

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"`
}

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 {
	ActualEnergy          []string      `json:"actual_energy"`
	ActualEnergyUnit      string        `json:"actual_energy_unit"`
	AlarmCount            int64         `json:"alarm_count"`
	AreaID                interface{}   `json:"area_id"`
	AreaType              string        `json:"area_type"`
	BuildDate             string        `json:"build_date"`
	Co2Reduce             api.UnitValue `json:"co2_reduce"`
	Co2ReduceTotal        api.UnitValue `json:"co2_reduce_total"`
	CoalReduce            api.UnitValue `json:"coal_reduce"`
	CoalReduceTotal       api.UnitValue `json:"coal_reduce_total"`
	ConnectGrid           string        `json:"connect_grid"`
	ConnectType           int64         `json:"connect_type"`
	ContactPerson         string        `json:"contact_person"`
	CurrPower             api.UnitValue `json:"curr_power"` // Pv Power
	DataLastUpdateTime    string        `json:"data_last_update_time"`
	DayEqHours            string        `json:"day_eq_hours"`
	Description           interface{}   `json:"description"`
	DesignCapacity        api.UnitValue `json:"design_capacity"`
	DesignCapacityBattery api.UnitValue `json:"design_capacity_battery"`
	DiagramURL            string        `json:"diagram_url"`
	EnergyScheme          interface{}   `json:"energy_scheme"`
	ExpectInstallDate     string        `json:"expect_install_date"`
	FaultCount            int64         `json:"fault_count"`
	FaultSendType         string        `json:"fault_send_type"`
	GcjLatitude           string        `json:"gcj_latitude"`
	GcjLongitude          string        `json:"gcj_longitude"`
	GprsLatitude          string        `json:"gprs_latitude"`
	GprsLongitude         string        `json:"gprs_longitude"`
	HasAmmeter            int64         `json:"has_ammeter"`
	Images                []struct {
		FileID      int64       `json:"file_id"`
		ID          int64       `json:"id"`
		PicLanguage int64       `json:"pic_language"`
		PicType     int64       `json:"pic_type"`
		PictureName string      `json:"picture_name"`
		PictureURL  string      `json:"picture_url"`
		PsUnitUUID  interface{} `json:"ps_unit_uuid"`
	} `json:"images"`
	InstallDate            string        `json:"install_date"`
	InstallerPsFaultStatus string        `json:"installer_ps_fault_status"`
	IsHaveEsInverter       int64         `json:"is_have_es_inverter"`
	IsTransformSystem      string        `json:"is_transform_system"`
	IsTuv                  int64         `json:"is_tuv"`
	Latitude               float64       `json:"latitude"`
	Longitude              float64       `json:"longitude"`
	MapLatitude            string        `json:"map_latitude"`
	MapLongitude           string        `json:"map_longitude"`
	MeterReduce            api.UnitValue `json:"meter_reduce"`
	MeterReduceTotal       api.UnitValue `json:"meter_reduce_total"`
	MibileTel              string        `json:"mibile_tel"`
	MonthPr                string        `json:"monthPr"`
	MonthEnergy            api.UnitValue `json:"month_energy"`
	MonthEnergyVirgin      api.UnitValue `json:"month_energy_virgin"`
	MonthEqHours           string        `json:"month_eq_hours"`
	MonthIncome            api.UnitValue `json:"month_income"`
	NoxReduce              api.UnitValue `json:"nox_reduce"`
	NoxReduceTotal         api.UnitValue `json:"nox_reduce_total"`
	OperateYear            string        `json:"operate_year"`
	OperationBusName       string        `json:"operation_bus_name"`
	OwnerPsFaultStatus     string        `json:"owner_ps_fault_status"`
	P83012Unit             string        `json:"p83012_unit"`
	P83012Value            string        `json:"p83012_value"`
	P83013Unit             string        `json:"p83013_unit"`
	P83013Value            string        `json:"p83013_value"`
	P83016                 string        `json:"p83016"`
	P83016Unit             string        `json:"p83016_unit"`
	P83017                 string        `json:"p83017"`
	P83017Unit             string        `json:"p83017_unit"`
	P83023                 string        `json:"p83023"`
	P83023y                string        `json:"p83023y"`
	P83023year             string        `json:"p83023year"`
	P83023ym               string        `json:"p83023ym"`
	P83036Unit             string        `json:"p83036_unit"`
	P83036Value            string        `json:"p83036_value"`
	P83043                 string        `json:"p83043"`
	P83044                 string        `json:"p83044"`
	P83045                 string        `json:"p83045"`
	P83072Map              api.UnitValue `json:"p83072_map"`
	P83072MapVirgin        api.UnitValue `json:"p83072_map_virgin"`
	P83073Map              api.UnitValue `json:"p83073_map"`
	P83073MapVirgin        api.UnitValue `json:"p83073_map_virgin"`
	P83074Map              api.UnitValue `json:"p83074_map"`
	P83074MapVirgin        api.UnitValue `json:"p83074_map_virgin"`
	P83075Map              api.UnitValue `json:"p83075_map"`
	P83075MapVirgin        api.UnitValue `json:"p83075_map_virgin"`
	P83076Map              api.UnitValue `json:"p83076_map"`        // Pv Power
	P83076MapVirgin        api.UnitValue `json:"p83076_map_virgin"` // Pv Power
	P83077Map              api.UnitValue `json:"p83077_map"`        // Pv Energy
	P83077MapVirgin        api.UnitValue `json:"p83077_map_virgin"` // Pv Energy
	P83078Map              api.UnitValue `json:"p83078_map"`
	P83078MapVirgin        api.UnitValue `json:"p83078_map_virgin"`
	P83079Map              api.UnitValue `json:"p83079_map"`
	P83079MapVirgin        api.UnitValue `json:"p83079_map_virgin"`
	P83080Map              api.UnitValue `json:"p83080_map"`
	P83080MapVirgin        api.UnitValue `json:"p83080_map_virgin"`
	P83088Map              api.UnitValue `json:"p83088_map"`        // Es Energy
	P83088MapVirgin        api.UnitValue `json:"p83088_map_virgin"` // Es Energy
	P83089Map              api.UnitValue `json:"p83089_map"`        // Es Discharge Energy
	P83089MapVirgin        api.UnitValue `json:"p83089_map_virgin"` // Es Discharge Energy
	P83094Map              api.UnitValue `json:"p83094_map"`
	P83094MapVirgin        api.UnitValue `json:"p83094_map_virgin"`
	P83095Map              api.UnitValue `json:"p83095_map"`        // Es Total Discharge Energy
	P83095MapVirgin        api.UnitValue `json:"p83095_map_virgin"` // Es Total Discharge Energy
	P83097Map              api.UnitValue `json:"p83097_map"`
	P83097MapVirgin        api.UnitValue `json:"p83097_map_virgin"`
	P83100Map              api.UnitValue `json:"p83100_map"`
	P83100MapVirgin        api.UnitValue `json:"p83100_map_virgin"`
	P83101Map              api.UnitValue `json:"p83101_map"`
	P83101MapVirgin        api.UnitValue `json:"p83101_map_virgin"`
	P83102Map              api.UnitValue `json:"p83102_map"`
	P83102MapVirgin        api.UnitValue `json:"p83102_map_virgin"`
	P83102Percent          string        `json:"p83102_percent"`
	P83105Map              api.UnitValue `json:"p83105_map"`
	P83105MapVirgin        api.UnitValue `json:"p83105_map_virgin"`
	P83106Map              api.UnitValue `json:"p83106_map"`
	P83106MapVirgin        api.UnitValue `json:"p83106_map_virgin"`
	P83107Map              api.UnitValue `json:"p83107_map"`
	P83107MapVirgin        api.UnitValue `json:"p83107_map_virgin"`
	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"`
	P83121                 string        `json:"p83121"`
	P83122                 string        `json:"p83122"`
	P83123Map              api.UnitValue `json:"p83123_map"`
	P83123MapVirgin        api.UnitValue `json:"p83123_map_virgin"`
	P83124Map              api.UnitValue `json:"p83124_map"`
	P83124MapVirgin        api.UnitValue `json:"p83124_map_virgin"`
	P83125                 string        `json:"p83125"`
	P83126                 string        `json:"p83126"`
	P83128MapVirgin        api.UnitValue `json:"p83128_map_virgin"`
	P83202Map              api.UnitValue `json:"p83202_map"`
	P83202MapVirgin        api.UnitValue `json:"p83202_map_virgin"`
	PercentPlanYear        float64       `json:"percent_plan_year"`
	PlanEnergy             []string      `json:"plan_energy"`
	PlanEnergyUnit         string        `json:"plan_energy_unit"`
	PlanEnergyYear         api.UnitValue `json:"plan_energy_year"`
	PowderReduce           api.UnitValue `json:"powder_reduce"`
	PowderReduceTotal      api.UnitValue `json:"powder_reduce_total"`
	PowerChargeSetted      int64         `json:"power_charge_setted"`
	Producer               string        `json:"producer"`
	PsCountryID            int64         `json:"ps_country_id"`
	PsFaultStatus          string        `json:"ps_fault_status"`
	PsHealthStatus         string        `json:"ps_health_status"`
	PsHolder               string        `json:"ps_holder"`
	PsLocation             string        `json:"ps_location"`
	PsName                 string        `json:"ps_name"`
	PsShortName            string        `json:"ps_short_name"`
	PsState                string        `json:"ps_state"`
	PsType                 int64         `json:"ps_type"`
	PsTypeName             string        `json:"ps_type_name"`
	PsWindLevel            string        `json:"ps_wind_level"`
	PsWindPos              string        `json:"ps_wind_pos"`
	RecoreCreateTime       string        `json:"recore_create_time"`
	ReportType             string        `json:"report_type"`
	RobotNumSweepCapacity  struct {
		Num           int64   `json:"num"`
		SweepCapacity float64 `json:"sweep_capacity"`
	} `json:"robot_num_sweep_capacity"`
	SafeStartDate                 string        `json:"safe_start_date"`
	SelfConsumptionOffsetReminder int64         `json:"self_consumption_offset_reminder"`
	ShippingAddress               string        `json:"shipping_address"`
	ShippingZipCode               string        `json:"shipping_zip_code"`
	So2Reduce                     api.UnitValue `json:"so2_reduce"`
	So2ReduceTotal                api.UnitValue `json:"so2_reduce_total"`
	StorageInverterData           []struct {
		CommunicationDevSn      string        `json:"communication_dev_sn"`
		DevFaultStatus          int64         `json:"dev_fault_status"`
		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"`
		P13011Map               api.UnitValue `json:"p13011_map"`
		P13011MapVirgin         api.UnitValue `json:"p13011_map_virgin"`
		P13115Map               api.UnitValue `json:"p13115_map"`
		P13115MapVirgin         api.UnitValue `json:"p13115_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"`
		P13142                  string        `json:"p13142"`
		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"`
		P13155                  string        `json:"p13155"`
		PsKey                   string        `json:"ps_key"`
		UpdateTime              string        `json:"update_time"`
		UUID                    int64         `json:"uuid"`
	} `json:"storage_inverter_data"`
	SysScheme            int64         `json:"sys_scheme"`
	TimeZoneID           int64         `json:"time_zone_id"`
	Timezone             string        `json:"timezone"`
	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"`
	TotalEnergyYear      api.UnitValue `json:"total_energy_year"`
	TotalIncome          api.UnitValue `json:"total_income"`
	TreeReduce           api.UnitValue `json:"tree_reduce"`
	TreeReduceTotal      api.UnitValue `json:"tree_reduce_total"`
	TuvLevel             string        `json:"tuv_level"`
	ValidFlag            string        `json:"valid_flag"`
	WaitAssignOrderCount int64         `json:"wait_assign_order_count"`
	WaterReduce          api.UnitValue `json:"water_reduce"`
	WaterReduceTotal     api.UnitValue `json:"water_reduce_total"`
	WgsLatitude          float64       `json:"wgs_latitude"`
	WgsLongitude         float64       `json:"wgs_longitude"`
	Year                 string        `json:"year"`
	ZfzyMap              api.UnitValue `json:"zfzy_map"`
	ZfzyMapVirgin        api.UnitValue `json:"zfzy_map_virgin"`
	ZipCode              string        `json:"zip_code"`
	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

Jump to

Keyboard shortcuts

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