system

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultUserName string
View Source
var DefaultUserPassword string

Functions

func SplitWithoutEmpty

func SplitWithoutEmpty(req string, sep rune) []string

Types

type Config

type Config struct {
	Users      []common_interfaces.User              `json:"users"`
	Units      []units_common.UnitInfo               `json:"units"`
	Channels   []public_channel.ChannelFullInfo      `json:"channels"`
	Items      []common_interfaces.ItemConfiguration `json:"items"`
	NextItemId uint64                                `json:"next_item_id"`
}

type System

type System struct {
	// contains filtered or unexported fields
}

func NewSystem

func NewSystem() *System

func (*System) AddCloudChannel

func (c *System) AddCloudChannel(channelName string) error

func (*System) AddUnit

func (c *System) AddUnit(unitName string, unitType string, config string) (string, error)

func (*System) CheckSession

func (c *System) CheckSession(sessionToken string) (string, error)

func (*System) CloudAccountInfo added in v1.0.6

func (*System) CloudAddItems

func (c *System) CloudAddItems(channels []string, items []string) error

func (*System) CloudAddNode added in v1.0.6

func (c *System) CloudAddNode(name string) (nodeinterface.CloudAddNodeResponse, error)

func (*System) CloudGetSettings added in v1.0.6

func (*System) CloudLogin added in v1.0.6

func (c *System) CloudLogin(userName string, password string) error

func (*System) CloudLogout added in v1.0.6

func (c *System) CloudLogout() (nodeinterface.CloudLogoutResponse, error)

func (*System) CloudNodes added in v1.0.6

func (c *System) CloudNodes() (nodeinterface.CloudNodesResponse, error)

func (*System) CloudRemoveItems

func (c *System) CloudRemoveItems(channels []string, items []string) error

func (*System) CloudRemoveNode added in v1.0.6

func (c *System) CloudRemoveNode(nodeId string) (nodeinterface.CloudRemoveNodeResponse, error)

func (*System) CloudSetCurrentNodeId added in v1.0.6

func (*System) CloudSetSettings added in v1.0.6

func (*System) CloudState added in v1.0.6

func (c *System) CloudState() (nodeinterface.CloudStateResponse, error)

func (*System) CloudUpdateNode added in v1.0.6

func (c *System) CloudUpdateNode(nodeId string, name string) (nodeinterface.CloudUpdateNodeResponse, error)

func (*System) EditCloudChannel

func (c *System) EditCloudChannel(channelId string, channelName string) error

func (*System) Exec added in v1.0.6

func (c *System) Exec(function string, request []byte, host string) ([]byte, error)

func (*System) GetAllItems

func (c *System) GetAllItems() []common_interfaces.ItemGetUnitItems

func (*System) GetApi added in v1.0.5

func (*System) GetCloudChannelValues

func (c *System) GetCloudChannelValues(channelId string) ([]common_interfaces.Item, error)

func (*System) GetCloudChannels

func (c *System) GetCloudChannels() ([]public_channel.ChannelInfo, error)

func (*System) GetConfig

func (c *System) GetConfig(unitId string) (string, string, string, string, error)

func (*System) GetConfigByType

func (c *System) GetConfigByType(unitType string) (string, string, error)

func (*System) GetItem

func (c *System) GetItem(name string) (common_interfaces.Item, error)

func (*System) GetItems

func (c *System) GetItems() []common_interfaces.Item

func (*System) GetItemsValues

func (c *System) GetItemsValues(reqItems []string) []common_interfaces.ItemGetUnitItems

func (*System) GetStatistics

func (c *System) GetStatistics() (common_interfaces.Statistics, error)

func (*System) GetUnitState

func (c *System) GetUnitState(unitId string) (nodeinterface.UnitStateResponse, error)

func (*System) GetUnitStateAll added in v1.0.6

func (c *System) GetUnitStateAll() (nodeinterface.UnitStateAllResponse, error)

func (*System) GetUnitValues

func (c *System) GetUnitValues(unitName string) []common_interfaces.ItemGetUnitItems

func (*System) ListOfUnits

func (c *System) ListOfUnits() nodeinterface.UnitListResponse

