notification

package
v1.167.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateSubscriptionRequest

type CreateSubscriptionRequest struct {
	UserID   entities.UserID
	Type     entities.SubscriptionType
	Endpoint string
	Keys     map[string]string
}

CreateSubscriptionRequest represents the input for creating a subscription

type CreateSubscriptionResponse

type CreateSubscriptionResponse struct {
	Subscription *entities.Subscription
}

CreateSubscriptionResponse represents the output of creating a subscription

type DeleteSubscriptionRequest

type DeleteSubscriptionRequest struct {
	SubscriptionID entities.SubscriptionID
	UserID         entities.UserID // For authorization
}

DeleteSubscriptionRequest represents the input for deleting a subscription

type DeleteSubscriptionResponse

type DeleteSubscriptionResponse struct {
	Success bool
}

DeleteSubscriptionResponse represents the output of deleting a subscription

type ManageSubscriptionUseCase

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

ManageSubscriptionUseCase handles notification subscription management

func NewManageSubscriptionUseCase

func NewManageSubscriptionUseCase(
	notificationRepo repositories.NotificationRepository,
	userRepo repositories.UserRepository,
	notificationSvc services.NotificationService,
) *ManageSubscriptionUseCase

NewManageSubscriptionUseCase creates a new ManageSubscriptionUseCase

func (*ManageSubscriptionUseCase) CreateSubscription

CreateSubscription creates a new notification subscription

func (*ManageSubscriptionUseCase) DeleteSubscription

DeleteSubscription deletes a notification subscription

type SendNotificationRequest

type SendNotificationRequest struct {
	UserID  entities.UserID
	Title   string
	Body    string
	URL     *string
	Tags    entities.Tags
	IconURL *string
}

SendNotificationRequest represents the input for sending a notification

type SendNotificationResponse

type SendNotificationResponse struct {
	Notification *entities.Notification
	Results      []*services.NotificationResult
	SentCount    int
	FailedCount  int
}

SendNotificationResponse represents the output of sending a notification

type SendNotificationUseCase

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

SendNotificationUseCase handles sending notifications to users

func NewSendNotificationUseCase

func NewSendNotificationUseCase(
	notificationRepo repositories.NotificationRepository,
	userRepo repositories.UserRepository,
	notificationSvc services.NotificationService,
) *SendNotificationUseCase

NewSendNotificationUseCase creates a new SendNotificationUseCase

func (*SendNotificationUseCase) Execute

Execute sends a notification to a user's subscriptions

Jump to

Keyboard shortcuts

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