2017-10-09 16:21:56 +00:00
|
|
|
package common
|
|
|
|
|
2017-10-10 15:30:56 +00:00
|
|
|
import (
|
|
|
|
"github.com/NaySoftware/go-fcm"
|
|
|
|
"github.com/status-im/status-go/geth/notification/message"
|
|
|
|
)
|
2017-10-09 16:21:56 +00:00
|
|
|
|
2017-10-10 15:30:56 +00:00
|
|
|
// Notification manages Push Notifications and send messages.
|
2017-10-09 16:21:56 +00:00
|
|
|
type Notification interface {
|
2017-10-10 15:30:56 +00:00
|
|
|
Notify(token string, msg *message.Message) (string, error)
|
|
|
|
}
|
|
|
|
|
|
|
|
// MessagingProvider manages send/notification messaging clients.
|
|
|
|
type MessagingProvider interface {
|
|
|
|
SetMessage(ids []string, body interface{})
|
|
|
|
SetPayload(payload *message.Payload)
|
2017-10-09 16:21:56 +00:00
|
|
|
Send() error
|
|
|
|
}
|
|
|
|
|
2017-10-10 15:30:56 +00:00
|
|
|
// FirebaseClient is a copy of "go-fcm" client methods.
|
|
|
|
type FirebaseClient interface {
|
2017-10-09 16:21:56 +00:00
|
|
|
NewFcmRegIdsMsg(list []string, body interface{}) *fcm.FcmClient
|
|
|
|
Send() (*fcm.FcmResponseStatus, error)
|
|
|
|
SetNotificationPayload(payload *fcm.NotificationPayload) *fcm.FcmClient
|
|
|
|
}
|