Documentation ¶
Overview ¶
Package getPowerStationForHousehold - 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) GetEndPointData() api.DataMap
- func (e EndPoint) GetEndPointDataTables() output.Tables
- func (e EndPoint) GetEndPointResultTable() output.Table
- func (e EndPoint) GetError() error
- func (e EndPoint) GetJsonData(raw bool) output.Json
- func (e EndPoint) GetName() api.EndPointName
- func (e EndPoint) GetRequest() Request
- func (e EndPoint) GetRequestArgNames() map[string]string
- 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) IsDebug() bool
- 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) ResultDataRef() ResultData
- func (e EndPoint) SetCacheTimeout(duration time.Duration) api.EndPoint
- func (e EndPoint) SetError(format string, a ...interface{}) api.EndPoint
- func (e EndPoint) SetFilenamePrefix(format string, args ...interface{}) string
- 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 EndPointName = "AppService.getPowerStationForHousehold"
const Url = "/v1/powerStationService/getPowerStationForHousehold"
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) GetEndPointData ¶
func (EndPoint) GetEndPointDataTables ¶
func (EndPoint) GetEndPointResultTable ¶
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) GetRequest ¶
GetRequest - Get the Request structure as scoped by this endpoint.
func (EndPoint) GetRequestArgNames ¶
GetRequestArgNames -
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) ResultDataRef ¶
func (e EndPoint) ResultDataRef() ResultData
ResultDataRef - Return the locally scoped ResultData structure.
func (EndPoint) SetCacheTimeout ¶
SetCacheTimeout - Set the cache timeout for this EndPoint. (Defaults to 1 hour.)
func (EndPoint) SetFilenamePrefix ¶
SetFilenamePrefix - Produce filename based on area and endpoint name.
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 valueTypes.PsId `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" PointIdReplace:"true"` }
Response - Holds the api.ResponseCommon and endpoint specific ResultData structures. See data.go for response fields.
type ResultData ¶
type ResultData struct { Images Common.PowerStationImages `json:"images" PointArrayFlatten:"false"` PsDirectOrgList Common.PsDirectOrgList `json:"ps_direct_org_list" PointArrayFlatten:"false"` PsOrgInfo Common.PsOrgInfo `json:"ps_org_info" PointArrayFlatten:"false"` SelectedOrgList Common.SelectedOrgList `json:"selectedOrgList" PointId:"selected_org_list" PointArrayFlatten:"false"` SnDetailList Common.SnDetailList `json:"sn_detail_list" PointArrayFlatten:"false"` LbsAreaCode valueTypes.String `json:"LbsAreaCode" PointId:"lbs_area_code"` LbsCountry valueTypes.String `json:"LbsCountry" PointId:"lbs_country"` AccessType interface{} `json:"access_type"` AreaId interface{} `json:"area_id"` ArrearsStatus valueTypes.Integer `json:"arrears_status"` BatteryType valueTypes.Integer `json:"battery_type"` CityCode valueTypes.String `json:"city_code"` CityName valueTypes.String `json:"city_name"` ComponentArea interface{} `json:"component_area"` ComponentStatus valueTypes.Integer `json:"component_status"` ConnectType valueTypes.Integer `json:"connect_type"` ConnectTypeDesc valueTypes.String `json:"connect_type_desc"` ContactName valueTypes.String `json:"contact_name"` CountryId valueTypes.Integer `json:"country_id"` Description valueTypes.String `json:"description"` DesignCapacity valueTypes.Float `json:"design_capacity" PointUnit:"W"` // @TODO - When this is set to valueTypes.Integer, we get a failure. DesignCapacityBattery valueTypes.Float `json:"design_capacity_battery" PointUnit:"W"` DistrictCode valueTypes.String `json:"district_code"` DistrictName valueTypes.String `json:"district_name"` DivisionCode valueTypes.String `json:"division_code"` Email valueTypes.String `json:"email"` EnergyScheme interface{} `json:"energy_scheme"` ExpectInstallDate valueTypes.DateTime `json:"expect_install_date" PointNameDateFormat:"DateTimeLayout"` GcjLatitude valueTypes.Float `json:"gcj_latitude"` GcjLongitude valueTypes.Float `json:"gcj_longitude"` GprsLatitude valueTypes.Float `json:"gprs_latitude"` GprsLongitude valueTypes.Float `json:"gprs_longitude"` GridLevel interface{} `json:"grid_level"` InstallDate valueTypes.DateTime `json:"install_date" PointNameDateFormat:"DateTimeLayout"` InstallDateZone valueTypes.DateTime `json:"install_date_zone" PointNameDateFormat:"DateTimeLayout"` InverterCount valueTypes.Integer `json:"inverter_count"` InvestmentType valueTypes.Integer `json:"investment_type"` InvestmentTypeDesc valueTypes.String `json:"investment_type_desc"` IsAgreeGdpr valueTypes.Bool `json:"is_agree_gdpr"` IsGdpr valueTypes.Bool `json:"is_gdpr"` IsNewVersion valueTypes.Bool `json:"is_new_version"` IsOpenProtocol valueTypes.Bool `json:"is_open_protocol"` IsPsCreateUser valueTypes.Bool `json:"is_ps_create_user"` IsPsOwner valueTypes.Bool `json:"is_ps_owner"` IsReceiveNotice valueTypes.Bool `json:"is_receive_notice"` IsValidMobileEmail valueTypes.Bool `json:"is_valid_mobile_email"` Latitude valueTypes.Float `json:"latitude"` Longitude valueTypes.Float `json:"longitude"` MapLatitude valueTypes.Float `json:"map_latitude"` MapLongitude valueTypes.Float `json:"map_longitude"` MlpeFlag valueTypes.Bool `json:"mlpe_flag"` MobileTel valueTypes.String `json:"moble_tel" PointId:"mobile_tel"` MobileTelBak valueTypes.String `json:"moble_tel_bak" PointId:"mobile_tel_bak"` ModuleModelId interface{} `json:"module_model_id"` ModuleModelName valueTypes.String `json:"module_model_name"` Nmi valueTypes.String `json:"nmi"` OperationBusName valueTypes.String `json:"operation_bus_name"` OrgIndexCode []valueTypes.String `json:"org_index_code"` OwnerContact valueTypes.String `json:"owner_contact"` ParamIncomeUnit valueTypes.Integer `json:"param_income_unit"` ParamIncomeUnitName valueTypes.String `json:"param_income_unit_name"` ProvinceCode valueTypes.String `json:"province_code"` ProvinceName valueTypes.String `json:"province_name"` PsBuildDate valueTypes.DateTime `json:"ps_build_date" PointNameDateFormat:"DateTimeLayout"` PsCountryId valueTypes.Integer `json:"ps_country_id"` PsCreateUserId valueTypes.Integer `json:"ps_create_user_id"` PsCurrentTimeZone valueTypes.String `json:"ps_current_time_zone"` PsHolder valueTypes.String `json:"ps_holder"` PsId valueTypes.PsId `json:"ps_id"` PsInstalledPower valueTypes.Float `json:"ps_installed_power" PointUnit:"W"` PsKey valueTypes.PsKey `json:"ps_key"` PsLocation valueTypes.String `json:"ps_location"` PsName valueTypes.String `json:"ps_name"` PsPrice valueTypes.Float `json:"ps_price" PointUnitFrom:"ParamIncomeUnitName"` PsPriceKwh valueTypes.Float `json:"ps_price_kwh" PointUnitFrom:"ParamIncomeUnitName"` PsType valueTypes.Integer `json:"ps_type"` PsTypeDesc valueTypes.String `json:"ps_type_desc"` PsTypeName valueTypes.String `json:"ps_type_name"` PsUserId valueTypes.Integer `json:"ps_user_id"` RecordCreateTime valueTypes.DateTime `json:"recore_create_time" PointId:"record_create_time" PointNameDateFormat:"DateTimeLayout"` SafeStartDate valueTypes.DateTime `json:"safe_start_date" PointNameDateFormat:"DateTimeLayout"` SetUserOrg valueTypes.Integer `json:"set_user_org"` ShippingAddress valueTypes.String `json:"shipping_address"` ShippingZipCode valueTypes.String `json:"shipping_zip_code"` Sn valueTypes.String `json:"sn" PointName:"Serial Number"` SummerTimeState valueTypes.Bool `json:"summer_time_state"` SummerTimeZone valueTypes.String `json:"summer_time_zone"` SummerTimeZoneId valueTypes.Integer `json:"summer_time_zone_id"` TimeZoneId valueTypes.Integer `json:"time_zone_id"` Timezone valueTypes.String `json:"timezone"` UserAccount valueTypes.String `json:"user_account"` UserCapacityStatus valueTypes.Integer `json:"user_capacity_status"` UserEnglishName valueTypes.String `json:"user_english_name"` UserLanguage valueTypes.String `json:"user_language"` UserMobileTel valueTypes.String `json:"user_moble_tel" PointId:"user_mobile_tel"` UserName valueTypes.String `json:"user_name"` UserTelNationCode valueTypes.String `json:"user_tel_nation_code"` ValidFlag valueTypes.Bool `json:"valid_flag"` WgsLatitude valueTypes.Float `json:"wgs_latitude"` WgsLongitude valueTypes.Float `json:"wgs_longitude"` ZipCode valueTypes.String `json:"zip_code"` }
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