Skip to content

Commit aa65ed3

Browse files
committed
Create push notification service
1 parent 2a6a141 commit aa65ed3

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

config.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@ infura:
33
database:
44
url: "postgresql://username:password@localhost:5432/dbname"
55
sendgrid:
6-
api_key: "YOUR_SENDGRID_API_KEY"
6+
api_key: "YOUR_SENDGRID_API_KEY"
7+
push_notification:
8+
provider: "firebase" # or other provider
9+
api_key: "YOUR_PUSH_NOTIFICATION_API_KEY"

services/push_notification.go

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// services/push_notification.go
2+
package services
3+
4+
import "github.com/Jetlum/WalletAlertService/models"
5+
6+
type PushNotifier interface {
7+
Send(event *models.Event, userPref *models.UserPreference) error
8+
}
9+
10+
type PushNotification struct {
11+
// Firebase or other push service configuration
12+
}
13+
14+
func NewPushNotification(config Config) *PushNotification {
15+
return &PushNotification{
16+
// Initialize push service
17+
}
18+
}
19+
20+
func (pn *PushNotification) Send(event *models.Event, userPref *models.UserPreference) error {
21+
// Implement push notification sending
22+
return nil
23+
}

0 commit comments

Comments
 (0)