mocks

package
v0.0.0-...-81dd437 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAuth

func NewAuth(users map[string]string, authz map[string][]SubjectSet) mainflux.AuthServiceClient

NewAuth creates mock of auth service.

func NewClient

func NewClient(key map[string]string, conns map[string]string) auth.Client

func NewEventStore

func NewEventStore() redis.EventStore

func NewRepo

func NewRepo(subs map[string][]mqtt.Subscription) mqtt.Repository

Types

type MockClient

type MockClient struct {
	// contains filtered or unexported fields
}

func (MockClient) GetConnByKey

func (cli MockClient) GetConnByKey(ctx context.Context, key string) (mainflux.ConnByKeyRes, error)

func (MockClient) Identify

func (cli MockClient) Identify(ctx context.Context, thingKey string) (string, error)

type MockEventStore

type MockEventStore struct{}

func (MockEventStore) Connect

func (es MockEventStore) Connect(clientID string) error

func (MockEventStore) Disconnect

func (es MockEventStore) Disconnect(clientID string) error

type SubjectSet

type SubjectSet struct {
	Object   string
	Relation string
}

Jump to

Keyboard shortcuts

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