interfaces

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: Apache-2.0 Imports: 7 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analytics

type Analytics interface {
	UpdateGroupDeployment(token auth.AuthToken, pipelineId string, label string, owner string, desc model.GroupEventDescription, serviceIds []string, serviceToDeviceIdsMapping map[string][]string, serviceToPathsMapping map[string][]string, serviceToPathAndCharacteristic map[string][]model.PathAndCharacteristic, castExtensions []model.ConverterExtension, useMarshaller bool) (err error)
	DeployGroup(token auth.AuthToken, label string, user string, desc model.GroupEventDescription, serviceIds []string, serviceToDeviceIdsMapping map[string][]string, serviceToPathsMapping map[string][]string, serviceToPathAndCharacteristic map[string][]model.PathAndCharacteristic, castExtensions []model.ConverterExtension, useMarshaller bool) (pipelineId string, err error)
	DeployImport(token auth.AuthToken, label string, user string, desc model.GroupEventDescription, topic string, path string, castFrom string, castTo string, castExtensions []model.ConverterExtension) (pipelineId string, err error)
	DeployGenericSource(token auth.AuthToken, label string, owner string, desc model.GroupEventDescription, path string, from string, to string, extensions []model.ConverterExtension) (pipelineId string, err error)
	DeployDevice(token auth.AuthToken, label string, user string, deploymentId string, flowId string, eventId string, deviceId string, serviceId string, value string, path string, castFrom string, castTo string, castExtensions []model.ConverterExtension) (pipelineId string, err error)
	DeployDeviceWithMarshaller(token auth.AuthToken, label string, user string, deploymentId string, flowId string, eventId string, deviceId string, serviceId string, value string, path string, functionId string, aspectNodeId string, targetCharacteristicId string) (pipelineId string, err error)
	Remove(user string, pipelineId string) error
	GetPipelinesByDeploymentId(owner string, deploymentId string) (pipelineIds []string, err error)
	GetPipelineByEventId(owner string, eventId string) (pipelineId string, exists bool, err error)
	GetPipelinesByDeviceGroupId(owner string, groupId string) (pipelineIds []string, pipelineToGroupDescription map[string]model.GroupEventDescription, pipelineNames map[string]string, err error)
	GetEventStates(userId string, eventIds []string) (states map[string]bool, err error)
}

type AnalyticsFactory

type AnalyticsFactory interface {
	New(ctx context.Context, config config.Config) (Analytics, error)
}

type Devices

type Devices interface {
	GetDeviceInfosOfGroup(groupId string) (devices []model.Device, deviceTypeIds []string, err error, code int)
	GetDeviceInfosOfDevices(deviceIds []string) (devices []model.Device, deviceTypeIds []string, err error, code int)
	GetDeviceTypeSelectables(criteria []model.FilterCriteria) (result []model.DeviceTypeSelectable, err error, code int)
	GetConcept(conceptId string) (result model.Concept, err error, code int)
	GetFunction(functionId string) (result model.Function, err error, code int)
	GetService(serviceId string) (result models.Service, err error, code int)
}

type DevicesFactory

type DevicesFactory interface {
	New(config config.Config) (Devices, error)
}

type Events

type Events interface {
	HandleCommand(msg []byte) error
	HandleDeviceGroupUpdate(msg []byte) error
	CheckEvent(token string, id string) int
	GetEventStates(token string, ids []string) (states map[string]bool, err error, code int)
}

type EventsFactory

type EventsFactory interface {
	New(ctx context.Context, config config.Config, analytics Analytics, devices Devices, imports Imports, doneProducer Producer, m *metrics.Metrics) (Events, error)
}

type Imports

type Imports interface {
	GetTopic(user string, importId string) (topic string, err error, code int)
	GetImportInstance(user string, importId string) (importInstance importmodel.Import, err error, code int)
	GetImportType(user string, importTypeId string) (importInstance importmodel.ImportType, err error, code int)
}

type ImportsFactory

type ImportsFactory interface {
	New(config config.Config) Imports
}

type Producer

type Producer interface {
	Produce(key string, message []byte) error
}

type SourcingFactory

type SourcingFactory interface {
	NewConsumer(ctx context.Context, config config.Config, topic string, listener func(delivery []byte) error) error
	NewProducer(ctx context.Context, config config.Config, topic string) (Producer, error)
}

Jump to

Keyboard shortcuts

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