nodeinterface

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// *** UnitType ***
	FuncUnitTypeList       = "unit_type_list"
	FuncUnitTypeCategories = "unit_type_categories"
	FuncUnitTypeConfigMeta = "unit_type_config_meta"

	// *** Unit ***
	FuncUnitAdd         = "unit_add"
	FuncUnitRemove      = "unit_remove"
	FuncUnitState       = "unit_state"
	FuncUnitStateAll    = "unit_state_all"
	FuncUnitItemsValues = "unit_items_values"
	FuncUnitList        = "unit_list"
	FuncUnitStart       = "unit_start"
	FuncUnitStop        = "unit_stop"
	FuncUnitSetConfig   = "unit_set_config"
	FuncUnitGetConfig   = "unit_get_config"

	// *** Data Item ***
	FuncDataItemList         = "data_item_list"
	FuncDataItemListAll      = "data_item_list_all"
	FuncDataItemWrite        = "data_item_write"
	FuncDataItemHistory      = "data_item_history"
	FuncDataItemHistoryChart = "data_item_history_chart"
	FuncDataItemRemove       = "data_item_remove"

	// *** Cloud ***
	FuncCloudLogin            = "cloud_login"
	FuncCloudLogout           = "cloud_logout"
	FuncCloudState            = "cloud_state"
	FuncCloudNodes            = "cloud_nodes"
	FuncCloudAddNode          = "cloud_add_node"
	FuncCloudUpdateNode       = "cloud_update_node"
	FuncCloudRemoveNode       = "cloud_remove_node"
	FuncCloudGetSettings      = "cloud_get_settings"
	FuncCloudSetSettings      = "cloud_set_settings"
	FuncCloudAccountInfo      = "cloud_account_info"
	FuncCloudSetCurrentNodeId = "cloud_set_current_node_id"

	// *** Public Channel ***
	FuncPublicChannelList       = "public_channel_list"
	FuncPublicChannelAdd        = "public_channel_add"
	FuncPublicChannelSetName    = "public_channel_set_name"
	FuncPublicChannelRemove     = "public_channel_remove"
	FuncPublicChannelItemAdd    = "public_channel_item_add"
	FuncPublicChannelItemRemove = "public_channel_item_remove"
	FuncPublicChannelItemsState = "public_channel_item_state"
	FuncPublicChannelStart      = "public_channel_start"
	FuncPublicChannelStop       = "public_channel_stop"

	// *** Service ***
	FuncServiceLookup     = "service_lookup"
	FuncServiceStatistics = "service_statistics"
	FuncServiceApi        = "service_api"

	// *** Resource ***
	FuncResourceAdd    = "resource_add"
	FuncResourceSet    = "resource_set"
	FuncResourceGet    = "resource_get"
	FuncResourceRemove = "resource_remove"
	FuncResourceRename = "resource_rename"
	FuncResourceList   = "resource_list"

	// *** User ***
	FuncSessionOpen     = "session_open"
	FuncSessionActivate = "session_activate"
	FuncSessionRemove   = "session_remove"
	FuncSessionList     = "session_list"

	FuncUserList        = "user_list"
	FuncUserAdd         = "user_add"
	FuncUserSetPassword = "user_set_password"
	FuncUserRemove      = "user_remove"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudAccountInfoRequest added in v1.0.6

type CloudAccountInfoRequest struct {
}

type CloudAccountInfoResponse added in v1.0.6

type CloudAccountInfoResponse struct {
	Email         string `json:"email"`
	MaxNodesCount int64  `json:"max_nodes_count"`
}

type CloudAddNodeRequest added in v1.0.6

type CloudAddNodeRequest struct {
	Name string `json:"name"`
}

type CloudAddNodeResponse added in v1.0.6

type CloudAddNodeResponse struct {
	NodeId string `json:"node_id"`
}

type CloudGetSettingsRequest added in v1.0.6

type CloudGetSettingsRequest struct {
}

type CloudGetSettingsResponse added in v1.0.6

type CloudGetSettingsResponse struct {
	AllowWriteItem bool `json:"allow_write_item"`
}

type CloudLoginRequest added in v1.0.6

