mocks

package
v4.0.0-dev.3 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoEventManager

type AutoEventManager struct {
	mock.Mock
}

AutoEventManager is an autogenerated mock type for the AutoEventManager type

func NewAutoEventManager

func NewAutoEventManager(t mockConstructorTestingTNewAutoEventManager) *AutoEventManager

NewAutoEventManager creates a new instance of AutoEventManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*AutoEventManager) RestartForDevice

func (_m *AutoEventManager) RestartForDevice(name string)

RestartForDevice provides a mock function with given fields: name

func (*AutoEventManager) StartAutoEvents

func (_m *AutoEventManager) StartAutoEvents()

StartAutoEvents provides a mock function with given fields:

func (*AutoEventManager) StopForDevice

func (_m *AutoEventManager) StopForDevice(name string)

StopForDevice provides a mock function with given fields: name

type DeviceServiceSDK

type DeviceServiceSDK struct {
	mock.Mock
}

DeviceServiceSDK is an autogenerated mock type for the DeviceServiceSDK type

func NewDeviceServiceSDK

func NewDeviceServiceSDK(t interface {
	mock.TestingT
	Cleanup(func())
}) *DeviceServiceSDK

NewDeviceServiceSDK creates a new instance of DeviceServiceSDK. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*DeviceServiceSDK) AddCustomRoute

func (_m *DeviceServiceSDK) AddCustomRoute(route string, authentication interfaces.Authentication, handler func(echo.Context) error, methods ...string) error

AddCustomRoute provides a mock function with given fields: route, authentication, handler, methods

func (*DeviceServiceSDK) AddDevice

func (_m *DeviceServiceSDK) AddDevice(device models.Device) (string, error)

AddDevice provides a mock function with given fields: device

func (*DeviceServiceSDK) AddDeviceAutoEvent

func (_m *DeviceServiceSDK) AddDeviceAutoEvent(deviceName string, event models.AutoEvent) error

AddDeviceAutoEvent provides a mock function with given fields: deviceName, event

func (*DeviceServiceSDK) AddDeviceProfile

func (_m *DeviceServiceSDK) AddDeviceProfile(profile models.DeviceProfile) (string, error)

AddDeviceProfile provides a mock function with given fields: profile

func (*DeviceServiceSDK) AddProvisionWatcher

func (_m *DeviceServiceSDK) AddProvisionWatcher(watcher models.ProvisionWatcher) (string, error)

AddProvisionWatcher provides a mock function with given fields: watcher

func (*DeviceServiceSDK) AddRoute

func (_m *DeviceServiceSDK) AddRoute(route string, handler func(http.ResponseWriter, *http.Request), methods ...string) error

AddRoute provides a mock function with given fields: route, handler, methods

func (*DeviceServiceSDK) AsyncReadingsEnabled

func (_m *DeviceServiceSDK) AsyncReadingsEnabled() bool

AsyncReadingsEnabled provides a mock function with given fields:

func (*DeviceServiceSDK) AsyncValuesChannel

func (_m *DeviceServiceSDK) AsyncValuesChannel() chan *pkgmodels.AsyncValues

AsyncValuesChannel provides a mock function with given fields:

func (*DeviceServiceSDK) DeviceCommand

func (_m *DeviceServiceSDK) DeviceCommand(deviceName string, commandName string) (models.DeviceCommand, bool)

DeviceCommand provides a mock function with given fields: deviceName, commandName

func (*DeviceServiceSDK) DeviceDiscoveryEnabled

func (_m *DeviceServiceSDK) DeviceDiscoveryEnabled() bool

DeviceDiscoveryEnabled provides a mock function with given fields:

func (*DeviceServiceSDK) DeviceExistsForName

func (_m *DeviceServiceSDK) DeviceExistsForName(name string) bool

DeviceExistsForName provides a mock function with given fields: name

func (*DeviceServiceSDK) DeviceProfiles

func (_m *DeviceServiceSDK) DeviceProfiles() []models.DeviceProfile

DeviceProfiles provides a mock function with given fields:

func (*DeviceServiceSDK) DeviceResource

func (_m *DeviceServiceSDK) DeviceResource(deviceName string, deviceResource string) (models.DeviceResource, bool)

DeviceResource provides a mock function with given fields: deviceName, deviceResource

func (*DeviceServiceSDK) Devices

func (_m *DeviceServiceSDK) Devices() []models.Device

Devices provides a mock function with given fields:

