Documentation ¶
Index ¶
- Constants
- Variables
- func CreateDescriptorsFromProfile(profile contract.DeviceProfile) error
- type AddressableClientMock
- func (AddressableClientMock) Add(addr *contract.Addressable, ctx context.Context) (string, error)
- func (AddressableClientMock) Addressable(id string, ctx context.Context) (contract.Addressable, error)
- func (AddressableClientMock) AddressableForName(name string, ctx context.Context) (contract.Addressable, error)
- func (AddressableClientMock) Delete(id string, ctx context.Context) error
- func (AddressableClientMock) Update(addr contract.Addressable, ctx context.Context) error
- type DeviceClientMock
- func (dc *DeviceClientMock) Add(_ context.Context, _ *contract.Device) (string, error)
- func (dc *DeviceClientMock) CheckForDevice(_ context.Context, _ string) (contract.Device, error)
- func (dc *DeviceClientMock) Delete(_ context.Context, _ string) error
- func (dc *DeviceClientMock) DeleteByName(_ context.Context, _ string) error
- func (dc *DeviceClientMock) Device(_ context.Context, id string) (contract.Device, error)
- func (dc *DeviceClientMock) DeviceForName(_ context.Context, name string) (contract.Device, error)
- func (dc *DeviceClientMock) Devices(_ context.Context) ([]contract.Device, error)
- func (dc *DeviceClientMock) DevicesByLabel(_ context.Context, _ string) ([]contract.Device, error)
- func (dc *DeviceClientMock) DevicesForProfile(_ context.Context, _ string) ([]contract.Device, error)
- func (dc *DeviceClientMock) DevicesForProfileByName(_ context.Context, _ string) ([]contract.Device, error)
- func (dc *DeviceClientMock) DevicesForService(_ context.Context, _ string) ([]contract.Device, error)
- func (dc *DeviceClientMock) DevicesForServiceByName(_ context.Context, _ string) ([]contract.Device, error)
- func (dc *DeviceClientMock) Update(_ context.Context, _ contract.Device) error
- func (dc *DeviceClientMock) UpdateAdminState(_ context.Context, _ string, _ admin.UpdateRequest) error
- func (dc *DeviceClientMock) UpdateAdminStateByName(_ context.Context, _ string, _ admin.UpdateRequest) error
- func (dc *DeviceClientMock) UpdateLastConnected(_ context.Context, _ string, _ int64) error
- func (dc *DeviceClientMock) UpdateLastConnectedByName(_ context.Context, _ string, _ int64) error
- func (dc *DeviceClientMock) UpdateLastReported(_ context.Context, _ string, _ int64) error
- func (dc *DeviceClientMock) UpdateLastReportedByName(_ context.Context, _ string, _ int64) error
- func (dc *DeviceClientMock) UpdateOpState(_ context.Context, _ string, _ operating.UpdateRequest) error
- func (dc *DeviceClientMock) UpdateOpStateByName(_ context.Context, _ string, _ operating.UpdateRequest) error
- type DeviceProfileClientMock
- func (DeviceProfileClientMock) Add(_ context.Context, _ *contract.DeviceProfile) (string, error)
- func (DeviceProfileClientMock) Delete(_ context.Context, _ string) error
- func (DeviceProfileClientMock) DeleteByName(_ context.Context, _ string) error
- func (DeviceProfileClientMock) DeviceProfile(_ context.Context, _ string) (contract.DeviceProfile, error)
- func (DeviceProfileClientMock) DeviceProfileForName(_ context.Context, _ string) (contract.DeviceProfile, error)
- func (DeviceProfileClientMock) DeviceProfiles(_ context.Context) ([]contract.DeviceProfile, error)
- func (DeviceProfileClientMock) Update(_ context.Context, _ contract.DeviceProfile) error
- func (DeviceProfileClientMock) Upload(_ context.Context, _ string) (string, error)
- func (DeviceProfileClientMock) UploadFile(_ context.Context, _ string) (string, error)
- type DriverMock
- func (DriverMock) AddDevice(deviceName string, protocols map[string]contract.ProtocolProperties, ...) error
- func (DriverMock) DisconnectDevice(deviceName string, protocols map[string]contract.ProtocolProperties) error
- func (DriverMock) HandleReadCommands(deviceName string, protocols map[string]contract.ProtocolProperties, ...) (res []*dsModels.CommandValue, err error)
- func (DriverMock) HandleWriteCommands(deviceName string, protocols map[string]contract.ProtocolProperties, ...) error
- func (DriverMock) Initialize(lc logger.LoggingClient, asyncCh chan<- *dsModels.AsyncValues, ...) error
- func (DriverMock) RemoveDevice(deviceName string, protocols map[string]contract.ProtocolProperties) error
- func (DriverMock) Stop(force bool) error
- func (DriverMock) UpdateDevice(deviceName string, protocols map[string]contract.ProtocolProperties, ...) error
- type EventClientMock
- func (e EventClientMock) Add(_ context.Context, _ *contract.Event) (string, error)
- func (e EventClientMock) AddBytes(_ context.Context, _ []byte) (string, error)
- func (e EventClientMock) Delete(_ context.Context, _ string) error
- func (e EventClientMock) DeleteForDevice(_ context.Context, _ string) error
- func (e EventClientMock) DeleteOld(_ context.Context, _ int) error
- func (e EventClientMock) Event(_ context.Context, _ string) (contract.Event, error)
- func (e EventClientMock) EventCount(_ context.Context) (int, error)
- func (e EventClientMock) EventCountForDevice(_ context.Context, _ string) (int, error)
- func (e EventClientMock) Events(_ context.Context) ([]contract.Event, error)
- func (e EventClientMock) EventsForDevice(_ context.Context, _ string, _ int) ([]contract.Event, error)
- func (e EventClientMock) EventsForDeviceAndValueDescriptor(_ context.Context, _ string, _ string, _ int) ([]contract.Event, error)
- func (e EventClientMock) EventsForInterval(_ context.Context, _ int, _ int, _ int) ([]contract.Event, error)
- func (e EventClientMock) MarkPushed(_ context.Context, _ string) error
- func (e EventClientMock) MarkPushedByChecksum(_ context.Context, _ string) error
- func (e EventClientMock) MarshalEvent(_ contract.Event) ([]byte, error)
- type ProvisionWatcherClientMock
- func (ProvisionWatcherClientMock) Add(_ context.Context, _ *contract.ProvisionWatcher) (string, error)
- func (ProvisionWatcherClientMock) Delete(_ context.Context, _ string) error
- func (ProvisionWatcherClientMock) ProvisionWatcher(_ context.Context, _ string) (contract.ProvisionWatcher, error)
- func (ProvisionWatcherClientMock) ProvisionWatcherForName(_ context.Context, _ string) (contract.ProvisionWatcher, error)
- func (ProvisionWatcherClientMock) ProvisionWatchers(_ context.Context) ([]contract.ProvisionWatcher, error)
- func (ProvisionWatcherClientMock) ProvisionWatchersForProfile(_ context.Context, _ string) ([]contract.ProvisionWatcher, error)
- func (ProvisionWatcherClientMock) ProvisionWatchersForProfileByName(_ context.Context, _ string) ([]contract.ProvisionWatcher, error)
- func (ProvisionWatcherClientMock) ProvisionWatchersForService(_ context.Context, _ string) ([]contract.ProvisionWatcher, error)
- func (ProvisionWatcherClientMock) ProvisionWatchersForServiceByName(_ context.Context, _ string) ([]contract.ProvisionWatcher, error)
- func (ProvisionWatcherClientMock) Update(_ context.Context, _ contract.ProvisionWatcher) error
- type ValueDescriptorMock
- func (ValueDescriptorMock) Add(_ context.Context, _ *contract.ValueDescriptor) (string, error)
- func (ValueDescriptorMock) Delete(_ context.Context, _ string) error
- func (ValueDescriptorMock) DeleteByName(_ context.Context, _ string) error
- func (ValueDescriptorMock) Update(_ context.Context, _ *contract.ValueDescriptor) error
- func (ValueDescriptorMock) ValueDescriptor(_ context.Context, _ string) (contract.ValueDescriptor, error)
- func (ValueDescriptorMock) ValueDescriptorForName(_ context.Context, _ string) (contract.ValueDescriptor, error)
- func (ValueDescriptorMock) ValueDescriptors(_ context.Context) ([]contract.ValueDescriptor, error)
- func (ValueDescriptorMock) ValueDescriptorsByLabel(_ context.Context, _ string) ([]contract.ValueDescriptor, error)
- func (ValueDescriptorMock) ValueDescriptorsByUomLabel(_ context.Context, _ string) ([]contract.ValueDescriptor, error)
- func (ValueDescriptorMock) ValueDescriptorsForDevice(_ context.Context, _ string) ([]contract.ValueDescriptor, error)
- func (ValueDescriptorMock) ValueDescriptorsForDeviceByName(_ context.Context, _ string) ([]contract.ValueDescriptor, error)
- func (ValueDescriptorMock) ValueDescriptorsUsage(_ context.Context, _ []string) (map[string]bool, error)
Constants ¶
View Source
const ( DeviceBool = "Random-Boolean-Generator" DeviceInt = "Random-Integer-Generator" DeviceUint = "Random-UnsignedInteger-Generator" DeviceFloat = "Random-Float-Generator" DeviceNew = "New-Device" DeviceNew02 = "New-Device-02" ProfileBool = "Random-Boolean-Generator" ProfileInt = "Random-Integer-Generator" ProfileUint = "Random-UnsignedInteger-Generator" ProfileFloat = "Random-Float-Generator" ProfileNew = "New-Device" WatcherBool = "Bool-Watcher" WatcherInt = "Integer-Watcher" WatcherUint = "UnsignedInteger-Watcher" WatcherFloat = "Float-Watcher" WatcherNew = "New-Watcher" ResourceObjectBool = "RandomValue_Bool" ResourceObjectInt8 = "RandomValue_Int8" ResourceObjectInt16 = "RandomValue_Int16" ResourceObjectInt32 = "RandomValue_Int32" ResourceObjectInt64 = "RandomValue_Int64" ResourceObjectUint8 = "RandomValue_Uint8" ResourceObjectUint16 = "RandomValue_Uint16" ResourceObjectUint32 = "RandomValue_Uint32" ResourceObjectUint64 = "RandomValue_Uint64" ResourceObjectFloat32 = "RandomValue_Float32" ResourceObjectFloat64 = "RandomValue_Float64" ResourceObjectRandFloat32 = "randfloat32" ResourceObjectNaNFloat32 = "NaN_Float32" ResourceObjectNaNFloat64 = "NaN_Float64" )
View Source
const Int8Value = int8(123)
View Source
const (
InvalidDeviceId = "1ef435eb-5060-49b0-8d55-8d4e43239800"
)
Variables ¶
View Source
var ( ValidDeviceRandomBoolGenerator = contract.Device{} ValidDeviceRandomIntegerGenerator = contract.Device{} ValidDeviceRandomUnsignedIntegerGenerator = contract.Device{} ValidDeviceRandomFloatGenerator = contract.Device{} DuplicateDeviceRandomFloatGenerator = contract.Device{} NewValidDevice = contract.Device{} OperatingStateDisabled = contract.Device{} )
View Source
var ( DeviceProfileRandomBoolGenerator = contract.DeviceProfile{} DeviceProfileRandomIntegerGenerator = contract.DeviceProfile{} DeviceProfileRandomUnsignedGenerator = contract.DeviceProfile{} DeviceProfileRandomFloatGenerator = contract.DeviceProfile{} DuplicateDeviceProfileRandomFloatGenerator = contract.DeviceProfile{} NewDeviceProfile = contract.DeviceProfile{} )
View Source
var ( ValidBooleanWatcher = contract.ProvisionWatcher{} ValidIntegerWatcher = contract.ProvisionWatcher{} ValidUnsignedIntegerWatcher = contract.ProvisionWatcher{} ValidFloatWatcher = contract.ProvisionWatcher{} DuplicateFloatWatcher = contract.ProvisionWatcher{} NewProvisionWatcher = contract.ProvisionWatcher{} )
View Source
var ( ValueDescriptorEnableRandomization = contract.ValueDescriptor{} ValueDescriptorBool = contract.ValueDescriptor{} ValueDescriptorInt8 = contract.ValueDescriptor{} ValueDescriptorInt16 = contract.ValueDescriptor{} ValueDescriptorInt32 = contract.ValueDescriptor{} ValueDescriptorInt64 = contract.ValueDescriptor{} ValueDescriptorUint8 = contract.ValueDescriptor{} ValueDescriptorUint16 = contract.ValueDescriptor{} ValueDescriptorUint32 = contract.ValueDescriptor{} ValueDescriptorUint64 = contract.ValueDescriptor{} ValueDescriptorFloat32 = contract.ValueDescriptor{} ValueDescriptorFloat64 = contract.ValueDescriptor{} NewValueDescriptor = contract.ValueDescriptor{} DuplicateValueDescriptorInt16 = contract.ValueDescriptor{} )
Functions ¶
func CreateDescriptorsFromProfile ¶
func CreateDescriptorsFromProfile(profile contract.DeviceProfile) error
Types ¶
type AddressableClientMock ¶
type AddressableClientMock struct { }
func (AddressableClientMock) Add ¶
func (AddressableClientMock) Add(addr *contract.Addressable, ctx context.Context) (string, error)
func (AddressableClientMock) Addressable ¶
func (AddressableClientMock) Addressable(id string, ctx context.Context) (contract.Addressable, error)
func (AddressableClientMock) AddressableForName ¶
func (AddressableClientMock) AddressableForName(name string, ctx context.Context) (contract.Addressable, error)
func (AddressableClientMock) Delete ¶
func (AddressableClientMock) Delete(id string, ctx context.Context) error
func (AddressableClientMock) Update ¶
func (AddressableClientMock) Update(addr contract.Addressable, ctx context.Context) error
type DeviceClientMock ¶
type DeviceClientMock struct{}
func (*DeviceClientMock) CheckForDevice ¶
func (*DeviceClientMock) Delete ¶
func (dc *DeviceClientMock) Delete(_ context.Context, _ string) error
func (*DeviceClientMock) DeleteByName ¶
func (dc *DeviceClientMock) DeleteByName(_ context.Context, _ string) error
func (*DeviceClientMock) DeviceForName ¶
func (*DeviceClientMock) DevicesByLabel ¶
func (*DeviceClientMock) DevicesForProfile ¶
func (*DeviceClientMock) DevicesForProfileByName ¶
func (*DeviceClientMock) DevicesForService ¶
func (*DeviceClientMock) DevicesForServiceByName ¶
func (*DeviceClientMock) UpdateAdminState ¶
func (dc *DeviceClientMock) UpdateAdminState(_ context.Context, _ string, _ admin.UpdateRequest) error
func (*DeviceClientMock) UpdateAdminStateByName ¶
func (dc *DeviceClientMock) UpdateAdminStateByName(_ context.Context, _ string, _ admin.UpdateRequest) error
func (*DeviceClientMock) UpdateLastConnected ¶
func (*DeviceClientMock) UpdateLastConnectedByName ¶
func (*DeviceClientMock) UpdateLastReported ¶
func (*DeviceClientMock) UpdateLastReportedByName ¶
func (*DeviceClientMock) UpdateOpState ¶
func (dc *DeviceClientMock) UpdateOpState(_ context.Context, _ string, _ operating.UpdateRequest) error
func (*DeviceClientMock) UpdateOpStateByName ¶
func (dc *DeviceClientMock) UpdateOpStateByName(_ context.Context, _ string, _ operating.UpdateRequest) error
type DeviceProfileClientMock ¶
type DeviceProfileClientMock struct{}
func (DeviceProfileClientMock) Add ¶
func (DeviceProfileClientMock) Add(_ context.Context, _ *contract.DeviceProfile) (string, error)
func (DeviceProfileClientMock) Delete ¶
func (DeviceProfileClientMock) Delete(_ context.Context, _ string) error
func (DeviceProfileClientMock) DeleteByName ¶
func (DeviceProfileClientMock) DeleteByName(_ context.Context, _ string) error
func (DeviceProfileClientMock) DeviceProfile ¶
func (DeviceProfileClientMock) DeviceProfile(_ context.Context, _ string) (contract.DeviceProfile, error)
func (DeviceProfileClientMock) DeviceProfileForName ¶
func (DeviceProfileClientMock) DeviceProfileForName(_ context.Context, _ string) (contract.DeviceProfile, error)
func (DeviceProfileClientMock) DeviceProfiles ¶
func (DeviceProfileClientMock) DeviceProfiles(_ context.Context) ([]contract.DeviceProfile, error)
func (DeviceProfileClientMock) Update ¶
func (DeviceProfileClientMock) Update(_ context.Context, _ contract.DeviceProfile) error
func (DeviceProfileClientMock) UploadFile ¶
type DriverMock ¶
type DriverMock struct{}
func (DriverMock) AddDevice ¶
func (DriverMock) AddDevice(deviceName string, protocols map[string]contract.ProtocolProperties, adminState contract.AdminState) error
func (DriverMock) DisconnectDevice ¶
func (DriverMock) DisconnectDevice(deviceName string, protocols map[string]contract.ProtocolProperties) error
func (DriverMock) HandleReadCommands ¶
func (DriverMock) HandleReadCommands(deviceName string, protocols map[string]contract.ProtocolProperties, reqs []dsModels.CommandRequest) (res []*dsModels.CommandValue, err error)
func (DriverMock) HandleWriteCommands ¶
func (DriverMock) HandleWriteCommands(deviceName string, protocols map[string]contract.ProtocolProperties, reqs []dsModels.CommandRequest, params []*dsModels.CommandValue) error
func (DriverMock) Initialize ¶
func (DriverMock) Initialize(lc logger.LoggingClient, asyncCh chan<- *dsModels.AsyncValues, deviceCh chan<- []dsModels.DiscoveredDevice) error
func (DriverMock) RemoveDevice ¶
func (DriverMock) RemoveDevice(deviceName string, protocols map[string]contract.ProtocolProperties) error
func (DriverMock) Stop ¶
func (DriverMock) Stop(force bool) error
func (DriverMock) UpdateDevice ¶
func (DriverMock) UpdateDevice(deviceName string, protocols map[string]contract.ProtocolProperties, adminState contract.AdminState) error
type EventClientMock ¶
type EventClientMock struct{}
func (EventClientMock) DeleteForDevice ¶
func (e EventClientMock) DeleteForDevice(_ context.Context, _ string) error
func (EventClientMock) DeleteOld ¶
func (e EventClientMock) DeleteOld(_ context.Context, _ int) error
func (EventClientMock) EventCount ¶
func (e EventClientMock) EventCount(_ context.Context) (int, error)
func (EventClientMock) EventCountForDevice ¶
func (EventClientMock) EventsForDevice ¶
func (EventClientMock) EventsForDeviceAndValueDescriptor ¶
func (EventClientMock) EventsForInterval ¶
func (EventClientMock) MarkPushed ¶
func (e EventClientMock) MarkPushed(_ context.Context, _ string) error
func (EventClientMock) MarkPushedByChecksum ¶
func (e EventClientMock) MarkPushedByChecksum(_ context.Context, _ string) error
func (EventClientMock) MarshalEvent ¶
func (e EventClientMock) MarshalEvent(_ contract.Event) ([]byte, error)
type ProvisionWatcherClientMock ¶
type ProvisionWatcherClientMock struct { }
func (ProvisionWatcherClientMock) Add ¶
func (ProvisionWatcherClientMock) Add(_ context.Context, _ *contract.ProvisionWatcher) (string, error)
Add a provision watcher - handle error codes
func (ProvisionWatcherClientMock) Delete ¶
func (ProvisionWatcherClientMock) Delete(_ context.Context, _ string) error
Delete a provision watcher (specified by id)
func (ProvisionWatcherClientMock) ProvisionWatcher ¶
func (ProvisionWatcherClientMock) ProvisionWatcher(_ context.Context, _ string) (contract.ProvisionWatcher, error)
Get the provision watcher by id
func (ProvisionWatcherClientMock) ProvisionWatcherForName ¶
func (ProvisionWatcherClientMock) ProvisionWatcherForName(_ context.Context, _ string) (contract.ProvisionWatcher, error)
Get the provision watcher by name
func (ProvisionWatcherClientMock) ProvisionWatchers ¶
func (ProvisionWatcherClientMock) ProvisionWatchers(_ context.Context) ([]contract.ProvisionWatcher, error)
Get a list of all provision watchers
func (ProvisionWatcherClientMock) ProvisionWatchersForProfile ¶
func (ProvisionWatcherClientMock) ProvisionWatchersForProfile(_ context.Context, _ string) ([]contract.ProvisionWatcher, error)
Get the provision watchers for a profile
func (ProvisionWatcherClientMock) ProvisionWatchersForProfileByName ¶
func (ProvisionWatcherClientMock) ProvisionWatchersForProfileByName(_ context.Context, _ string) ([]contract.ProvisionWatcher, error)
Get the provision watchers for a profile (by name)
func (ProvisionWatcherClientMock) ProvisionWatchersForService ¶
func (ProvisionWatcherClientMock) ProvisionWatchersForService(_ context.Context, _ string) ([]contract.ProvisionWatcher, error)
Get the provision watchers that are on a service
func (ProvisionWatcherClientMock) ProvisionWatchersForServiceByName ¶
func (ProvisionWatcherClientMock) ProvisionWatchersForServiceByName(_ context.Context, _ string) ([]contract.ProvisionWatcher, error)
Get the provision watchers that are on a service(by name)
func (ProvisionWatcherClientMock) Update ¶
func (ProvisionWatcherClientMock) Update(_ context.Context, _ contract.ProvisionWatcher) error
Update a provision watcher - handle error codes
type ValueDescriptorMock ¶
type ValueDescriptorMock struct{}
func (ValueDescriptorMock) Add ¶
func (ValueDescriptorMock) Add(_ context.Context, _ *contract.ValueDescriptor) (string, error)
func (ValueDescriptorMock) Delete ¶
func (ValueDescriptorMock) Delete(_ context.Context, _ string) error
func (ValueDescriptorMock) DeleteByName ¶
func (ValueDescriptorMock) DeleteByName(_ context.Context, _ string) error
func (ValueDescriptorMock) Update ¶
func (ValueDescriptorMock) Update(_ context.Context, _ *contract.ValueDescriptor) error
func (ValueDescriptorMock) ValueDescriptor ¶
func (ValueDescriptorMock) ValueDescriptor(_ context.Context, _ string) (contract.ValueDescriptor, error)
func (ValueDescriptorMock) ValueDescriptorForName ¶
func (ValueDescriptorMock) ValueDescriptorForName(_ context.Context, _ string) (contract.ValueDescriptor, error)
func (ValueDescriptorMock) ValueDescriptors ¶
func (ValueDescriptorMock) ValueDescriptors(_ context.Context) ([]contract.ValueDescriptor, error)
func (ValueDescriptorMock) ValueDescriptorsByLabel ¶
func (ValueDescriptorMock) ValueDescriptorsByLabel(_ context.Context, _ string) ([]contract.ValueDescriptor, error)
func (ValueDescriptorMock) ValueDescriptorsByUomLabel ¶
func (ValueDescriptorMock) ValueDescriptorsByUomLabel(_ context.Context, _ string) ([]contract.ValueDescriptor, error)
func (ValueDescriptorMock) ValueDescriptorsForDevice ¶
func (ValueDescriptorMock) ValueDescriptorsForDevice(_ context.Context, _ string) ([]contract.ValueDescriptor, error)
func (ValueDescriptorMock) ValueDescriptorsForDeviceByName ¶
func (ValueDescriptorMock) ValueDescriptorsForDeviceByName(_ context.Context, _ string) ([]contract.ValueDescriptor, error)
func (ValueDescriptorMock) ValueDescriptorsUsage ¶
Click to show internal directories.
Click to hide internal directories.