type CloudLoginRequest struct {
	UserName string `json:"user_name"`
	Password string `json:"password"`
}

type CloudLoginResponse added in v1.0.6

type CloudLoginResponse struct {
}

type CloudLogoutRequest added in v1.0.6

type CloudLogoutRequest struct {
}

type CloudLogoutResponse added in v1.0.6

type CloudLogoutResponse struct {
}

type CloudNodesRequest added in v1.0.6

type CloudNodesRequest struct {
}

type CloudNodesResponse added in v1.0.6

type CloudNodesResponse struct {
	Nodes []CloudNodesResponseItem `json:"nodes"`
}

type CloudNodesResponseItem added in v1.0.6

type CloudNodesResponseItem struct {
	NodeId string
	Name   string
}

type CloudRemoveNodeRequest added in v1.0.6

type CloudRemoveNodeRequest struct {
	NodeId string `json:"node_id"`
}

type CloudRemoveNodeResponse added in v1.0.6

type CloudRemoveNodeResponse struct {
}

type CloudSetCurrentNodeIdRequest added in v1.0.6

type CloudSetCurrentNodeIdRequest struct {
	NodeId string `json:"node_id"`
}

type CloudSetCurrentNodeIdResponse added in v1.0.6

type CloudSetCurrentNodeIdResponse struct {
}

type CloudSetSettingsRequest added in v1.0.6

type CloudSetSettingsRequest struct {
	NodeId         string `json:"node_id"`
	AllowWriteItem bool   `json:"allow_write_item"`
}

type CloudSetSettingsResponse added in v1.0.6

type CloudSetSettingsResponse struct {
}

type CloudStateRequest added in v1.0.6

type CloudStateRequest struct {
}

type CloudStateResponse added in v1.0.6

type CloudStateResponse struct {
	UserName         string `json:"user_name"`
	NodeId           string `json:"node_id"`
	Connected        bool   `json:"connected"`
	LoggedIn         bool   `json:"logged_in"`
	LoginStatus      string `json:"login_status"`
	ConnectionStatus string `json:"connection_status"`
	IAmStatus        string `json:"i_am_status"`
	CurrentRepeater  string `json:"current_repeater"`
	Counters         []CloudStateResponseItem
}

type CloudStateResponseItem added in v1.0.6

type CloudStateResponseItem struct {
	Name  string `json:"name"`
	Value int64  `json:"value"`
}

type CloudUpdateNodeRequest added in v1.0.6

type CloudUpdateNodeRequest struct {
	NodeId string `json:"node_id"`
	Name   string `json:"name"`
}

type CloudUpdateNodeResponse added in v1.0.6

type CloudUpdateNodeResponse struct {
}

type DataItemHistoryChartRequest added in v1.0.6

type DataItemHistoryChartRequest struct {
	Name           string `json:"name"`
	DTBegin        int64  `json:"dt_begin"`
	DTEnd          int64  `json:"dt_end"`
	GroupTimeRange int64  `json:"group_time_range"`
	OutFormat      string `json:"out_format"`
}

type DataItemHistoryChartResponse added in v1.0.6

type DataItemHistoryChartResponse struct {
	Items []*DataItemHistoryChartResponseItem `json:"items"`
}

type DataItemHistoryChartResponseItem added in v1.0.6

type DataItemHistoryChartResponseItem struct {
	DatetimeFirst int64   `json:"tf"`
	DatetimeLast  int64   `json:"tl"`
	FirstValue    float64 `json:"vf"`
	LastValue     float64 `json:"vl"`
	MinValue      float64 `json:"vd"`
	MaxValue      float64 `json:"vu"`
	AvgValue      float64 `json:"va"`
	CountOfValues int     `json:"c"`
	Qualities     []int64
	HasGood       bool   `json:"has_good"`
	HasBad        bool   `json:"has_bad"`
	UOM           string `json:"uom"`
}

type DataItemHistoryRequest

type DataItemHistoryRequest struct {
	Name    string `json:"name"`
	DTBegin int64  `json:"dt_begin"`
	DTEnd   int64  `json:"dt_end"`
}