func (*DeviceServiceSDK) DiscoveredDeviceChannel

func (_m *DeviceServiceSDK) DiscoveredDeviceChannel() chan []pkgmodels.DiscoveredDevice

DiscoveredDeviceChannel provides a mock function with given fields:

func (*DeviceServiceSDK) DriverConfigs

func (_m *DeviceServiceSDK) DriverConfigs() map[string]string

DriverConfigs provides a mock function with given fields:

func (*DeviceServiceSDK) GetDeviceByName

func (_m *DeviceServiceSDK) GetDeviceByName(name string) (models.Device, error)

GetDeviceByName provides a mock function with given fields: name

func (*DeviceServiceSDK) GetProfileByName

func (_m *DeviceServiceSDK) GetProfileByName(name string) (models.DeviceProfile, error)

GetProfileByName provides a mock function with given fields: name

func (*DeviceServiceSDK) GetProvisionWatcherByName

func (_m *DeviceServiceSDK) GetProvisionWatcherByName(name string) (models.ProvisionWatcher, error)

GetProvisionWatcherByName provides a mock function with given fields: name

func (*DeviceServiceSDK) ListenForCustomConfigChanges

func (_m *DeviceServiceSDK) ListenForCustomConfigChanges(configToWatch interface{}, sectionName string, changedCallback func(interface{})) error

ListenForCustomConfigChanges provides a mock function with given fields: configToWatch, sectionName, changedCallback

func (*DeviceServiceSDK) LoadCustomConfig

func (_m *DeviceServiceSDK) LoadCustomConfig(customConfig interfaces.UpdatableConfig, sectionName string) error

LoadCustomConfig provides a mock function with given fields: customConfig, sectionName

func (*DeviceServiceSDK) LoggingClient

func (_m *DeviceServiceSDK) LoggingClient() logger.LoggingClient

LoggingClient provides a mock function with given fields:

func (*DeviceServiceSDK) MetricsManager

MetricsManager provides a mock function with given fields:

func (*DeviceServiceSDK) Name

func (_m *DeviceServiceSDK) Name() string

Name provides a mock function with given fields:

func (*DeviceServiceSDK) PatchDevice

func (_m *DeviceServiceSDK) PatchDevice(updateDevice dtos.UpdateDevice) error

PatchDevice provides a mock function with given fields: updateDevice

func (*DeviceServiceSDK) ProvisionWatchers

func (_m *DeviceServiceSDK) ProvisionWatchers() []models.ProvisionWatcher

ProvisionWatchers provides a mock function with given fields:

func (*DeviceServiceSDK) PublishDeviceDiscoveryProgressSystemEvent

func (_m *DeviceServiceSDK) PublishDeviceDiscoveryProgressSystemEvent(progress int, discoveredDeviceCount int, message string)

PublishDeviceDiscoveryProgressSystemEvent provides a mock function with given fields: progress, discoveredDeviceCount, message

func (*DeviceServiceSDK) PublishGenericSystemEvent

func (_m *DeviceServiceSDK) PublishGenericSystemEvent(eventType string, action string, details interface{})

PublishGenericSystemEvent provides a mock function with given fields: eventType, action, details

func (*DeviceServiceSDK) PublishProfileScanProgressSystemEvent

func (_m *DeviceServiceSDK) PublishProfileScanProgressSystemEvent(reqId string, progress int, message string)

PublishProfileScanProgressSystemEvent provides a mock function with given fields: reqId, progress, message

func (*DeviceServiceSDK) RemoveDeviceAutoEvent

func (_m *DeviceServiceSDK) RemoveDeviceAutoEvent(deviceName string, event models.AutoEvent) error

RemoveDeviceAutoEvent provides a mock function with given fields: deviceName, event

func (*DeviceServiceSDK) RemoveDeviceByName

func (_m *DeviceServiceSDK) RemoveDeviceByName(name string) error

RemoveDeviceByName provides a mock function with given fields: name

func (*DeviceServiceSDK) RemoveDeviceProfileByName

func (_m *DeviceServiceSDK) RemoveDeviceProfileByName(name string) error

RemoveDeviceProfileByName provides a mock function with given fields: name

func (*DeviceServiceSDK) RemoveProvisionWatcher

func (_m *DeviceServiceSDK) RemoveProvisionWatcher(name string) error

RemoveProvisionWatcher provides a mock function with given fields: name

func (*DeviceServiceSDK) Run

