Documentation ¶
Overview ¶
Package rfpmodel ...
Package rfpmodel ...
Package rfpmodel ...
Package rfpmodel ...
Package rfpmodel ...
Index ¶
- Variables
- func AddDeviceToInventory(uuid string, deviceData DeviceData)
- func DeleteDeviceInInventory(uuid string)
- func GetAllDevicesInInventory(devices *[]Device) int
- type Device
- type DeviceData
- type DeviceInventoryData
- type EventSubscriptionInfo
- type EvtSubPost
- type HTTPHeaders
- type PrivateKey
- type ResetPostRequest
- type StartUpData
- type TriggerInfo
- type Users
Constants ¶
This section is empty.
Variables ¶
var MetricPropertyData = make(map[string]string)
MetricPropertyData is map to store metric property
var PluginPrivateKey []byte
PluginPrivateKey will contains base64encoded private key of plugin this key will be used to decrypt the data.
Functions ¶
func AddDeviceToInventory ¶
func AddDeviceToInventory(uuid string, deviceData DeviceData)
AddDeviceToInventory is for adding new device to the inventory by acquiring write lock
func DeleteDeviceInInventory ¶
func DeleteDeviceInInventory(uuid string)
DeleteDeviceInInventory is for deleting device in the inventory by acquiring write lock
func GetAllDevicesInInventory ¶
GetAllDevicesInInventory is for getting list of all devices in the inventory by acquiring read lock Expects uninitialized slice of type Device
Types ¶
type Device ¶
type Device struct { Host string `json:"ManagerAddress"` Username string `json:"UserName"` Password []byte `json:"Password"` PostBody []byte `json:"PostBody"` Location string `json:"Location"` SystemID string `json:"SystemID"` }
Device struct definition
type DeviceData ¶
type DeviceData struct { UserName string `json:"UserName"` Password []byte `json:"Password"` Address string `json:"Address"` Operation string `json:"Operation"` EventSubscriptionInfo *EventSubscriptionInfo `json:"EventSubscriptionInfo"` TriggerInfo *TriggerInfo `json:"TriggerInfo"` }
DeviceData holds device credentials, event subcription and trigger details
type DeviceInventoryData ¶
type DeviceInventoryData struct { Device map[string]DeviceData // contains filtered or unexported fields }
DeviceInventoryData holds the list of all managed devices
var DeviceInventory *DeviceInventoryData
DeviceInventory is for storing the device inventory
type EventSubscriptionInfo ¶
type EventSubscriptionInfo struct { EventTypes []string `json:"EventTypes"` Location string `json:"Location"` }
EventSubscriptionInfo holds the event subscription details of a device
type EvtSubPost ¶
type EvtSubPost struct { Destination string `json:"Destination"` EventTypes []string `json:"EventTypes,omitempty"` MessageIds []string `json:"MessageIds,omitempty"` ResourceTypes []string `json:"ResourceTypes,omitempty"` HTTPHeaders []HTTPHeaders `json:"HttpHeaders"` Context string `json:"Context"` Protocol string `json:"Protocol"` EventFormatType string `json:"EventFormatType,omitempty"` }
EvtSubPost ...
type HTTPHeaders ¶
type HTTPHeaders struct {
ContentType string `json:"Content-Type"`
}
HTTPHeaders ...
type PrivateKey ¶
type PrivateKey struct {
PrivateKey string
}
PrivateKey struct is used to define the private key used to decrypt the resouece passwords
type ResetPostRequest ¶
type ResetPostRequest struct {
ResetType string `json:"ResetType"`
}
ResetPostRequest stores the reset type
type StartUpData ¶
type StartUpData struct { RequestType string `json:"RequestType"` ResyncEvtSubscription bool `json:"ResyncEvtSubscription"` Devices map[string]DeviceData `json:"Devices"` }
StartUpData holds the required data for plugin startup
type TriggerInfo ¶
type TriggerInfo struct { }
TriggerInfo holds the metric trigger info of a device