getPowerStationInfo

package
v0.0.0-...-391253a Latest Latest
Warning

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

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

Documentation

Overview

Package getPowerStationInfo - 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 EndPointName = "WebIscmAppService.getPowerStationInfo"
View Source
const Url = "/v1/powerStationService/getPowerStationInfoForBackSys"

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

func (e EndPoint) GetEndPointData() api.DataMap

func (EndPoint) GetEndPointDataTables

func (e EndPoint) GetEndPointDataTables() output.Tables

func (EndPoint) GetEndPointResultTable

func (e EndPoint) GetEndPointResultTable() output.Table

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

func (e EndPoint) GetRequestArgNames() map[string]string

GetRequestArgNames -

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

func (e EndPoint) IsDebug() bool

IsDebug - Are we in debug mode?

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

func (e EndPoint) ResultDataRef() ResultData

ResultDataRef - Return the locally scoped ResultData structure.

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

func (e EndPoint) SetFilenamePrefix(format string, args ...interface{}) string

SetFilenamePrefix - Produce filename based on area and endpoint name.

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 {
	// @TODO - Fixup this up for iSolarCloud/data_request.go
	PsId2 valueTypes.PsId `json:"psId" require:"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" PointIdReplace:"true"`
}

Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields.

type ResultData

type ResultData struct {
	RemindType Common.Unknown `json:"remindType" PointId:"remind_type"`

	PsList []struct {
		PsId   valueTypes.PsId    `json:"ps_id"`
		PsType valueTypes.Integer `json:"ps_type"`

		BatteryPlateArea      Common.Unknown     `json:"battery_plate_area"`
		BatteryType           valueTypes.Integer `json:"battery_type"`
		ConnectGrid           Common.Unknown     `json:"connect_grid"`
		ContactMobile         Common.Unknown     `json:"contact_mobile"`
		ContactMobileBak      Common.Unknown     `json:"contact_mobile_bak"`
		ContactName           valueTypes.String  `json:"contact_name"`
		ContactTel            Common.Unknown     `json:"contact_tel"`
		CreateTime            valueTypes.String  `json:"create_time"`
		CreateUserId          valueTypes.Integer `json:"create_user_id"`
		DesignCapacity        valueTypes.Float   `json:"design_capacity"`
		DesignCapacityBattery valueTypes.Float   `json:"design_capacity_battery"`
		EquivalentHour        valueTypes.Integer `json:"equivalent_hour"`
		GetCostCycle          valueTypes.Float   `json:"get_cost_cycle"`
		InverterLoadSum       Common.Unknown     `json:"inverter_load_sum"`
		IsNewVersion          valueTypes.Bool    `json:"isNewVersion"`
		IsAgreeGdpr           valueTypes.Bool    `json:"is_agree_gdpr"`
		IsGdpr                valueTypes.Bool    `json:"is_gdpr"`
		IsOpenProtocol        valueTypes.Bool    `json:"is_open_protocol"`
		IsReceiveNotice       valueTypes.Bool    `json:"is_receive_notice"`
		IsSharePosition       valueTypes.Bool    `json:"is_share_position"`
		MobileTel             Common.Unknown     `json:"moble_tel" PointId:"mobile_tel"`
		Monetary              Common.Unknown     `json:"monetary"`
		ParamCo2              valueTypes.Float   `json:"param_co2"`
		ParamConvertRate      valueTypes.Float   `json:"param_conver_rate" PointId:"param_convert_rate"`
		ParamIncome           valueTypes.Float   `json:"param_income"`
		ParamIncomeUnit       valueTypes.Integer `json:"param_income_unit"`
		ParamTemperature      Common.Unknown     `json:"param_temperature"`
		ParamTree             valueTypes.Float   `json:"param_tree"`
		PrAddition            valueTypes.Float   `json:"pr_addition"`
		PrMax                 valueTypes.Float   `json:"pr_max"`
		PrMin                 valueTypes.Float   `json:"pr_min"`
		PrRatio               valueTypes.Float   `json:"pr_ratio"`
		PsEmail               valueTypes.String  `json:"ps_email"`
		PwCost                valueTypes.Float   `json:"pw_cost"`
		RadiationMax          valueTypes.Float   `json:"radiation_max"`
		UserAccount           valueTypes.String  `json:"user_account"`
		UserEmail             valueTypes.String  `json:"user_email"`
		UserName              valueTypes.String  `json:"user_name"`
	} `json:"psList" PointId:"ps_list"`

	PsMap struct {
		PsId   valueTypes.PsId    `json:"psid" PointId:"ps_id"`
		PsType valueTypes.Integer `json:"pstype" PointId:"ps_type"`

		AccessType        Common.Unknown      `json:"access_type"`
		AreaType          Common.Unknown      `json:"area_type"`
		AreaId            Common.Unknown      `json:"areaid" PointId:"area_id"`
		BuildDate         valueTypes.DateTime `json:"build_date" PointNameDateFormat:"DateTimeLayout"`
		BuildStatus       valueTypes.Integer  `json:"buildstatus" PointId:"build_status"`
		CapitalType       valueTypes.Integer  `json:"capitaltype" PointId:"capital_type"`
		City              Common.Unknown      `json:"city"`
		Country           Common.Unknown      `json:"country"`
		CountyCode        Common.Unknown      `json:"county_code"`
		DistrictFlag      valueTypes.Integer  `json:"district_flag"`
		DivisionCode      Common.Unknown      `json:"division_code"`
		Email             valueTypes.String   `json:"email"`
		ExpectInstallDate valueTypes.DateTime `json:"expect_install_date" PointNameDateFormat:"DateTimeLayout"`
		FaultSendType     Common.Unknown      `json:"fault_send_type"`
		GcjLatitude       valueTypes.Float    `json:"gcj_latitude"`
		GcjLongitude      valueTypes.Float    `json:"gcj_longitude"`
		GprsLatitude      valueTypes.Float    `json:"gprs_latitude"`
		GprsLongitude     valueTypes.Float    `json:"gprs_longitude"`
		InstallDate       valueTypes.DateTime `json:"installdate" PointNameDateFormat:"DateTimeLayout"`
		InvestmentType    valueTypes.Integer  `json:"investment_type"`
		Latitude          valueTypes.Float    `json:"latitude"`
		Longitude         valueTypes.Float    `json:"longitude"`
		MapLatitude       valueTypes.Float    `json:"map_latitude"`
		MapLongitude      valueTypes.Float    `json:"map_longitude"`
		MonitorUrl        Common.Unknown      `json:"montorurl" PointId:"monitor_url"`
		Name              Common.Unknown      `json:"name"`
		NameCode          Common.Unknown      `json:"name_code"`
		Nation            Common.Unknown      `json:"nation"`
		NationCode        Common.Unknown      `json:"nation_code"`
		Nmi               valueTypes.String   `json:"nmi"`
		OperateYear       Common.Unknown      `json:"operate_year"`
		OperationBusName  Common.Unknown      `json:"operationbusname" PointId:"operation_bus_name"`
		OrgIndexCode      Common.Unknown      `json:"org_index_code"`
		OrgIndexCodeName  valueTypes.String   `json:"org_index_code_name"`
		OrganizationId    Common.Unknown      `json:"organization_id"`
		OrganizationName  Common.Unknown      `json:"organization_name"`
		PanoramaLevel     Common.Unknown      `json:"panorama_level"`
		Producer          Common.Unknown      `json:"producer"`
		Prov              Common.Unknown      `json:"prov"`
		ProvCode          Common.Unknown      `json:"prov_code"`
		PsBuildDate       valueTypes.DateTime `json:"ps_build_date" PointNameDateFormat:"DateTimeLayout"`
		PsCountryId       valueTypes.Integer  `json:"ps_country_id"`
		PsCode            valueTypes.String   `json:"pscode" PointId:"ps_code"`
		PsDesc            Common.Unknown      `json:"psdesc" PointId:"ps_desc"`
		PsGuid            valueTypes.String   `json:"psguid" PointId:"ps_guid"`
		PsHolder          valueTypes.String   `json:"psholder" PointId:"ps_holder"`
		PsLocation        valueTypes.String   `json:"pslocation" PointId:"remind_type"`
		PsName            valueTypes.String   `json:"psname" PointId:"remind_type"`
		PsNameEnus        Common.Unknown      `json:"psnameenus" PointId:"ps_name_enus"`
		PsOrgId           Common.Unknown      `json:"psorgid" PointId:"ps_org_id"`
		PsOrgName         Common.Unknown      `json:"psorgname" PointId:"ps_org_name"`
		SafeStartDate     valueTypes.DateTime `json:"safe_start_date" PointNameDateFormat:"DateTimeLayout"`
		SchedulingType    valueTypes.Integer  `json:"schedulingtype" PointId:"scheduling_type"`
		Shortname         valueTypes.String   `json:"shortname"`
		Sn                valueTypes.String   `json:"sn"`
		Street            Common.Unknown      `json:"street"`
		SysScheme         valueTypes.Integer  `json:"sysscheme" PointId:"sys_scheme"`
		Timezone          valueTypes.Integer  `json:"timezone"`
		TownCode          Common.Unknown      `json:"town_code"`
		UploadProtocol    valueTypes.Integer  `json:"uploadprotocol" PointId:"upload_protocol"`
		UserAccount       valueTypes.String   `json:"user_account"`
		ValidFlag         valueTypes.Bool     `json:"validflag" PointId:"valid_flag"`
		VideoPath         Common.Unknown      `json:"videopath" PointId:"video_path"`
		VillageCode       Common.Unknown      `json:"village_code"`
		WgsLatitude       valueTypes.Float    `json:"wgs_latitude"`
		WgsLongitude      valueTypes.Float    `json:"wgs_longitude"`
	} `json:"psMap" PointId:"ps_map"`

	SnInfoList []struct {
		PsId         valueTypes.PsId     `json:"ps_id"`
		Sn           valueTypes.String   `json:"sn"`
		Id           valueTypes.Integer  `json:"id"`
		ChannelDesc  Common.Unknown      `json:"chnnl_desc" PointId:"channel_description"`
		ChannelId    valueTypes.Integer  `json:"chnnl_id" PointId:"channel_id"`
		ChannelName  valueTypes.String   `json:"chnnl_name" PointId:"channel_name"`
		CrtDate      valueTypes.DateTime `json:"crt_date" PointId:"create_date" PointNameDateFormat:"DateTimeLayout"`
		CrtUserName  Common.Unknown      `json:"crt_user_name" PointId:"create_username"`
		DataFlag     valueTypes.Integer  `json:"data_flag"`
		FlagServer   Common.Unknown      `json:"flag_server"`
		HostIP       Common.Unknown      `json:"host_ip"`
		IsEnable     valueTypes.Bool     `json:"is_enable"`
		ProtocolType Common.Unknown      `json:"protocol_type"`
		PsGUID       Common.Unknown      `json:"ps_guid"`
		Secret       valueTypes.String   `json:"secrit" PointId:"secret"`
		TcpMode      Common.Unknown      `json:"tcp_mode"`
		TcpPort      Common.Unknown      `json:"tcp_port"`
	} `json:"snInfoList" PointId:"sn_info"`
}

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