type DataItemHistoryResponse

type DataItemHistoryResponse struct {
	History *history.ReadResult `json:"history"`
}

type DataItemListAllRequest

type DataItemListAllRequest struct {
}

type DataItemListAllResponse

type DataItemListAllResponse struct {
	Items []common_interfaces.ItemGetUnitItems `json:"items"`
}

type DataItemListRequest

type DataItemListRequest struct {
	Items []string `json:"items"`
}

type DataItemListResponse

type DataItemListResponse struct {
	Items []common_interfaces.ItemGetUnitItems `json:"items"`
}

type DataItemRemoveRequest added in v1.0.6

type DataItemRemoveRequest struct {
	Items []string `json:"items"`
}

type DataItemRemoveResponse added in v1.0.6

type DataItemRemoveResponse struct {
}

type DataItemWriteRequest

type DataItemWriteRequest struct {
	ItemName string `json:"item_name"`
	Value    string `json:"value"`
}

type DataItemWriteResponse

type DataItemWriteResponse struct {
}

type PublicChannelAddRequest

type PublicChannelAddRequest struct {
	ChannelName string `json:"name"`
}

type PublicChannelAddResponse

type PublicChannelAddResponse struct {
}

type PublicChannelItemAddRequest

type PublicChannelItemAddRequest struct {
	Channels []string `json:"ids"`
	Items    []string `json:"items"`
}

type PublicChannelItemAddResponse

type PublicChannelItemAddResponse struct {
}

type PublicChannelItemRemoveRequest

type PublicChannelItemRemoveRequest struct {
	Channels []string `json:"ids"`
	Items    []string `json:"items"`
}

type PublicChannelItemRemoveResponse

type PublicChannelItemRemoveResponse struct {
}

type PublicChannelItemsStateRequest

type PublicChannelItemsStateRequest struct {
	ChannelId string `json:"id"`
}

type PublicChannelItemsStateResponse

type PublicChannelItemsStateResponse struct {
	UnitValues []common_interfaces.Item `json:"items"`
}

type PublicChannelListRequest

type PublicChannelListRequest struct {
}

type PublicChannelListResponse

type PublicChannelListResponse struct {
	Channels []public_channel.ChannelInfo `json:"channels"`
}

type PublicChannelRemoveRequest

type PublicChannelRemoveRequest struct {
	ChannelId string `json:"id"`
}

type PublicChannelRemoveResponse

type PublicChannelRemoveResponse struct {
}

type PublicChannelSetNameRequest

type PublicChannelSetNameRequest struct {
	ChannelId   string `json:"id"`
	ChannelName string `json:"name"`
}

type PublicChannelSetNameResponse

type PublicChannelSetNameResponse struct {
}

type PublicChannelStartRequest added in v1.0.6

type PublicChannelStartRequest struct {
	Ids []string `json:"ids"`
}

type PublicChannelStartResponse added in v1.0.6

type PublicChannelStartResponse struct {
}

type PublicChannelStopRequest added in v1.0.6

type PublicChannelStopRequest struct {
	Ids []string `json:"ids"`
}

type PublicChannelStopResponse added in v1.0.6

type PublicChannelStopResponse struct {
}

type ResourceAddRequest

type ResourceAddRequest struct {
	Name    string `json:"name"`
	Type    string `json:"type"`
	Content []byte `json:"content"`
}

type ResourceAddResponse

type ResourceAddResponse struct {
	Id string `json:"id"`
}

type ResourceGetRequest

type ResourceGetRequest struct {
	Id string `json:"id"`
}

type ResourceGetResponse

type ResourceGetResponse struct {
	Item *common_interfaces.ResourcesItem `json:"item"`
}

type ResourceListRequest

type ResourceListRequest struct {
	Type     string `json:"type"`
	Filter   string `json:"filter"`
	Offset   int    `json:"offset"`
	MaxCount int    `json:"max_count"`
}

type ResourceListResponse

type ResourceListResponse struct {
	Items common_interfaces.ResourcesInfo `json:"items"`
}

type ResourceRemoveRequest

type ResourceRemoveRequest struct {
	Id string `json:"id"`
}

