Versions in this module Expand all Collapse all v2 v2.3.2 Jul 6, 2023 Changes in this version + const BatchByCountOnly + const BatchByTimeAndCount + const BatchByTimeOnly + type AESProtection struct + EncryptionKey string + SecretName string + SecretPath string + func NewAESProtection(secretPath string, secretName string) AESProtection + func (protection AESProtection) Encrypt(ctx interfaces.AppFunctionContext, data interface{}) (bool, interface{}) + type BatchConfig struct + IsEventData bool + MergeOnSend bool + func NewBatchByCount(batchThreshold int) (*BatchConfig, error) + func NewBatchByTime(timeInterval string) (*BatchConfig, error) + func NewBatchByTimeAndCount(timeInterval string, batchThreshold int) (*BatchConfig, error) + func (batch *BatchConfig) Batch(ctx interfaces.AppFunctionContext, data interface{}) (bool, interface{}) + type BatchMode int + type Compression struct + func NewCompression() Compression + func (compression *Compression) CompressWithGZIP(ctx interfaces.AppFunctionContext, data interface{}) (bool, interface{}) + func (compression *Compression) CompressWithZLIB(ctx interfaces.AppFunctionContext, data interface{}) (bool, interface{}) + type Conversion struct + func NewConversion() Conversion + func (f Conversion) TransformToJSON(ctx interfaces.AppFunctionContext, data interface{}) (continuePipeline bool, stringType interface{}) + func (f Conversion) TransformToXML(ctx interfaces.AppFunctionContext, data interface{}) (continuePipeline bool, stringType interface{}) + type CoreData struct + func NewCoreDataBinaryReading(profileName string, deviceName string, resourceName string, mediaType string) *CoreData + func NewCoreDataObjectReading(profileName string, deviceName string, resourceName string) *CoreData + func NewCoreDataSimpleReading(profileName string, deviceName string, resourceName string, valueType string) *CoreData + func (cdc *CoreData) PushToCoreData(ctx interfaces.AppFunctionContext, data interface{}) (bool, interface{}) + type Encryption struct + EncryptionKey string + InitializationVector string + SecretName string + SecretPath string + func NewEncryption(encryptionKey string, initializationVector string) Encryption + func NewEncryptionWithSecrets(secretPath string, secretName string, initializationVector string) Encryption + func (aesData Encryption) EncryptWithAES(ctx interfaces.AppFunctionContext, data interface{}) (bool, interface{}) + type EventWrapper struct + func NewEventWrapperBinaryReading(profileName string, deviceName string, resourceName string, mediaType string) *EventWrapper + func NewEventWrapperObjectReading(profileName string, deviceName string, resourceName string) *EventWrapper + func NewEventWrapperSimpleReading(profileName string, deviceName string, resourceName string, valueType string) *EventWrapper + func (ew *EventWrapper) Wrap(ctx interfaces.AppFunctionContext, data interface{}) (bool, interface{}) + type Filter struct + FilterOut bool + FilterValues []string + func NewFilterFor(filterValues []string) Filter + func NewFilterOut(filterValues []string) Filter + func (f Filter) FilterByDeviceName(ctx interfaces.AppFunctionContext, data interface{}) (continuePipeline bool, result interface{}) + func (f Filter) FilterByProfileName(ctx interfaces.AppFunctionContext, data interface{}) (continuePipeline bool, result interface{}) + func (f Filter) FilterByResourceName(ctx interfaces.AppFunctionContext, data interface{}) (continuePipeline bool, result interface{}) + func (f Filter) FilterBySourceName(ctx interfaces.AppFunctionContext, data interface{}) (continuePipeline bool, result interface{}) + type HTTPSender struct + func NewHTTPSender(url string, mimeType string, persistOnError bool) HTTPSender + func NewHTTPSenderWithOptions(options HTTPSenderOptions) HTTPSender + func NewHTTPSenderWithSecretHeader(url string, mimeType string, persistOnError bool, headerName string, ...) HTTPSender + func (sender HTTPSender) HTTPPost(ctx interfaces.AppFunctionContext, data interface{}) (bool, interface{}) + func (sender HTTPSender) HTTPPut(ctx interfaces.AppFunctionContext, data interface{}) (bool, interface{}) + type HTTPSenderOptions struct + ContinueOnSendError bool + HTTPHeaderName string + MimeType string + PersistOnError bool + ReturnInputData bool + SecretName string + SecretPath string + URL string + URLFormatter StringValuesFormatter + type JSONLogic struct + Rule string + func NewJSONLogic(rule string) JSONLogic + func (logic JSONLogic) Evaluate(ctx interfaces.AppFunctionContext, data interface{}) (bool, interface{}) + type MQTTSecretConfig struct + AuthMode string + AutoReconnect bool + BrokerAddress string + ClientId string + ConnectTimeout string + KeepAlive string + QoS byte + Retain bool + SecretPath string + SkipCertVerify bool + Topic string + type MQTTSecretSender struct + func NewMQTTSecretSender(mqttConfig MQTTSecretConfig, persistOnError bool) *MQTTSecretSender + func NewMQTTSecretSenderWithTopicFormatter(mqttConfig MQTTSecretConfig, persistOnError bool, ...) *MQTTSecretSender + func (sender *MQTTSecretSender) MQTTSend(ctx interfaces.AppFunctionContext, data interface{}) (bool, interface{}) + type MetricsProcessor struct + func NewMetricsProcessor(additionalTags map[string]interface{}) (*MetricsProcessor, error) + func (mp *MetricsProcessor) ToLineProtocol(ctx interfaces.AppFunctionContext, data interface{}) (bool, interface{}) + type ResponseData struct + ResponseContentType string + func NewResponseData() ResponseData + func (f ResponseData) SetResponseData(ctx interfaces.AppFunctionContext, data interface{}) (bool, interface{}) + type StringValuesFormatter func(string, interfaces.AppFunctionContext, interface{}) (string, error) + type Tags struct + func NewGenericTags(tags map[string]interface{}) Tags + func NewTags(tags map[string]string) Tags + func (t *Tags) AddTags(ctx interfaces.AppFunctionContext, data interface{}) (bool, interface{})