mockis

package
v3.32.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package mockis provides a mock structure to the Identity Server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultGateway

func DefaultGateway(ids *ttnpb.GatewayIdentifiers, locationPublic, updateLocationFromStatus bool) *ttnpb.Gateway

DefaultGateway generates a gateway with values that is adequate for most test cases.

Types

type MockDefinition

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

MockDefinition contains the structure that is returned by the New(ctx) method of the package, might be used to specify IS mock in test cases definitions.

func New

func New(ctx context.Context, opts ...Option) (*MockDefinition, string, closeMock)

New returns an Identity Server mock along side its address and closing function.

func (*MockDefinition) ApplicationRegistry

func (m *MockDefinition) ApplicationRegistry() *mockISApplicationRegistry

ApplicationRegistry returns the methods related to the application registry.

func (*MockDefinition) EndDeviceBatchRegistry added in v3.27.1

func (m *MockDefinition) EndDeviceBatchRegistry() *isEndDeviceBatchRegistry

EndDeviceBatchRegistry returns the methods related to the end device batch registry.

func (*MockDefinition) EndDeviceRegistry

func (m *MockDefinition) EndDeviceRegistry() *mockISEndDeviceRegistry

EndDeviceRegistry returns the methods related to the device registry.

func (*MockDefinition) EntityAccess added in v3.21.0

func (m *MockDefinition) EntityAccess() *mockEntityAccess

EntityAccess returns the methods related to the access entity.

func (*MockDefinition) GatewayRegistry

func (m *MockDefinition) GatewayRegistry() *mockISGatewayRegistry

GatewayRegistry returns the methods related to the gateway registry.

func (*MockDefinition) OrganizationRegistry added in v3.27.2

func (m *MockDefinition) OrganizationRegistry() *mockISOrganizationRegistry

OrganizationRegistry returns the methods related to the organization registry.

func (*MockDefinition) UserRegistry added in v3.27.2

func (m *MockDefinition) UserRegistry() *mockISUserRegistry

UserRegistry returns the methods related to the user registry.

type Option added in v3.32.0

type Option func(*MockDefinition)

Option is a function that can be used to configure the mock.

func WithGatewayTokens added in v3.32.0

func WithGatewayTokens(ks gatewaytokens.KeyService) Option

WithGatewayTokens returns an Option that adds gateway token support.

Jump to

Keyboard shortcuts

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