mocks

package
v0.28.3 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2025 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) protomfx.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) GetPubConfByKey added in v0.24.0

func (cli MockClient) GetPubConfByKey(ctx context.Context, key string) (protomfx.PubConfByKeyRes, 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