mocks

package
v0.45.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: Apache-2.0 Imports: 15 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, 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

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