Documentation
¶
Overview ¶
******************************************************************************
- Copyright 2018 Dell Inc. *
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
- in compliance with the License. You may obtain a copy of the License at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- Unless required by applicable law or agreed to in writing, software distributed under the License
- is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- or implied. See the License for the specific language governing permissions and limitations under
- the License. ******************************************************************************
Index ¶
Constants ¶
View Source
const ( EncNone = "NONE" EncAes = "AES" )
Encryption types
View Source
const ( DestMQTT = "MQTT_TOPIC" DestZMQ = "ZMQ_TOPIC" DestIotCoreMQTT = "IOTCORE_TOPIC" DestAzureMQTT = "AZURE_TOPIC" DestRest = "REST_ENDPOINT" DestXMPP = "XMPP_TOPIC" DestAWSMQTT = "AWS_TOPIC" DestInfluxDB = "INFLUXDB_ENDPOINT" DestMindConnectMQTT = "MINDCONNECT_TOPIC" DestOEDKConnectMQTT = "OEDKCONNECT_TOPIC" )
Export destination types
View Source
const ( CompNone = "NONE" CompGzip = "GZIP" CompZip = "ZIP" )
Compression algorithm types
View Source
const ( FormatJSON = "JSON" FormatXML = "XML" FormatSerialized = "SERIALIZED" FormatIoTCoreJSON = "IOTCORE_JSON" FormatAzureJSON = "AZURE_JSON" FormatAWSJSON = "AWS_JSON" FormatCSV = "CSV" FormatThingsBoardJSON = "THINGSBOARD_JSON" FormatNOOP = "NOOP" )
Data format types
View Source
const ( NotifyUpdateAdd = "add" NotifyUpdateUpdate = "update" NotifyUpdateDelete = "delete" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBClient ¶
type DBClient interface {
CloseSession()
Connect() error
// ********************** REGISTRATION FUNCTIONS *****************************
// Return all the registrations
// UnexpectedError - failed to retrieve registrations from the database
Registrations() ([]Registration, error)
// Add a new registration
// UnexpectedError - failed to add to database
AddRegistration(reg *Registration) (bson.ObjectId, error)
// Update a registration
// UnexpectedError - problem updating in database
// NotFound - no registration with the ID was found
UpdateRegistration(reg Registration) error
// Get a registration by ID
// UnexpectedError - problem getting in database
// NotFound - no registration with the ID was found
RegistrationById(id string) (Registration, error)
// Get a registration by name
// UnexpectedError - problem getting in database
// NotFound - no registration with the name was found
RegistrationByName(name string) (Registration, error)
// Delete a registration by ID
// UnexpectedError - problem getting in database
// NotFound - no registration with the ID was found
DeleteRegistrationById(id string) error
// Delete a registration by name
// UnexpectedError - problem getting in database
// NotFound - no registration with the ID was found
DeleteRegistrationByName(name string) error
// Delete all registrations
ScrubAllRegistrations() error
}
type EncryptionDetails ¶
type EncryptionDetails struct {
Algo string `bson:"encryptionAlgorithm,omitempty" json:"encryptionAlgorithm,omitempty"`
Key string `bson:"encryptionKey,omitempty" json:"encryptionKey,omitempty"`
InitVector string `bson:"initializingVector,omitempty" json:"initializingVector,omitempty"`
}
EncryptionDetails - Provides details for encryption of export data per client request
type Filter ¶
type Filter struct {
DeviceIDs []string `bson:"deviceIdentifiers,omitempty" json:"deviceIdentifiers,omitempty"`
ValueDescriptorIDs []string `bson:"valueDescriptorIdentifiers,omitempty" json:"valueDescriptorIdentifiers,omitempty"`
}
Filter - Specifies the client filters on reading data
type Registration ¶
type Registration struct {
ID bson.ObjectId `bson:"_id,omitempty" json:"id,omitempty"`
Created int64 `json:"created"`
Modified int64 `json:"modified"`
Origin int64 `json:"origin"`
Name string `json:"name,omitempty"`
Addressable models.Addressable `json:"addressable,omitempty"`
Format string `json:"format,omitempty"`
Filter Filter `json:"filter,omitempty"`
Encryption EncryptionDetails `json:"encryption,omitempty"`
Compression string `json:"compression,omitempty"`
Enable bool `json:"enable"`
Destination string `json:"destination,omitempty"`
}
Registration - Defines the registration details on the part of north side export clients
func (Registration) Validate ¶
func (reg Registration) Validate() (bool, error)
Directories
¶
| Path | Synopsis |
|---|---|
|
******************************************************************************
|
****************************************************************************** |
|
******************************************************************************
|
****************************************************************************** |
Click to show internal directories.
Click to hide internal directories.