mocks

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDefinition

func CreateDefinition(channels []string, subtopics []string) twins.Definition

CreateDefinition creates twin definition

func CreateMessage

func CreateMessage(attr twins.Attribute, recs []senml.Record) (*messaging.Message, error)

CreateMessage creates Mainflux message using SenML record array

func CreateSenML

func CreateSenML(n int, recs []senml.Record)

CreateSenML creates SenML record array

func CreateTwin

func CreateTwin(channels []string, subtopics []string) twins.Twin

CreateTwin creates twin

func NewAuthNServiceClient

func NewAuthNServiceClient(users map[string]string) mainflux.AuthNServiceClient

NewAuthNServiceClient creates mock of auth service.

func NewBroker

func NewBroker(sub map[string]string) messaging.Publisher

NewBroker returns mock message publisher.

func NewService

func NewService(tokens map[string]string) twins.Service

NewService use mock dependencies to create real twins service

func NewStateRepository

func NewStateRepository() twins.StateRepository

NewStateRepository creates in-memory twin repository.

func NewTwinCache

func NewTwinCache() twins.TwinCache

NewTwinCache returns mock cache instance.

func NewTwinRepository

func NewTwinRepository() twins.TwinRepository

NewTwinRepository creates in-memory twin repository.

Types

This section is empty.

Jump to

Keyboard shortcuts

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