func (*System) LoadConfig

func (c *System) LoadConfig() error

func (*System) Lookup

func (c *System) Lookup(entity string) (lookup.Result, error)

func (*System) OpenSession

func (c *System) OpenSession(name string, password string, host string) (nodeinterface.SessionOpenResponse, error)

func (*System) ReadHistory

func (c *System) ReadHistory(name string, dtBegin int64, dtEnd int64) (*history.ReadResult, error)

func (*System) RegApiCall added in v1.0.5

func (c *System) RegApiCall()

func (*System) RemoveCloudChannel

func (c *System) RemoveCloudChannel(channelId string) error

func (*System) RemoveItems added in v1.0.6

func (c *System) RemoveItems(itemsNames []string) error

func (*System) RemoveItemsOfUnit added in v1.0.6

func (c *System) RemoveItemsOfUnit(unitName string) error

func (*System) RemoveSession added in v1.0.1

func (c *System) RemoveSession(sessionToken string) error

func (*System) RemoveUnits

func (c *System) RemoveUnits(units []string) error

func (*System) RenameItems

func (c *System) RenameItems(oldPrefix string, newPrefix string)

func (*System) ResAdd

func (c *System) ResAdd(name string, tp string, content []byte) (string, error)

func (*System) ResGet

func (*System) ResList

func (c *System) ResList(tp string, filter string, offset int, maxCount int) common_interfaces.ResourcesInfo

func (*System) ResRemove

func (c *System) ResRemove(id string) error

func (*System) ResRename

func (c *System) ResRename(id string, name string) error

func (*System) ResSet

func (c *System) ResSet(id string, thumbnail []byte, content []byte) error

func (*System) SaveConfig

func (c *System) SaveConfig() error

func (*System) SessionList added in v1.0.1

func (c *System) SessionList(userName string) (nodeinterface.SessionListResponse, error)

func (*System) SetConfig

func (c *System) SetConfig(unitId string, name string, config string) error

func (*System) SetItem

func (c *System) SetItem(name string, value string, UOM string, dt time.Time, flags string) error

func (*System) SetRequester added in v1.0.6

func (c *System) SetRequester(requester common_interfaces.Requester)

func (*System) Start

func (c *System) Start()

func (*System) StartPublicChannels added in v1.0.6

func (c *System) StartPublicChannels(ids []string) (err error)

func (*System) StartUnits

func (c *System) StartUnits(ids []string) error

func (*System) StatGazerCloud added in v1.0.6

func (c *System) StatGazerCloud() (res common_interfaces.StatGazerCloud)

func (*System) StatGazerNode added in v1.0.6

func (c *System) StatGazerNode() (res common_interfaces.StatGazerNode)

func (*System) Stop

func (c *System) Stop()

func (*System) StopPublicChannels added in v1.0.6

func (c *System) StopPublicChannels(ids []string) (err error)

func (*System) StopUnits

func (c *System) StopUnits(ids []string) error

func (*System) TouchItem

func (c *System) TouchItem(name string) error

func (*System) UnitCategories

func (c *System) UnitCategories() nodeinterface.UnitTypeCategoriesResponse

func (*System) UnitTypes

func (c *System) UnitTypes(category string, filter string, offset int, maxCount int) nodeinterface.UnitTypeListResponse

func (*System) UserAdd

func (c *System) UserAdd(name string, password string) (nodeinterface.UserAddResponse, error)

func (*System) UserList added in v1.0.1

func (c *System) UserList() (nodeinterface.UserListResponse, error)

func (*System) UserRemove

func (c *System) UserRemove(name string) (nodeinterface.UserRemoveResponse, error)

func (*System) UserSetPassword

func (c *System) UserSetPassword(name string, password string) (nodeinterface.UserSetPasswordResponse, error)

type UserSession

type UserSession struct {
	SessionToken              string `json:"session_token"`
	UserName                  string `json:"user_name"`
	SessionOpenTime           int64  `json:"session_open_time"`
	SessionOpenTimeForDisplay string `json:"session_open_time_for_display"`
	Host                      string `json:"host"`
}

Jump to

Keyboard shortcuts

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