getPsDetailWithPsType

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 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

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

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) GetData

func (e *EndPoint) GetData() api.DataMap

func (*EndPoint) GetDataTable

func (e *EndPoint) GetDataTable() output.Table

func (*EndPoint) GetDeviceModelCode

func (e *EndPoint) GetDeviceModelCode() string

func (*EndPoint) GetDeviceName

func (e *EndPoint) GetDeviceName() string

func (*EndPoint) GetDeviceSerial

func (e *EndPoint) GetDeviceSerial() string

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) GetPsKey

func (e *EndPoint) GetPsKey() string

func (*EndPoint) GetPsKeys

func (e *EndPoint) GetPsKeys() []string

func (*EndPoint) GetPsName

func (e *EndPoint) GetPsName() string

func (*EndPoint) GetPsState

func (e *EndPoint) GetPsState() string

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 {
	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

Jump to

Keyboard shortcuts

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