mocks

package
v0.0.0-...-573ba1d Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockChannel

type MockChannel struct {
	mock.Mock
}

MockChannel mocks the RabbitMQ Channel

func (*MockChannel) Consume

func (m *MockChannel) Consume(queue, consumer string, autoAck, exclusive, noLocal, noWait bool, args map[string]interface{}) (<-chan messaging.Message, error)

Consume mocks the RabbitMQ Consume method

type MockDBQuerier

type MockDBQuerier struct {
	mock.Mock
}

MockDBQuerier is a mock for the DBQuerier interface

func (*MockDBQuerier) DeleteDeviceToken

func (m *MockDBQuerier) DeleteDeviceToken(ctx context.Context, arg database.DeleteDeviceTokenParams) error

DeleteDeviceToken mocks the DBQuerier interface DeleteDeviceToken method

func (*MockDBQuerier) GetDeviceTokensByUserID

func (m *MockDBQuerier) GetDeviceTokensByUserID(ctx context.Context, userID uuid.UUID) (string, error)

GetDeviceTokensByUserID mocks the DBQuerier interface GetDeviceTokensByUserID method

func (*MockDBQuerier) RegisterDeviceToken

RegisterDeviceToken mocks the DBQuerier interface RegisterDeviceToken method

func (*MockDBQuerier) SendNotification

func (m *MockDBQuerier) SendNotification(ctx context.Context) error

SendNotification mocks the DBQuerier interface SendNotification method

type MockFCMClient

type MockFCMClient struct {
	mock.Mock
}

MockFCMClient mocks the Firebase Cloud Messaging client

func (*MockFCMClient) Send

func (m *MockFCMClient) Send(ctx context.Context, message *messaging.Message) (string, error)

Send mocks the FCM Send method

type MockFirebaseClient

type MockFirebaseClient struct {
	mock.Mock
	FCMClient *MockFCMClient // Add this field to match the real FirebaseClient structure
}

MockFirebaseClient mocks the Firebase client for sending notifications

func NewMockFirebaseClient

func NewMockFirebaseClient() *MockFirebaseClient

NewMockFirebaseClient creates a new mock firebase client

func (*MockFirebaseClient) GetMessagingClient

func (m *MockFirebaseClient) GetMessagingClient() firebase.MessagingClient

GetMessagingClient returns the FCM client for sending messages

type MockQueries

type MockQueries struct {
	mock.Mock
}

MockQueries mocks the database.Queries struct

func NewMockQueries

func NewMockQueries() *MockQueries

NewMockQueries creates and returns a new mock database queries object

func (*MockQueries) DeleteDeviceToken

func (m *MockQueries) DeleteDeviceToken(ctx context.Context, arg database.DeleteDeviceTokenParams) error

DeleteDeviceToken mocks the database method for deleting device tokens

func (*MockQueries) GetDeviceTokensByUserID

func (m *MockQueries) GetDeviceTokensByUserID(ctx context.Context, userID uuid.UUID) (string, error)

GetDeviceTokensByUserID mocks the database method for fetching device tokens

func (*MockQueries) RegisterDeviceToken

RegisterDeviceToken mocks the database method for registering device tokens

func (*MockQueries) SendNotification

func (m *MockQueries) SendNotification(ctx context.Context) error

SendNotification mocks the database method for sending notifications

type MockRabbitMQ

type MockRabbitMQ struct {
	mock.Mock
	Channel *MockChannel
}

MockRabbitMQ mocks the RabbitMQ client

func NewMockRabbitMQ

func NewMockRabbitMQ() *MockRabbitMQ

NewMockRabbitMQ creates a new mock RabbitMQ client

func (*MockRabbitMQ) Close

func (m *MockRabbitMQ) Close()

Close mocks the RabbitMQ Close method

func (*MockRabbitMQ) GetChannel

func (m *MockRabbitMQ) GetChannel() *amqp.Channel

GetChannel returns the mock channel

type MockRabbitMQClient

type MockRabbitMQClient struct {
	mock.Mock
}

MockRabbitMQClient is a mock for the RabbitMQ Client interface

func (*MockRabbitMQClient) Close

func (m *MockRabbitMQClient) Close()

Close mocks the RabbitMQClient Close method

func (*MockRabbitMQClient) GetChannel

func (m *MockRabbitMQClient) GetChannel() *amqp.Channel

GetChannel mocks the RabbitMQClient GetChannel method

Jump to

Keyboard shortcuts

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