Documentation
¶
Index ¶
- Variables
- type DatabaseMock
- func (this *DatabaseMock) CheckDeploymentAccess(user string, deploymentId string) (error, int)
- func (this *DatabaseMock) DeleteDependencies(id string) error
- func (this *DatabaseMock) DeleteDeployment(id string, syncDeleteHandler func(messages.DeploymentCommand) error) error
- func (this *DatabaseMock) GetDependencies(user string, deploymentId string) (dependencymodel.Dependencies, error, int)
- func (this *DatabaseMock) GetDependenciesList(user string, limit int, offset int) (result []dependencymodel.Dependencies, err error, code int)
- func (this *DatabaseMock) GetDeployment(user string, deploymentId string) (deployment *deploymentmodel.Deployment, err error, code int)
- func (this *DatabaseMock) GetDeploymentIds(user string) (deployments []string, err error)
- func (this *DatabaseMock) GetSelectedDependencies(user string, ids []string) (result []dependencymodel.Dependencies, err error, code int)
- func (this *DatabaseMock) ListDeployments(user string, options model.DeploymentListOptions) (deployments []deploymentmodel.Deployment, err error)
- func (this *DatabaseMock) New(ctx context.Context, config config.Config) (interfaces.Database, error)
- func (this *DatabaseMock) RetryDeploymentSync(lockduration time.Duration, ...) error
- func (this *DatabaseMock) SetDependencies(dependencies dependencymodel.Dependencies) error
- func (this *DatabaseMock) SetDeployment(depl messages.DeploymentCommand, ...) error
- type DeviceRepoMock
- func (this *DeviceRepoMock) CheckAccess(token auth.Token, kind string, ids []string) (map[string]bool, error)
- func (this *DeviceRepoMock) GetAspectNode(token auth.Token, id string) (aspectNode devicemodel.AspectNode, err error)
- func (this *DeviceRepoMock) GetBulkDeviceSelection(token auth.Token, bulk deviceselectionmodel.BulkRequest) (result deviceselectionmodel.BulkResult, err error, code int)
- func (this *DeviceRepoMock) GetBulkDeviceSelectionV2(token auth.Token, bulk deviceselectionmodel.BulkRequestV2) (result deviceselectionmodel.BulkResult, err error, code int)
- func (this *DeviceRepoMock) GetDevice(token auth.Token, id string) (devicemodel.Device, error, int)
- func (this *DeviceRepoMock) GetDeviceGroup(token auth.Token, id string) (result devicemodel.DeviceGroup, err error, code int)
- func (this *DeviceRepoMock) GetDeviceSelection(token auth.Token, descriptions deviceselectionmodel.FilterCriteriaAndSet, ...) (result []deviceselectionmodel.Selectable, err error, code int)
- func (this *DeviceRepoMock) GetService(token auth.Token, id string) (devicemodel.Service, error, int)
- func (this *DeviceRepoMock) New(ctx context.Context, config config.Config) (interfaces.Devices, error)
- func (this *DeviceRepoMock) SetDevice(id string, device devicemodel.Device, userId string) error
- func (this *DeviceRepoMock) SetOptions(options []deviceselectionmodel.Selectable)
- func (this *DeviceRepoMock) SetService(id string, service devicemodel.Service) error
- type ImportsMock
- func (this *ImportsMock) CheckAccess(_ auth.Token, ids []string, alsoCheckTypes bool) (b bool, err error)
- func (this *ImportsMock) New(_ config.Config) (interfaces.Imports, error)
- func (this *ImportsMock) SetImportTypeIds(importTypeIds []string)
- func (this *ImportsMock) SetImports(imports []importmodel.Import)
- type KafkaMock
- func (this *KafkaMock) GetProduced(topic string) []string
- func (this *KafkaMock) NewConsumer(ctx context.Context, config config.Config, topic string, ...) error
- func (this *KafkaMock) NewDeploymentProducer(ctx context.Context, config config.Config) (interfaces.DeploymentProducer, error)
- func (this *KafkaMock) NewDeviceGroupConsumer(ctx context.Context, config config.Config, listener func(groupId string) error) error
- func (this *KafkaMock) NewProducer(ctx context.Context, config config.Config, topic string) (interfaces.Producer, error)
- func (this *KafkaMock) NewUserCommandConsumer(ctx context.Context, config config.Config, ...) error
- type MockEngine
- type MockEventDepl
- func (this *MockEventDepl) DeleteDeployment(token string, userId string, deplId string) (err error, code int)
- func (this *MockEventDepl) Deploy(token string, depl eventdeployment.Deployment) (err error, code int)
- func (this *MockEventDepl) UpdateDeploymentsOfDeviceGroup(token string, dgId string) (err error, code int)
- type ProcessModelRepoMock
- func (this *ProcessModelRepoMock) GetProcessModel(impersonate auth.Token, id string) (result processmodel.ProcessModel, err error, errCode int)
- func (this *ProcessModelRepoMock) New(ctx context.Context, config config.Config) (interfaces.ProcessRepo, error)
- func (this *ProcessModelRepoMock) SetProcessModel(id string, processmodel processmodel.ProcessModel)
- type Producer
Constants ¶
This section is empty.
Variables ¶
View Source
var Database = &DatabaseMock{ Deployments: map[string]messages.DeploymentCommand{}, Dependencies: map[string]dependencymodel.Dependencies{}, }
View Source
var Devices = &DeviceRepoMock{}
View Source
var Engine = &MockEngine{}
View Source
var EventDepl = &MockEventDepl{}
View Source
var Imports = &ImportsMock{}
View Source
var Kafka = &KafkaMock{Produced: map[string][]string{}, Listeners: map[string][]func(msg []byte) error{}}
View Source
var ProcessModelRepo = &ProcessModelRepoMock{models: map[string]processmodel.ProcessModel{}}
Functions ¶
This section is empty.
Types ¶
type DatabaseMock ¶
type DatabaseMock struct {
Deployments map[string]messages.DeploymentCommand
Dependencies map[string]dependencymodel.Dependencies
// contains filtered or unexported fields
}
func (*DatabaseMock) CheckDeploymentAccess ¶
func (this *DatabaseMock) CheckDeploymentAccess(user string, deploymentId string) (error, int)
func (*DatabaseMock) DeleteDependencies ¶
func (this *DatabaseMock) DeleteDependencies(id string) error
func (*DatabaseMock) DeleteDeployment ¶
func (this *DatabaseMock) DeleteDeployment(id string, syncDeleteHandler func(messages.DeploymentCommand) error) error
func (*DatabaseMock) GetDependencies ¶
func (this *DatabaseMock) GetDependencies(user string, deploymentId string) (dependencymodel.Dependencies, error, int)
func (*DatabaseMock) GetDependenciesList ¶
func (this *DatabaseMock) GetDependenciesList(user string, limit int, offset int) (result []dependencymodel.Dependencies, err error, code int)
func (*DatabaseMock) GetDeployment ¶
func (this *DatabaseMock) GetDeployment(user string, deploymentId string) (deployment *deploymentmodel.Deployment, err error, code int)
func (*DatabaseMock) GetDeploymentIds ¶
func (this *DatabaseMock) GetDeploymentIds(user string) (deployments []string, err error)
func (*DatabaseMock) GetSelectedDependencies ¶
func (this *DatabaseMock) GetSelectedDependencies(user string, ids []string) (result []dependencymodel.Dependencies, err error, code int)
func (*DatabaseMock) ListDeployments ¶ added in v0.0.14
func (this *DatabaseMock) ListDeployments(user string, options model.DeploymentListOptions) (deployments []deploymentmodel.Deployment, err error)
func (*DatabaseMock) New ¶
func (this *DatabaseMock) New(ctx context.Context, config config.Config) (interfaces.Database, error)
func (*DatabaseMock) RetryDeploymentSync ¶ added in v0.0.16
func (this *DatabaseMock) RetryDeploymentSync(lockduration time.Duration, syncDeleteHandler func(messages.DeploymentCommand) error, syncHandler func(messages.DeploymentCommand) error) error
func (*DatabaseMock) SetDependencies ¶
func (this *DatabaseMock) SetDependencies(dependencies dependencymodel.Dependencies) error
func (*DatabaseMock) SetDeployment ¶
func (this *DatabaseMock) SetDeployment(depl messages.DeploymentCommand, syncHandler func(messages.DeploymentCommand) error) error
type DeviceRepoMock ¶
type DeviceRepoMock struct {
// contains filtered or unexported fields
}
func (*DeviceRepoMock) CheckAccess ¶
func (*DeviceRepoMock) GetAspectNode ¶
func (this *DeviceRepoMock) GetAspectNode(token auth.Token, id string) (aspectNode devicemodel.AspectNode, err error)
func (*DeviceRepoMock) GetBulkDeviceSelection ¶
func (this *DeviceRepoMock) GetBulkDeviceSelection(token auth.Token, bulk deviceselectionmodel.BulkRequest) (result deviceselectionmodel.BulkResult, err error, code int)
func (*DeviceRepoMock) GetBulkDeviceSelectionV2 ¶
func (this *DeviceRepoMock) GetBulkDeviceSelectionV2(token auth.Token, bulk deviceselectionmodel.BulkRequestV2) (result deviceselectionmodel.BulkResult, err error, code int)
func (*DeviceRepoMock) GetDevice ¶
func (this *DeviceRepoMock) GetDevice(token auth.Token, id string) (devicemodel.Device, error, int)
func (*DeviceRepoMock) GetDeviceGroup ¶
func (this *DeviceRepoMock) GetDeviceGroup(token auth.Token, id string) (result devicemodel.DeviceGroup, err error, code int)
func (*DeviceRepoMock) GetDeviceSelection ¶
func (this *DeviceRepoMock) GetDeviceSelection(token auth.Token, descriptions deviceselectionmodel.FilterCriteriaAndSet, filterByInteraction devicemodel.Interaction) (result []deviceselectionmodel.Selectable, err error, code int)
func (*DeviceRepoMock) GetService ¶
func (this *DeviceRepoMock) GetService(token auth.Token, id string) (devicemodel.Service, error, int)
func (*DeviceRepoMock) New ¶
func (this *DeviceRepoMock) New(ctx context.Context, config config.Config) (interfaces.Devices, error)
func (*DeviceRepoMock) SetDevice ¶
func (this *DeviceRepoMock) SetDevice(id string, device devicemodel.Device, userId string) error
func (*DeviceRepoMock) SetOptions ¶
func (this *DeviceRepoMock) SetOptions(options []deviceselectionmodel.Selectable)
func (*DeviceRepoMock) SetService ¶
func (this *DeviceRepoMock) SetService(id string, service devicemodel.Service) error
type ImportsMock ¶
type ImportsMock struct {
// contains filtered or unexported fields
}
func (*ImportsMock) CheckAccess ¶
func (*ImportsMock) New ¶
func (this *ImportsMock) New(_ config.Config) (interfaces.Imports, error)
func (*ImportsMock) SetImportTypeIds ¶
func (this *ImportsMock) SetImportTypeIds(importTypeIds []string)
func (*ImportsMock) SetImports ¶
func (this *ImportsMock) SetImports(imports []importmodel.Import)
type KafkaMock ¶
type KafkaMock struct {
Produced map[string][]string
Listeners map[string][]func(msg []byte) error
// contains filtered or unexported fields
}
func (*KafkaMock) GetProduced ¶
func (*KafkaMock) NewConsumer ¶
func (*KafkaMock) NewDeploymentProducer ¶ added in v0.0.16
func (this *KafkaMock) NewDeploymentProducer(ctx context.Context, config config.Config) (interfaces.DeploymentProducer, error)
func (*KafkaMock) NewDeviceGroupConsumer ¶ added in v0.0.16
func (*KafkaMock) NewProducer ¶
type MockEngine ¶ added in v0.0.16
type MockEngine struct{}
func (*MockEngine) DeleteDeployment ¶ added in v0.0.16
func (*MockEngine) Deploy ¶ added in v0.0.16
func (this *MockEngine) Deploy(token string, depl engine.DeploymentMessage) (err error, code int)
type MockEventDepl ¶ added in v0.0.16
type MockEventDepl struct{}
func (*MockEventDepl) DeleteDeployment ¶ added in v0.0.16
func (*MockEventDepl) Deploy ¶ added in v0.0.16
func (this *MockEventDepl) Deploy(token string, depl eventdeployment.Deployment) (err error, code int)
func (*MockEventDepl) UpdateDeploymentsOfDeviceGroup ¶ added in v0.0.16
func (this *MockEventDepl) UpdateDeploymentsOfDeviceGroup(token string, dgId string) (err error, code int)
type ProcessModelRepoMock ¶
type ProcessModelRepoMock struct {
// contains filtered or unexported fields
}
func (*ProcessModelRepoMock) GetProcessModel ¶
func (this *ProcessModelRepoMock) GetProcessModel(impersonate auth.Token, id string) (result processmodel.ProcessModel, err error, errCode int)
func (*ProcessModelRepoMock) New ¶
func (this *ProcessModelRepoMock) New(ctx context.Context, config config.Config) (interfaces.ProcessRepo, error)
func (*ProcessModelRepoMock) SetProcessModel ¶
func (this *ProcessModelRepoMock) SetProcessModel(id string, processmodel processmodel.ProcessModel)
Click to show internal directories.
Click to hide internal directories.