queryDeviceList

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: 9 Imported by: 0

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

View Source
const Disabled = false
View Source
const Url = "/v1/devService/queryDeviceList"

Variables

This section is empty.

Functions

This section is empty.

Types

type DataEntry

type DataEntry api.DataEntry

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

type EntryMap api.DataMap

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

Jump to

Keyboard shortcuts

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