mocks

package
v0.0.0-...-4ee07f5 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: Apache-2.0 Imports: 4 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 Notifier

type Notifier struct {
	mock.Mock
}

Notifier is an autogenerated mock type for the Notifier type

func NewNotifier

func NewNotifier(t interface {
	mock.TestingT
	Cleanup(func())
}) *Notifier

NewNotifier creates a new instance of Notifier. 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 (*Notifier) Notify

func (_m *Notifier) Notify(from string, to []string, msg *messaging.Message) error

Notify provides a mock function with given fields: from, to, msg

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) ConsumeBlocking

func (_m *Service) ConsumeBlocking(ctx context.Context, messages interface{}) error

ConsumeBlocking provides a mock function with given fields: ctx, messages

func (*Service) CreateSubscription

func (_m *Service) CreateSubscription(ctx context.Context, token string, sub notifiers.Subscription) (string, error)

CreateSubscription provides a mock function with given fields: ctx, token, sub

func (*Service) ListSubscriptions

func (_m *Service) ListSubscriptions(ctx context.Context, token string, pm notifiers.PageMetadata) (notifiers.Page, error)

ListSubscriptions provides a mock function with given fields: ctx, token, pm

func (*Service) RemoveSubscription

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

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

func (*Service) ViewSubscription

func (_m *Service) ViewSubscription(ctx context.Context, token string, id string) (notifiers.Subscription, error)

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

type SubscriptionsRepository

type SubscriptionsRepository struct {
	mock.Mock
}

SubscriptionsRepository is an autogenerated mock type for the SubscriptionsRepository type

func NewSubscriptionsRepository

func NewSubscriptionsRepository(t interface {
	mock.TestingT
	Cleanup(func())
}) *SubscriptionsRepository

NewSubscriptionsRepository creates a new instance of SubscriptionsRepository. 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 (*SubscriptionsRepository) Remove

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

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

func (*SubscriptionsRepository) Retrieve

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

func (*SubscriptionsRepository) RetrieveAll

RetrieveAll provides a mock function with given fields: ctx, pm

func (*SubscriptionsRepository) Save

Save provides a mock function with given fields: ctx, sub

Jump to

Keyboard shortcuts

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