Documentation ¶
Index ¶
- Variables
- func CleanKafkaMock()
- func GetTimescaleMockFactory(responses TimescaleMockResponses) func(ctx context.Context, config util.Config) (timescale.Interface, error)
- func Timescale(ctx context.Context, config util.Config) (timescale.Interface, error)
- type CamundaMock
- func (this *CamundaMock) AddTask(task messages.CamundaExternalTask)
- func (this *CamundaMock) CompleteTask(taskInfo messages.TaskInfo, outputName string, output interface{}) (err error)
- func (this *CamundaMock) Error(externalTaskId string, processInstanceId string, processDefinitionId string, ...)
- func (this *CamundaMock) Get(config util.Config, producer com.ProducerInterface, metrics interfaces.Metrics) (interfaces.CamundaInterface, error)
- func (this *CamundaMock) GetStatus() (fetched map[string]messages.CamundaExternalTask, ...)
- func (this *CamundaMock) GetTasks() (tasks []messages.CamundaExternalTask, err error)
- func (this *CamundaMock) GetWorkerId() string
- func (this *CamundaMock) Init()
- func (this *CamundaMock) SetRetry(taskid string, tenantId string, number int64)
- func (this *CamundaMock) UnlockTask(taskInfo messages.TaskInfo) (err error)
- type KafkaMock
- func (this *KafkaMock) Close()
- func (this *KafkaMock) GetProduced(topic string) []string
- func (this *KafkaMock) Log(logger *log.Logger)
- func (this *KafkaMock) New() *KafkaMock
- func (this *KafkaMock) NewConsumer(ctx context.Context, config util.Config, respListener func(msg string) error, ...) (err error)
- func (this *KafkaMock) NewProducer(ctx context.Context, config util.Config) (com.ProducerInterface, error)
- func (this *KafkaMock) Produce(topic string, message string) error
- func (this *KafkaMock) ProduceWithKey(topic string, key string, message string) error
- func (this *KafkaMock) Stop()
- func (this *KafkaMock) Subscribe(topic string, listener func(msg string) error)
- type MarshallerMock
- func (this *MarshallerMock) MarshalFromServiceAndProtocol(characteristicId string, service model.Service, protocol model.Protocol, ...) (result map[string]string, err error)
- func (this *MarshallerMock) MarshalV2(service model.Service, protocol model.Protocol, ...) (result map[string]string, err error)
- func (this *MarshallerMock) New(ctx context.Context, url string) marshaller.Interface
- func (this *MarshallerMock) UnmarshalFromServiceAndProtocol(characteristicId string, service model.Service, protocol model.Protocol, ...) (characteristicData interface{}, err error)
- func (this *MarshallerMock) UnmarshalV2(request marshaller.UnmarshallingV2Request) (result interface{}, err error)
- type RepoMock
- func (this *RepoMock) Get(configType util.Config) (devicerepository.RepoInterface, error)
- func (this *RepoMock) GetDevice(token devicerepository.Impersonate, id string) (model.Device, error)
- func (this *RepoMock) GetDeviceGroup(token devicerepository.Impersonate, id string) (model.DeviceGroup, error)
- func (this *RepoMock) GetDeviceInfo(instanceId string, serviceId string, user string) (instance model.Device, service model.Service, err error)
- func (this *RepoMock) GetDeviceType(token devicerepository.Impersonate, id string) (model.DeviceType, error)
- func (this *RepoMock) GetProtocol(token devicerepository.Impersonate, id string) (model.Protocol, error)
- func (this *RepoMock) GetService(token devicerepository.Impersonate, device model.Device, serviceId string) (model.Service, error)
- func (this *RepoMock) GetToken(user string) (devicerepository.Impersonate, error)
- func (this *RepoMock) New() *RepoMock
- func (this *RepoMock) RegisterDevice(device model.Device)
- func (this *RepoMock) RegisterDeviceGroup(deviceGroup model.DeviceGroup)
- func (this *RepoMock) RegisterDeviceType(deviceType model.DeviceType)
- func (this *RepoMock) RegisterProtocol(protocol model.Protocol)
- func (this *RepoMock) RegisterService(service model.Service)
- type TimescaleMock
- type TimescaleMockResponses
Constants ¶
This section is empty.
Variables ¶
View Source
var Camunda = &CamundaMock{ResetOnGetInterface: true}
View Source
var Kafka = &KafkaMock{}
View Source
var Marshaller = &MarshallerMock{}
View Source
var Repo = &RepoMock{ResetOnGetRepoInterface: true}
Functions ¶
func CleanKafkaMock ¶
func CleanKafkaMock()
func GetTimescaleMockFactory ¶
Types ¶
type CamundaMock ¶
type CamundaMock struct { ResetOnGetInterface bool Camunda *camunda.Camunda // contains filtered or unexported fields }
func (*CamundaMock) AddTask ¶
func (this *CamundaMock) AddTask(task messages.CamundaExternalTask)
func (*CamundaMock) CompleteTask ¶
func (this *CamundaMock) CompleteTask(taskInfo messages.TaskInfo, outputName string, output interface{}) (err error)
func (*CamundaMock) Get ¶
func (this *CamundaMock) Get(config util.Config, producer com.ProducerInterface, metrics interfaces.Metrics) (interfaces.CamundaInterface, error)
func (*CamundaMock) GetStatus ¶
func (this *CamundaMock) GetStatus() (fetched map[string]messages.CamundaExternalTask, completed map[string]interface{}, failed map[string]messages.CamundaExternalTask)
func (*CamundaMock) GetTasks ¶
func (this *CamundaMock) GetTasks() (tasks []messages.CamundaExternalTask, err error)
func (*CamundaMock) GetWorkerId ¶
func (this *CamundaMock) GetWorkerId() string
func (*CamundaMock) Init ¶
func (this *CamundaMock) Init()
func (*CamundaMock) SetRetry ¶
func (this *CamundaMock) SetRetry(taskid string, tenantId string, number int64)
func (*CamundaMock) UnlockTask ¶
func (this *CamundaMock) UnlockTask(taskInfo messages.TaskInfo) (err error)
type KafkaMock ¶
func (*KafkaMock) GetProduced ¶
func (*KafkaMock) NewConsumer ¶
func (*KafkaMock) NewProducer ¶
func (*KafkaMock) ProduceWithKey ¶
type MarshallerMock ¶
type MarshallerMock struct {
// contains filtered or unexported fields
}
func (*MarshallerMock) MarshalFromServiceAndProtocol ¶
func (this *MarshallerMock) MarshalFromServiceAndProtocol(characteristicId string, service model.Service, protocol model.Protocol, characteristicData interface{}, configurables []marshaller.Configurable) (result map[string]string, err error)
func (*MarshallerMock) MarshalV2 ¶
func (this *MarshallerMock) MarshalV2(service model.Service, protocol model.Protocol, data []marshaller.MarshallingV2RequestData) (result map[string]string, err error)
func (*MarshallerMock) New ¶
func (this *MarshallerMock) New(ctx context.Context, url string) marshaller.Interface
func (*MarshallerMock) UnmarshalFromServiceAndProtocol ¶
func (*MarshallerMock) UnmarshalV2 ¶
func (this *MarshallerMock) UnmarshalV2(request marshaller.UnmarshallingV2Request) (result interface{}, err error)
type RepoMock ¶
type RepoMock struct { ResetOnGetRepoInterface bool // contains filtered or unexported fields }
func (*RepoMock) Get ¶
func (this *RepoMock) Get(configType util.Config) (devicerepository.RepoInterface, error)
func (*RepoMock) GetDevice ¶
func (this *RepoMock) GetDevice(token devicerepository.Impersonate, id string) (model.Device, error)
func (*RepoMock) GetDeviceGroup ¶
func (this *RepoMock) GetDeviceGroup(token devicerepository.Impersonate, id string) (model.DeviceGroup, error)
func (*RepoMock) GetDeviceInfo ¶
func (*RepoMock) GetDeviceType ¶
func (this *RepoMock) GetDeviceType(token devicerepository.Impersonate, id string) (model.DeviceType, error)
func (*RepoMock) GetProtocol ¶
func (this *RepoMock) GetProtocol(token devicerepository.Impersonate, id string) (model.Protocol, error)
func (*RepoMock) GetService ¶
func (this *RepoMock) GetService(token devicerepository.Impersonate, device model.Device, serviceId string) (model.Service, error)
func (*RepoMock) GetToken ¶
func (this *RepoMock) GetToken(user string) (devicerepository.Impersonate, error)
func (*RepoMock) RegisterDevice ¶
func (*RepoMock) RegisterDeviceGroup ¶
func (this *RepoMock) RegisterDeviceGroup(deviceGroup model.DeviceGroup)
func (*RepoMock) RegisterDeviceType ¶
func (this *RepoMock) RegisterDeviceType(deviceType model.DeviceType)
func (*RepoMock) RegisterProtocol ¶
func (*RepoMock) RegisterService ¶
type TimescaleMock ¶
type TimescaleMock struct {
// contains filtered or unexported fields
}
func (*TimescaleMock) Query ¶
func (this *TimescaleMock) Query(token string, request []messages.TimescaleRequest, timeout time.Duration) (result []messages.TimescaleResponse, err error)
type TimescaleMockResponses ¶
Click to show internal directories.
Click to hide internal directories.