mocks

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package mocks contains mocks for testing purposes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigRepository

type ConfigRepository struct {
	mock.Mock
}

ConfigRepository is an autogenerated mock type for the ConfigRepository type

func NewConfigRepository

func NewConfigRepository(t interface {
	mock.TestingT
	Cleanup(func())
}) *ConfigRepository

NewConfigRepository creates a new instance of ConfigRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*ConfigRepository) ChangeState

func (_m *ConfigRepository) ChangeState(ctx context.Context, owner string, id string, state bootstrap.State) error

ChangeState provides a mock function with given fields: ctx, owner, id, state

func (*ConfigRepository) DisconnectThing

func (_m *ConfigRepository) DisconnectThing(ctx context.Context, channelID string, thingID string) error

DisconnectThing provides a mock function with given fields: ctx, channelID, thingID

func (*ConfigRepository) ListExisting

func (_m *ConfigRepository) ListExisting(ctx context.Context, owner string, ids []string) ([]bootstrap.Channel, error)

ListExisting provides a mock function with given fields: ctx, owner, ids

func (*ConfigRepository) Remove

func (_m *ConfigRepository) Remove(ctx context.Context, owner string, id string) error

Remove provides a mock function with given fields: ctx, owner, id

func (*ConfigRepository) RemoveChannel

func (_m *ConfigRepository) RemoveChannel(ctx context.Context, id string) error

RemoveChannel provides a mock function with given fields: ctx, id

func (*ConfigRepository) RemoveThing

func (_m *ConfigRepository) RemoveThing(ctx context.Context, id string) error

RemoveThing provides a mock function with given fields: ctx, id

func (*ConfigRepository) RetrieveAll

func (_m *ConfigRepository) RetrieveAll(ctx context.Context, owner string, filter bootstrap.Filter, offset uint64, limit uint64) bootstrap.ConfigsPage

RetrieveAll provides a mock function with given fields: ctx, owner, filter, offset, limit

func (*ConfigRepository) RetrieveByExternalID

func (_m *ConfigRepository) RetrieveByExternalID(ctx context.Context, externalID string) (bootstrap.Config, error)

RetrieveByExternalID provides a mock function with given fields: ctx, externalID

func (*ConfigRepository) RetrieveByID

func (_m *ConfigRepository) RetrieveByID(ctx context.Context, owner string, id string) (bootstrap.Config, error)

RetrieveByID provides a mock function with given fields: ctx, owner, id

func (*ConfigRepository) Save

func (_m *ConfigRepository) Save(ctx context.Context, cfg bootstrap.Config, chsConnIDs []string) (string, error)

Save provides a mock function with given fields: ctx, cfg, chsConnIDs

func (*ConfigRepository) Update

func (_m *ConfigRepository) Update(ctx context.Context, cfg bootstrap.Config) error

Update provides a mock function with given fields: ctx, cfg

func (*ConfigRepository) UpdateCert

func (_m *ConfigRepository) UpdateCert(ctx context.Context, owner string, thingID string, clientCert string, clientKey string, caCert string) (bootstrap.Config, error)

UpdateCert provides a mock function with given fields: ctx, owner, thingID, clientCert, clientKey, caCert

func (*ConfigRepository) UpdateChannel

func (_m *ConfigRepository) UpdateChannel(ctx context.Context, c bootstrap.Channel) error

UpdateChannel provides a mock function with given fields: ctx, c

func (*ConfigRepository) UpdateConnections

func (_m *ConfigRepository) UpdateConnections(ctx context.Context, owner string, id string, channels []bootstrap.Channel, connections []string) error

UpdateConnections provides a mock function with given fields: ctx, owner, id, channels, connections

type Service

type Service struct {
	mock.Mock
}

Service is an autogenerated mock type for the Service type

func NewService

func NewService(t interface {
	mock.TestingT
	Cleanup(func())
}) *Service

NewService creates a new instance of Service. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Service) Add

func (_m *Service) Add(ctx context.Context, token string, cfg bootstrap.Config) (bootstrap.Config, error)

Add provides a mock function with given fields: ctx, token, cfg

func (*Service) Bootstrap

func (_m *Service) Bootstrap(ctx context.Context, externalKey string, externalID string, secure bool) (bootstrap.Config, error)

Bootstrap provides a mock function with given fields: ctx, externalKey, externalID, secure

func (*Service) ChangeState

func (_m *Service) ChangeState(ctx context.Context, token string, id string, state bootstrap.State) error

ChangeState provides a mock function with given fields: ctx, token, id, state

func (*Service) DisconnectThingHandler

func (_m *Service) DisconnectThingHandler(ctx context.Context, channelID string, thingID string) error

DisconnectThingHandler provides a mock function with given fields: ctx, channelID, thingID

func (*Service) List

func (_m *Service) List(ctx context.Context, token string, filter bootstrap.Filter, offset uint64, limit uint64) (bootstrap.ConfigsPage, error)

List provides a mock function with given fields: ctx, token, filter, offset, limit

func (*Service) Remove

func (_m *Service) Remove(ctx context.Context, token string, id string) error

Remove provides a mock function with given fields: ctx, token, id

func (*Service) RemoveChannelHandler

func (_m *Service) RemoveChannelHandler(ctx context.Context, id string) error

RemoveChannelHandler provides a mock function with given fields: ctx, id

func (*Service) RemoveConfigHandler

func (_m *Service) RemoveConfigHandler(ctx context.Context, id string) error

RemoveConfigHandler provides a mock function with given fields: ctx, id

func (*Service) Update

func (_m *Service) Update(ctx context.Context, token string, cfg bootstrap.Config) error

Update provides a mock function with given fields: ctx, token, cfg

func (*Service) UpdateCert

func (_m *Service) UpdateCert(ctx context.Context, token string, thingID string, clientCert string, clientKey string, caCert string) (bootstrap.Config, error)

UpdateCert provides a mock function with given fields: ctx, token, thingID, clientCert, clientKey, caCert

func (*Service) UpdateChannelHandler

func (_m *Service) UpdateChannelHandler(ctx context.Context, channel bootstrap.Channel) error

UpdateChannelHandler provides a mock function with given fields: ctx, channel

func (*Service) UpdateConnections

func (_m *Service) UpdateConnections(ctx context.Context, token string, id string, connections []string) error

UpdateConnections provides a mock function with given fields: ctx, token, id, connections

func (*Service) View

func (_m *Service) View(ctx context.Context, token string, id string) (bootstrap.Config, error)

View provides a mock function with given fields: ctx, token, id

Jump to

Keyboard shortcuts

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