Documentation ¶
Overview ¶
Package queryDeviceList - 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 DataEntry
- 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) GetError() error
- func (e EndPoint) GetJsonData(raw bool) output.Json
- func (e EndPoint) GetName() api.EndPointName
- 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 EntryMap
- type PointData
- type PointStruct
- type Request
- type RequestData
- type Response
- type ResultData
Constants ¶
const Disabled = false
const Url = "/v1/devService/queryDeviceList"
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) 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) 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 PointData ¶
type PointData []PointStruct
type PointStruct ¶
type PointStruct struct { CodeID int64 `json:"code_id"` CodeIDOrderID string `json:"code_id_order_id"` CodeName string `json:"code_name"` DevPointLastUpdateTime string `json:"dev_point_last_update_time"` IsPlatformDefaultUnit int64 `json:"is_platform_default_unit"` IsShow int64 `json:"is_show"` OrderID int64 `json:"order_id"` OrderNum int64 `json:"order_num"` PointGroupID int64 `json:"point_group_id"` PointGroupIDOrderID string `json:"point_group_id_order_id"` PointGroupName string `json:"point_group_name"` PointID int64 `json:"point_id"` PointName string `json:"point_name"` PointSign string `json:"point_sign"` Relate int64 `json:"relate"` TimeStamp string `json:"time_stamp"` Unit string `json:"unit"` ValIsFixd string `json:"val_is_fixd"` ValidSize int64 `json:"valid_size"` Value string `json:"value"` ValueDescription string `json:"value_description"` }
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 { DevCountByStatusMap struct { FaultCount int64 `json:"fault_count" PointId:"fault_count" PointType:""` OfflineCount int64 `json:"offline_count" PointId:"offline_count" PointType:""` RunCount int64 `json:"run_count" PointId:"run_count" PointType:""` WarningCount int64 `json:"warning_count" PointId:"warning_count" PointType:""` } `json:"dev_count_by_status_map"` DevCountByTypeMap struct { One4 int64 `json:"14"` Two2 int64 `json:"22"` } `json:"dev_count_by_type_map"` DevTypeDefinition struct { One string `json:"1"` One0 string `json:"10"` One1 string `json:"11"` One2 string `json:"12"` One3 string `json:"13"` One4 string `json:"14"` One5 string `json:"15"` One6 string `json:"16"` One7 string `json:"17"` One8 string `json:"18"` One9 string `json:"19"` Two0 string `json:"20"` Two1 string `json:"21"` Two2 string `json:"22"` Two3 string `json:"23"` Two4 string `json:"24"` Two5 string `json:"25"` Two6 string `json:"26"` Two8 string `json:"28"` Two9 string `json:"29"` Three string `json:"3"` Three0 string `json:"30"` Three1 string `json:"31"` Three2 string `json:"32"` Three3 string `json:"33"` Three4 string `json:"34"` Three5 string `json:"35"` Three6 string `json:"36"` Three7 string `json:"37"` Three8 string `json:"38"` Three9 string `json:"39"` Four string `json:"4"` Four0 string `json:"40"` Four1 string `json:"41"` Four2 string `json:"42"` Four3 string `json:"43"` Four4 string `json:"44"` Four5 string `json:"45"` Four6 string `json:"46"` Four7 string `json:"47"` Four8 string `json:"48"` Five string `json:"5"` Five0 string `json:"50"` Six string `json:"6"` Seven string `json:"7"` Eight string `json:"8"` Nine string `json:"9"` Nine9 string `json:"99"` } `json:"dev_type_definition"` PageList []struct { AlarmCount int64 `json:"alarm_count" PointId:"alarm_count" PointType:""` ChnnlID int64 `json:"chnnl_id" PointId:"channel_id" PointType:""` CommandStatus int64 `json:"command_status" PointId:"command_status" PointType:""` ComponentAmount int64 `json:"component_amount" PointId:"component_amount" PointType:""` DataFlag int64 `json:"data_flag" PointId:"data_flag" PointType:""` DataFlagDetail int64 `json:"data_flag_detail" PointId:"data_flag_detail" PointType:""` DeviceArea string `json:"device_area" PointId:"device_area" PointType:""` DeviceAreaName string `json:"device_area_name" PointId:"device_area_name" PointType:""` DeviceCode int64 `json:"device_code" PointId:"device_code" PointType:""` DeviceID int64 `json:"device_id" PointId:"device_id" PointType:""` DeviceModelCode string `json:"device_model_code" PointId:"device_model_code" PointType:""` DeviceModelID string `json:"device_model_id" PointId:"device_model_id" PointType:""` DeviceName string `json:"device_name" PointId:"device_name" PointType:""` DeviceStatus int64 `json:"device_status" PointId:"device_status" PointType:""` DeviceType int64 `json:"device_type" PointId:"device_type" PointType:""` FaultCount int64 `json:"fault_count" PointId:"fault_count" PointType:""` FaultStatus string `json:"fault_status" PointId:"fault_status" PointType:""` FunctionEnum string `json:"function_enum" PointId:"function_enum" PointType:""` InstallerAlarmCount int64 `json:"installer_alarm_count" PointId:"installer_alarm_count" PointType:""` InstallerDevFaultStatus int64 `json:"installer_dev_fault_status" PointId:"installer_dev_fault_status" PointType:""` InstallerFaultCount int64 `json:"installer_fault_count" PointId:"installer_fault_count" PointType:""` InverterModelType int64 `json:"inverter_model_type" PointId:"inverter_model_type" PointType:""` IsDeveloper string `json:"is_developer" PointId:"is_developer" PointType:""` IsG2point5Module int64 `json:"is_g2point5_module" PointId:"is_g2point5_module" PointType:""` IsInit int64 `json:"is_init" PointId:"is_init" PointType:""` IsSecond int64 `json:"is_second" PointId:"is_second" PointType:""` IsSupportParamset int64 `json:"is_support_paramset" PointId:"is_support_paramset" PointType:""` NodeTimestamps interface{} `json:"node_timestamps" PointId:"node_timestamps" PointType:""` OwnerAlarmCount int64 `json:"owner_alarm_count" PointId:"owner_alarm_count" PointType:""` OwnerDevFaultStatus int64 `json:"owner_dev_fault_status" PointId:"owner_dev_fault_status" PointType:""` OwnerFaultCount int64 `json:"owner_fault_count" PointId:"owner_fault_count" PointType:""` PointData PointData `json:"point_data"` Points interface{} `json:"points" PointId:"points" PointType:""` PsTimezoneInfo struct { IsDst string `json:"is_dst"` TimeZone string `json:"time_zone"` } `json:"psTimezoneInfo"` PsID int64 `json:"ps_id" PointId:"ps_id" PointType:""` PsKey string `json:"ps_key" PointId:"ps_key" PointType:""` RelState int64 `json:"rel_state" PointId:"rel_state" PointType:""` Sn string `json:"sn" PointId:"sn" PointType:""` StringAmount int64 `json:"string_amount" PointId:"string_amount" PointType:""` TypeName string `json:"type_name" PointId:"type_name" PointType:""` UnitName interface{} `json:"unit_name" PointId:"unit_name" PointType:""` UUID string `json:"uuid" PointId:"uuid" PointType:""` UUIDIndexCode string `json:"uuid_index_code" PointId:"uuid_index_code" PointType:""` } `json:"pageList"` RowCount int64 `json:"rowCount"` }
func AssertResultData ¶
func AssertResultData(e api.EndPoint) ResultData
AssertResultData - Used to obtain locally scoped ResultData methods, (not visible from api.EndPoint).
func (*ResultData) GetDataByName ¶
func (e *ResultData) GetDataByName(name string) PointData
func (*ResultData) IsValid ¶
func (e *ResultData) IsValid() error