rfpmodel

package
v0.0.0-...-8d2fcc7 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package rfpmodel ...

Package rfpmodel ...

Package rfpmodel ...

Package rfpmodel ...

Package rfpmodel ...

Index

Constants

This section is empty.

Variables

View Source
var MetricPropertyData = make(map[string]string)

MetricPropertyData is map to store metric property

View Source
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

func GetAllDevicesInInventory(devices *[]Device) int

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"`
}

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

type Users

type Users struct {
	Username string `json:"Username"`
	Password string `json:"Password"`
}

Users struct definition

Jump to

Keyboard shortcuts

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