func (_m *DeviceServiceSDK) Run() error

Run provides a mock function with given fields:

func (*DeviceServiceSDK) SecretProvider

SecretProvider provides a mock function with given fields:

func (*DeviceServiceSDK) UpdateDevice

func (_m *DeviceServiceSDK) UpdateDevice(device models.Device) error

UpdateDevice provides a mock function with given fields: device

func (*DeviceServiceSDK) UpdateDeviceOperatingState

func (_m *DeviceServiceSDK) UpdateDeviceOperatingState(name string, state models.OperatingState) error

UpdateDeviceOperatingState provides a mock function with given fields: name, state

func (*DeviceServiceSDK) UpdateDeviceProfile

func (_m *DeviceServiceSDK) UpdateDeviceProfile(profile models.DeviceProfile) error

UpdateDeviceProfile provides a mock function with given fields: profile

func (*DeviceServiceSDK) UpdateProvisionWatcher

func (_m *DeviceServiceSDK) UpdateProvisionWatcher(watcher models.ProvisionWatcher) error

UpdateProvisionWatcher provides a mock function with given fields: watcher

func (*DeviceServiceSDK) Version

func (_m *DeviceServiceSDK) Version() string

Version provides a mock function with given fields:

type ProtocolDriver

type ProtocolDriver struct {
	mock.Mock
}

ProtocolDriver is an autogenerated mock type for the ProtocolDriver type

func NewProtocolDriver

func NewProtocolDriver(t mockConstructorTestingTNewProtocolDriver) *ProtocolDriver

NewProtocolDriver creates a new instance of ProtocolDriver. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*ProtocolDriver) AddDevice

func (_m *ProtocolDriver) AddDevice(deviceName string, protocols map[string]models.ProtocolProperties, adminState models.AdminState) error

AddDevice provides a mock function with given fields: deviceName, protocols, adminState

func (*ProtocolDriver) Discover

func (_m *ProtocolDriver) Discover() error

Discover provides a mock function with given fields:

func (*ProtocolDriver) HandleReadCommands

func (_m *ProtocolDriver) HandleReadCommands(deviceName string, protocols map[string]models.ProtocolProperties, reqs []pkgmodels.CommandRequest) ([]*pkgmodels.CommandValue, error)

HandleReadCommands provides a mock function with given fields: deviceName, protocols, reqs

func (*ProtocolDriver) HandleWriteCommands

func (_m *ProtocolDriver) HandleWriteCommands(deviceName string, protocols map[string]models.ProtocolProperties, reqs []pkgmodels.CommandRequest, params []*pkgmodels.CommandValue) error

HandleWriteCommands provides a mock function with given fields: deviceName, protocols, reqs, params

func (*ProtocolDriver) Initialize

func (_m *ProtocolDriver) Initialize(sdk interfaces.DeviceServiceSDK) error

Initialize provides a mock function with given fields: sdk

func (*ProtocolDriver) RemoveDevice

func (_m *ProtocolDriver) RemoveDevice(deviceName string, protocols map[string]models.ProtocolProperties) error

RemoveDevice provides a mock function with given fields: deviceName, protocols

func (*ProtocolDriver) Start

func (_m *ProtocolDriver) Start() error

Start provides a mock function with given fields:

func (*ProtocolDriver) Stop

func (_m *ProtocolDriver) Stop(force bool) error

Stop provides a mock function with given fields: force

func (*ProtocolDriver) UpdateDevice

func (_m *ProtocolDriver) UpdateDevice(deviceName string, protocols map[string]models.ProtocolProperties, adminState models.AdminState) error

UpdateDevice provides a mock function with given fields: deviceName, protocols, adminState

func (*ProtocolDriver) ValidateDevice

func (_m *ProtocolDriver) ValidateDevice(device models.Device) error

ValidateDevice provides a mock function with given fields: device

type UpdatableConfig

type UpdatableConfig struct {
	mock.Mock
}

UpdatableConfig is an autogenerated mock type for the UpdatableConfig type

func NewUpdatableConfig

func NewUpdatableConfig(t mockConstructorTestingTNewUpdatableConfig) *UpdatableConfig

NewUpdatableConfig creates a new instance of UpdatableConfig. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*UpdatableConfig) UpdateFromRaw

func (_m *UpdatableConfig) UpdateFromRaw(rawConfig interface{}) bool

UpdateFromRaw provides a mock function with given fields: rawConfig

Jump to

Keyboard shortcuts

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