mocks

package
v0.42.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAuthService

func NewAuthService(adminID string, userList []users.User, orgList []auth.Org) domain.AuthClient

NewAuthService creates mock of auth service client.

func NewReadersClient added in v0.40.0

func NewReadersClient() domain.ReadersClient

NewReadersClient returns a no-op ReadersClient mock.

func NewThingsService

func NewThingsService(things map[string]things.Thing, profiles map[string]things.Profile, auth domain.AuthClient) things.Service

NewThingsService returns Mainflux Things service mock. Only methods used by SDK are mocked.

func NewThingsServiceClient

func NewThingsServiceClient(profiles map[string]domain.Profile, things map[string]domain.Thing, groups map[string]domain.Group) domain.ThingsClient

NewThingsServiceClient returns mock implementation of things service

func SortItems added in v0.26.0

func SortItems[T any](order, dir string, items []T, getFields func(i int) (string, string)) []T

Types

type Publisher added in v0.42.0

type Publisher interface {
	messaging.CommandPublisher
	messaging.MessageDispatcher
}

Publisher covers the methods this mock's callers (http/mqtt/modbus/downlinks, pkg/sdk tests) use.

func NewPublisher

func NewPublisher() Publisher

NewPublisher returns mock message publisher.

Jump to

Keyboard shortcuts

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