type ResourceRemoveResponse

type ResourceRemoveResponse struct {
}

type ResourceRenameRequest

type ResourceRenameRequest struct {
	Id   string `json:"id"`
	Name string `json:"name"`
}

type ResourceRenameResponse

type ResourceRenameResponse struct {
}

type ResourceSetRequest

type ResourceSetRequest struct {
	Id        string `json:"id"`
	Thumbnail []byte `json:"thumbnail"`
	Content   []byte `json:"content"`
}

type ResourceSetResponse

type ResourceSetResponse struct {
}

type ServiceApiRequest added in v1.0.5

type ServiceApiRequest struct {
}

type ServiceApiResponse added in v1.0.5

type ServiceApiResponse struct {
	Product            string   `json:"product"`
	Version            string   `json:"version"`
	BuildTime          string   `json:"build_time"`
	SupportedFunctions []string `json:"supported_functions"`
}

type ServiceLookupRequest

type ServiceLookupRequest struct {
	Entity     string `json:"entity"`
	Parameters string `json:"parameters"`
}

type ServiceLookupResponse

type ServiceLookupResponse struct {
	Result lookup.Result `json:"result"`
}

type ServiceStatisticsRequest

type ServiceStatisticsRequest struct {
}

type ServiceStatisticsResponse

type ServiceStatisticsResponse struct {
	Stat common_interfaces.Statistics `json:"stat"`
}

type SessionActivateRequest added in v1.0.1

type SessionActivateRequest struct {
	SessionToken string `json:"session_token"`
}

type SessionActivateResponse added in v1.0.1

type SessionActivateResponse struct {
	SessionToken string `json:"session_token"`
}

type SessionListRequest added in v1.0.1

type SessionListRequest struct {
	UserName string `json:"user_name"`
}

type SessionListResponse added in v1.0.1

type SessionListResponse struct {
	Items []SessionListResponseItem `json:"items"`
}

type SessionListResponseItem added in v1.0.1

type SessionListResponseItem struct {
	SessionToken    string `json:"session_token"`
	UserName        string `json:"user_name"`
	SessionOpenTime int64  `json:"session_open_time"`
}

type SessionOpenRequest

type SessionOpenRequest struct {
	UserName string `json:"user_name"`
	Password string `json:"password"`
}

type SessionOpenResponse

type SessionOpenResponse struct {
	SessionToken string `json:"session_token"`
}

type SessionRemoveRequest added in v1.0.1

type SessionRemoveRequest struct {
	SessionToken string `json:"session_token"`
}

type SessionRemoveResponse added in v1.0.1

type SessionRemoveResponse struct {
}

type UnitAddRequest

type UnitAddRequest struct {
	UnitType string `json:"type"`
	UnitName string `json:"name"`
	Config   string `json:"config"`
}

type UnitAddResponse

type UnitAddResponse struct {
	UnitId string `json:"id"`
}

type UnitGetConfigRequest

type UnitGetConfigRequest struct {
	UnitId string `json:"id"`
}

type UnitGetConfigResponse

type UnitGetConfigResponse struct {
	UnitId         string `json:"id"`
	UnitName       string `json:"name"`
	UnitType       string `json:"type"`
	UnitConfig     string `json:"config"`
	UnitConfigMeta string `json:"config_meta"`
}

type UnitItemsValuesRequest

type UnitItemsValuesRequest struct {
	UnitName string `json:"name"`
}

type UnitItemsValuesResponse

type UnitItemsValuesResponse struct {
	Items []common_interfaces.ItemGetUnitItems `json:"items"`
}

type UnitListRequest

type UnitListRequest struct {
}

type UnitListResponse

type UnitListResponse struct {
	Items []UnitListResponseItem `json:"items"`
}

type UnitListResponseItem

type UnitListResponseItem struct {
	Id             string `json:"id"`
	Name           string `json:"name"`
	Type           string `json:"type"`
	TypeForDisplay string `json:"type_for_display"`
	Config         string `json:"config"`
	Enable         bool   `json:"enable"`
}

type UnitRemoveRequest

type UnitRemoveRequest struct {
	Units []string `json:"ids"`
}

