Documentation ¶
Index ¶
- Constants
- Variables
- 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(dev *contract.Device, ctx context.Context) (string, error)
- func (dc *DeviceClientMock) CheckForDevice(token string, ctx context.Context) (contract.Device, error)
- func (dc *DeviceClientMock) Delete(id string, ctx context.Context) error
- func (dc *DeviceClientMock) DeleteByName(name string, ctx context.Context) error
- func (dc *DeviceClientMock) Device(id string, ctx context.Context) (contract.Device, error)
- func (dc *DeviceClientMock) DeviceForName(name string, ctx context.Context) (contract.Device, error)
- func (dc *DeviceClientMock) Devices(ctx context.Context) ([]contract.Device, error)
- func (dc *DeviceClientMock) DevicesByLabel(label string, ctx context.Context) ([]contract.Device, error)
- func (dc *DeviceClientMock) DevicesForProfile(profileid string, ctx context.Context) ([]contract.Device, error)
- func (dc *DeviceClientMock) DevicesForProfileByName(profileName string, ctx context.Context) ([]contract.Device, error)
- func (dc *DeviceClientMock) DevicesForService(serviceid string, ctx context.Context) ([]contract.Device, error)
- func (dc *DeviceClientMock) DevicesForServiceByName(serviceName string, ctx context.Context) ([]contract.Device, error)
- func (dc *DeviceClientMock) Update(dev contract.Device, ctx context.Context) error
- func (dc *DeviceClientMock) UpdateAdminState(id string, adminState string, ctx context.Context) error
- func (dc *DeviceClientMock) UpdateAdminStateByName(name string, adminState string, ctx context.Context) error
- func (dc *DeviceClientMock) UpdateLastConnected(id string, time int64, ctx context.Context) error
- func (dc *DeviceClientMock) UpdateLastConnectedByName(name string, time int64, ctx context.Context) error
- func (dc *DeviceClientMock) UpdateLastReported(id string, time int64, ctx context.Context) error
- func (dc *DeviceClientMock) UpdateLastReportedByName(name string, time int64, ctx context.Context) error
- func (dc *DeviceClientMock) UpdateOpState(id string, opState string, ctx context.Context) error
- func (dc *DeviceClientMock) UpdateOpStateByName(name string, opState string, ctx context.Context) error
- type DeviceProfileClientMock
- func (DeviceProfileClientMock) Add(dp *contract.DeviceProfile, ctx context.Context) (string, error)
- func (DeviceProfileClientMock) Delete(id string, ctx context.Context) error
- func (DeviceProfileClientMock) DeleteByName(name string, ctx context.Context) error
- func (DeviceProfileClientMock) DeviceProfile(id string, ctx context.Context) (contract.DeviceProfile, error)
- func (DeviceProfileClientMock) DeviceProfileForName(name string, ctx context.Context) (contract.DeviceProfile, error)
- func (DeviceProfileClientMock) DeviceProfiles(ctx context.Context) ([]contract.DeviceProfile, error)
- func (DeviceProfileClientMock) Update(dp contract.DeviceProfile, ctx context.Context) error
- func (DeviceProfileClientMock) Upload(yamlString string, ctx context.Context) (string, error)
- func (DeviceProfileClientMock) UploadFile(yamlFilePath string, ctx context.Context) (string, error)
- type DriverMock
- 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) Stop(force bool) error
- type EventClientMock
- func (EventClientMock) Add(event *contract.Event, ctx context.Context) (string, error)
- func (EventClientMock) AddBytes(event []byte, ctx context.Context) (string, error)
- func (EventClientMock) Delete(id string, ctx context.Context) error
- func (EventClientMock) DeleteForDevice(id string, ctx context.Context) error
- func (EventClientMock) DeleteOld(age int, ctx context.Context) error
- func (EventClientMock) Event(id string, ctx context.Context) (contract.Event, error)
- func (EventClientMock) EventCount(ctx context.Context) (int, error)
- func (EventClientMock) EventCountForDevice(deviceId string, ctx context.Context) (int, error)
- func (EventClientMock) Events(ctx context.Context) ([]contract.Event, error)
- func (EventClientMock) EventsForDevice(id string, limit int, ctx context.Context) ([]contract.Event, error)
- func (EventClientMock) EventsForDeviceAndValueDescriptor(deviceId string, vd string, limit int, ctx context.Context) ([]contract.Event, error)
- func (EventClientMock) EventsForInterval(start int, end int, limit int, ctx context.Context) ([]contract.Event, error)
- func (EventClientMock) MarkPushed(id string, ctx context.Context) error
- func (EventClientMock) MarkPushedByChecksum(id string, ctx context.Context) error
- func (EventClientMock) MarshalEvent(e contract.Event) ([]byte, error)
- type ValueDescriptorMock
- func (ValueDescriptorMock) Add(vdr *contract.ValueDescriptor, ctx context.Context) (string, error)
- func (ValueDescriptorMock) Delete(id string, ctx context.Context) error
- func (ValueDescriptorMock) DeleteByName(name string, ctx context.Context) error
- func (ValueDescriptorMock) Update(vdr *contract.ValueDescriptor, ctx context.Context) error
- func (ValueDescriptorMock) ValueDescriptor(id string, ctx context.Context) (contract.ValueDescriptor, error)
- func (ValueDescriptorMock) ValueDescriptorForName(name string, ctx context.Context) (contract.ValueDescriptor, error)
- func (ValueDescriptorMock) ValueDescriptors(ctx context.Context) ([]contract.ValueDescriptor, error)
- func (ValueDescriptorMock) ValueDescriptorsByLabel(label string, ctx context.Context) ([]contract.ValueDescriptor, error)
- func (ValueDescriptorMock) ValueDescriptorsByUomLabel(uomLabel string, ctx context.Context) ([]contract.ValueDescriptor, error)
- func (ValueDescriptorMock) ValueDescriptorsForDevice(deviceId string, ctx context.Context) ([]contract.ValueDescriptor, error)
- func (ValueDescriptorMock) ValueDescriptorsForDeviceByName(deviceName string, ctx context.Context) ([]contract.ValueDescriptor, error)
Constants ¶
View Source
const ( InvalidDeviceId = "1ef435eb-5060-49b0-8d55-8d4e43239800" RandomIntegerGeneratorDeviceId = "79ef304e-3b1e-4765-b509-798109c2467d" RandomFloatGeneratorDeviceId = "9a2b3ef2-6aed-41db-b868-79196c2a8b0a" )
View Source
const Int8Value = int8(123)
Variables ¶
View Source
var ( ValidDeviceRandomBoolGenerator = contract.Device{} ValidDeviceRandomIntegerGenerator = contract.Device{} ValidDeviceRandomUnsignedIntegerGenerator = contract.Device{} ValidDeviceRandomFloatGenerator = contract.Device{} DuplicateDeviceRandomFloatGenerator = contract.Device{} NewValidDevice = 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 ( 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{} //ValueDescriptorString = contract.ValueDescriptor{} NewValueDescriptor = contract.ValueDescriptor{} DuplicateValueDescriptorInt16 = contract.ValueDescriptor{} )
Functions ¶
This section is empty.
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(id string, ctx context.Context) error
func (*DeviceClientMock) DeleteByName ¶
func (dc *DeviceClientMock) DeleteByName(name string, ctx context.Context) error
func (*DeviceClientMock) DeviceForName ¶
func (*DeviceClientMock) DevicesByLabel ¶
func (*DeviceClientMock) DevicesForProfile ¶
func (*DeviceClientMock) DevicesForProfileByName ¶
func (*DeviceClientMock) DevicesForService ¶
func (*DeviceClientMock) DevicesForServiceByName ¶
func (*DeviceClientMock) UpdateAdminState ¶
func (*DeviceClientMock) UpdateAdminStateByName ¶
func (*DeviceClientMock) UpdateLastConnected ¶
func (*DeviceClientMock) UpdateLastConnectedByName ¶
func (*DeviceClientMock) UpdateLastReported ¶
func (*DeviceClientMock) UpdateLastReportedByName ¶
func (*DeviceClientMock) UpdateOpState ¶
func (*DeviceClientMock) UpdateOpStateByName ¶
type DeviceProfileClientMock ¶
type DeviceProfileClientMock struct{}
func (DeviceProfileClientMock) Add ¶
func (DeviceProfileClientMock) Add(dp *contract.DeviceProfile, ctx context.Context) (string, error)
func (DeviceProfileClientMock) Delete ¶
func (DeviceProfileClientMock) Delete(id string, ctx context.Context) error
func (DeviceProfileClientMock) DeleteByName ¶
func (DeviceProfileClientMock) DeleteByName(name string, ctx context.Context) error
func (DeviceProfileClientMock) DeviceProfile ¶
func (DeviceProfileClientMock) DeviceProfile(id string, ctx context.Context) (contract.DeviceProfile, error)
func (DeviceProfileClientMock) DeviceProfileForName ¶
func (DeviceProfileClientMock) DeviceProfileForName(name string, ctx context.Context) (contract.DeviceProfile, error)
func (DeviceProfileClientMock) DeviceProfiles ¶
func (DeviceProfileClientMock) DeviceProfiles(ctx context.Context) ([]contract.DeviceProfile, error)
func (DeviceProfileClientMock) Update ¶
func (DeviceProfileClientMock) Update(dp contract.DeviceProfile, ctx context.Context) error
func (DeviceProfileClientMock) UploadFile ¶
type DriverMock ¶
type DriverMock struct{}
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) error
func (DriverMock) Stop ¶
func (DriverMock) Stop(force bool) error
type EventClientMock ¶
type EventClientMock struct{}
func (EventClientMock) DeleteForDevice ¶
func (EventClientMock) DeleteForDevice(id string, ctx context.Context) error
func (EventClientMock) DeleteOld ¶
func (EventClientMock) DeleteOld(age int, ctx context.Context) error
func (EventClientMock) EventCount ¶
func (EventClientMock) EventCount(ctx context.Context) (int, error)
func (EventClientMock) EventCountForDevice ¶
func (EventClientMock) EventsForDevice ¶
func (EventClientMock) EventsForDeviceAndValueDescriptor ¶
func (EventClientMock) EventsForInterval ¶
func (EventClientMock) MarkPushed ¶
func (EventClientMock) MarkPushed(id string, ctx context.Context) error
func (EventClientMock) MarkPushedByChecksum ¶
func (EventClientMock) MarkPushedByChecksum(id string, ctx context.Context) error
func (EventClientMock) MarshalEvent ¶
func (EventClientMock) MarshalEvent(e contract.Event) ([]byte, error)
type ValueDescriptorMock ¶
type ValueDescriptorMock struct{}
func (ValueDescriptorMock) Add ¶
func (ValueDescriptorMock) Add(vdr *contract.ValueDescriptor, ctx context.Context) (string, error)
func (ValueDescriptorMock) Delete ¶
func (ValueDescriptorMock) Delete(id string, ctx context.Context) error
func (ValueDescriptorMock) DeleteByName ¶
func (ValueDescriptorMock) DeleteByName(name string, ctx context.Context) error
func (ValueDescriptorMock) Update ¶
func (ValueDescriptorMock) Update(vdr *contract.ValueDescriptor, ctx context.Context) error
func (ValueDescriptorMock) ValueDescriptor ¶
func (ValueDescriptorMock) ValueDescriptor(id string, ctx context.Context) (contract.ValueDescriptor, error)
func (ValueDescriptorMock) ValueDescriptorForName ¶
func (ValueDescriptorMock) ValueDescriptorForName(name string, ctx context.Context) (contract.ValueDescriptor, error)
func (ValueDescriptorMock) ValueDescriptors ¶
func (ValueDescriptorMock) ValueDescriptors(ctx context.Context) ([]contract.ValueDescriptor, error)
func (ValueDescriptorMock) ValueDescriptorsByLabel ¶
func (ValueDescriptorMock) ValueDescriptorsByLabel(label string, ctx context.Context) ([]contract.ValueDescriptor, error)
func (ValueDescriptorMock) ValueDescriptorsByUomLabel ¶
func (ValueDescriptorMock) ValueDescriptorsByUomLabel(uomLabel string, ctx context.Context) ([]contract.ValueDescriptor, error)
func (ValueDescriptorMock) ValueDescriptorsForDevice ¶
func (ValueDescriptorMock) ValueDescriptorsForDevice(deviceId string, ctx context.Context) ([]contract.ValueDescriptor, error)
func (ValueDescriptorMock) ValueDescriptorsForDeviceByName ¶
func (ValueDescriptorMock) ValueDescriptorsForDeviceByName(deviceName string, ctx context.Context) ([]contract.ValueDescriptor, error)
Click to show internal directories.
Click to hide internal directories.