mocks

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeConnector

type FakeConnector struct {
	mock.Mock
	SendError error
	RecvError error
}

FakeConnector represents a mocking type for the connector service

func (*FakeConnector) SendPublishData

func (fc *FakeConnector) SendPublishData(id string, data []entities.Data) error

SendPublishData provides a mock function to send a publish data command to connector

func (*FakeConnector) SendRegisterDevice

func (fc *FakeConnector) SendRegisterDevice(id, name string) (err error)

SendRegisterDevice provides a mock function to send register device command to connector

func (*FakeConnector) SendUnregisterDevice

func (fc *FakeConnector) SendUnregisterDevice(id string) error

SendUnregisterDevice provides a mock function to send unregister device command to connector

func (*FakeConnector) SendUpdateSchema

func (fc *FakeConnector) SendUpdateSchema(id string, schemaList []entities.Schema) (err error)

SendUpdateSchema provides a mock function to send an update schema command to connector

type FakeLogger

type FakeLogger struct {
	mock.Mock
}

FakeLogger represents a mocking type for the logging service

func (*FakeLogger) Debug

func (fl *FakeLogger) Debug(...interface{})

Debug provides a mock function for the debugging Info capability

func (*FakeLogger) Error

func (fl *FakeLogger) Error(...interface{})

Error provides a mock function for the debugging Info capability

func (*FakeLogger) Errorf

func (fl *FakeLogger) Errorf(string, ...interface{})

Errorf provides a mock function for the debugging Info capability

func (*FakeLogger) Info

func (fl *FakeLogger) Info(...interface{})

Info provides a mock function for the debugging Info capability

func (*FakeLogger) Infof

func (fl *FakeLogger) Infof(string, ...interface{})

Infof provides a mock function for the debugging Info capability

func (*FakeLogger) Warn

func (fl *FakeLogger) Warn(...interface{})

Warn provides a mock function for the debugging Info capability

type FakePublisher

type FakePublisher struct {
	mock.Mock
	ReturnErr error
	SendError error
	Token     string
	Err       error
}

FakePublisher represents a mocking type for the publisher service

func (*FakePublisher) SendAuthStatus

func (fp *FakePublisher) SendAuthStatus(thingID string, err error) error

SendAuthStatus provides a mock function to send auth thing command response

func (*FakePublisher) SendDevicesList

func (fp *FakePublisher) SendDevicesList(things []*entities.Thing, err error) error

SendDevicesList provides a mock function to send a list things response

func (*FakePublisher) SendRegisteredDevice

func (fp *FakePublisher) SendRegisteredDevice(thingID, token string, err error) error

SendRegisteredDevice provides a mock function to send a register device response

func (*FakePublisher) SendRequestData

func (fp *FakePublisher) SendRequestData(thingID string, sensorIds []int) error

SendRequestData provides a mock function to send a request data command

func (*FakePublisher) SendUnregisteredDevice

func (fp *FakePublisher) SendUnregisteredDevice(thingID string, err error) error

SendUnregisteredDevice provides a mock function to send an unregister device response

func (*FakePublisher) SendUpdateData

func (fp *FakePublisher) SendUpdateData(thingID string, data []entities.Data) error

SendUpdateData provides a mock function to send an update data command

func (*FakePublisher) SendUpdatedSchema

func (fp *FakePublisher) SendUpdatedSchema(thingID string, err error) error

SendUpdatedSchema provides a mock function to send an update schema response

type FakeThingProxy

type FakeThingProxy struct {
	mock.Mock
	ReturnErr error
	CreateErr error
	Thing     *entities.Thing
}

FakeThingProxy represents a mocking type for the thing's proxy service

func (*FakeThingProxy) Create

func (ftp *FakeThingProxy) Create(id, name, authorization string) (idGenerated string, err error)

Create provides a mock function to create a thing on the thing's service

func (*FakeThingProxy) Get

func (ftp *FakeThingProxy) Get(authorization, thingID string) (*entities.Thing, error)

Get provides a mock function to receive a thing from the thing's service

func (*FakeThingProxy) List

func (ftp *FakeThingProxy) List(authorization string) ([]*entities.Thing, error)

List provides a mock function to list things from the thing's service

func (*FakeThingProxy) Remove

func (ftp *FakeThingProxy) Remove(authorization, thingID string) error

Remove provides a mock function to remove a thing on the thing's service

func (*FakeThingProxy) UpdateSchema

func (ftp *FakeThingProxy) UpdateSchema(authorization, thingID string, schema []entities.Schema) error

UpdateSchema provides a mock function to update thing's schema on the thing's service

Jump to

Keyboard shortcuts

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