type UnitRemoveResponse

type UnitRemoveResponse struct {
}

type UnitSetConfigRequest

type UnitSetConfigRequest struct {
	UnitId     string `json:"id"`
	UnitName   string `json:"name"`
	UnitConfig string `json:"config"`
}

type UnitSetConfigResponse

type UnitSetConfigResponse struct {
}

type UnitStartRequest

type UnitStartRequest struct {
	Ids []string `json:"ids"`
}

type UnitStartResponse

type UnitStartResponse struct {
}

type UnitStateAllRequest added in v1.0.6

type UnitStateAllRequest struct {
}

type UnitStateAllResponse added in v1.0.6

type UnitStateAllResponse struct {
	Items []UnitStateAllResponseItem `json:"items"`
}

type UnitStateAllResponseItem added in v1.0.6

type UnitStateAllResponseItem struct {
	UnitId   string `json:"id"`
	UnitName string `json:"name"`
	Status   string `json:"status"`
	MainItem string `json:"main_item"`
	Value    string `json:"value"`
	UOM      string `json:"uom"`
}

type UnitStateRequest

type UnitStateRequest struct {
	UnitId string `json:"id"`
}

type UnitStateResponse

type UnitStateResponse struct {
	UnitId   string `json:"id"`
	UnitName string `json:"name"`
	Status   string `json:"status"`
	MainItem string `json:"main_item"`
	Value    string `json:"value"`
	UOM      string `json:"uom"`
}

type UnitStopRequest

type UnitStopRequest struct {
	Ids []string `json:"ids"`
}

type UnitStopResponse

type UnitStopResponse struct {
}

type UnitTypeCategoriesRequest

type UnitTypeCategoriesRequest struct {
}

type UnitTypeCategoriesResponse

type UnitTypeCategoriesResponse struct {
	Items []UnitTypeCategoriesResponseItem `json:"items"`
}

type UnitTypeCategoriesResponseItem

type UnitTypeCategoriesResponseItem struct {
	Name        string `json:"name"`
	DisplayName string `json:"display_name"`
	Image       []byte `json:"image"`
}

type UnitTypeConfigMetaRequest

type UnitTypeConfigMetaRequest struct {
	UnitType string `json:"type"`
}

type UnitTypeConfigMetaResponse

type UnitTypeConfigMetaResponse struct {
	UnitType           string `json:"type"`
	UnitTypeConfigMeta string `json:"config_meta"`
}

type UnitTypeListRequest

type UnitTypeListRequest struct {
	Category string `json:"category"`
	Filter   string `json:"filter"`
	Offset   int    `json:"offset"`
	MaxCount int    `json:"max_count"`
}

type UnitTypeListResponse

type UnitTypeListResponse struct {
	TotalCount    int                        `json:"total_count"`
	InFilterCount int                        `json:"in_filter_count"`
	Types         []UnitTypeListResponseItem `json:"types"`
}

type UnitTypeListResponseItem

type UnitTypeListResponseItem struct {
	Type        string `json:"type"`
	Category    string `json:"category"`
	DisplayName string `json:"display_name"`
	Help        string `json:"help"`
	Description string `json:"description"`
	Image       []byte `json:"image"`
}

type UserAddRequest added in v1.0.1

type UserAddRequest struct {
	UserName string `json:"user_name"`
	Password string `json:"password"`
}

type UserAddResponse added in v1.0.1

type UserAddResponse struct {
}

type UserListRequest added in v1.0.1

type UserListRequest struct {
}

type UserListResponse added in v1.0.1

type UserListResponse struct {
	Items []string `json:"items"`
}

type UserRemoveRequest added in v1.0.1

type UserRemoveRequest struct {
	UserName string `json:"user_name"`
}

type UserRemoveResponse added in v1.0.1

type UserRemoveResponse struct {
}

type UserSetPasswordRequest added in v1.0.1

type UserSetPasswordRequest struct {
	UserName string `json:"user_name"`
	Password string `json:"password"`
}

type UserSetPasswordResponse added in v1.0.1

type UserSetPasswordResponse struct {
}

Jump to

Keyboard shortcuts

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