status-go/geth/common/notification.go

26 lines
744 B
Go
Raw Normal View History

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-10 15:30:56 +00:00
// Notification manages Push Notifications and send messages.
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)
Send() error
}
2017-10-10 15:30:56 +00:00
// FirebaseClient is a copy of "go-fcm" client methods.
type FirebaseClient interface {
NewFcmRegIdsMsg(list []string, body interface{}) *fcm.FcmClient
Send() (*fcm.FcmResponseStatus, error)
SetNotificationPayload(payload *fcm.NotificationPayload) *fcm.FcmClient
}