Documentation
¶
Index ¶
- type MockChannel
- type MockDBQuerier
- func (m *MockDBQuerier) DeleteDeviceToken(ctx context.Context, arg database.DeleteDeviceTokenParams) error
- func (m *MockDBQuerier) GetDeviceTokensByUserID(ctx context.Context, userID uuid.UUID) (string, error)
- func (m *MockDBQuerier) RegisterDeviceToken(ctx context.Context, arg database.RegisterDeviceTokenParams) (database.DeviceToken, error)
- func (m *MockDBQuerier) SendNotification(ctx context.Context) error
- type MockFCMClient
- type MockFirebaseClient
- type MockQueries
- func (m *MockQueries) DeleteDeviceToken(ctx context.Context, arg database.DeleteDeviceTokenParams) error
- func (m *MockQueries) GetDeviceTokensByUserID(ctx context.Context, userID uuid.UUID) (string, error)
- func (m *MockQueries) RegisterDeviceToken(ctx context.Context, arg database.RegisterDeviceTokenParams) (database.DeviceToken, error)
- func (m *MockQueries) SendNotification(ctx context.Context) error
- type MockRabbitMQ
- type MockRabbitMQClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockChannel ¶
MockChannel mocks the RabbitMQ Channel
type MockDBQuerier ¶
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 ¶
func (m *MockDBQuerier) RegisterDeviceToken(ctx context.Context, arg database.RegisterDeviceTokenParams) (database.DeviceToken, error)
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 ¶
MockFCMClient mocks the Firebase Cloud Messaging client
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 ¶
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 ¶
func (m *MockQueries) RegisterDeviceToken(ctx context.Context, arg database.RegisterDeviceTokenParams) (database.DeviceToken, error)
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) GetChannel ¶
func (m *MockRabbitMQ) GetChannel() *amqp.Channel
GetChannel returns the mock channel
type MockRabbitMQClient ¶
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