mocks

package
v0.46.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 15 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAuthService

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

NewAuthService creates mock of auth service client. Org owners come from orgList, other org roles come from orgMemberships.

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

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