Documentation ¶
Index ¶
- type ImplFCM
- func (f *ImplFCM) Notifications(ctx context.Context, registrationToken string, newerThan time.Time, limit int) ([]*dto.SavedNotification, error)
- func (f *ImplFCM) SendFCMByPhoneOrEmail(ctx context.Context, phoneNumber *string, email *string, ...) (bool, error)
- func (f *ImplFCM) SendNotification(ctx context.Context, registrationTokens []string, data map[string]string, ...) (bool, error)
- type UsecaseFCM
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ImplFCM ¶
type ImplFCM struct {
// contains filtered or unexported fields
}
ImplFCM is the FCM service implementation
func NewFCM ¶
func NewFCM(infrastructure infrastructure.Interactor) *ImplFCM
NewFCM initializes a FCM service instance
func (*ImplFCM) Notifications ¶
func (f *ImplFCM) Notifications( ctx context.Context, registrationToken string, newerThan time.Time, limit int, ) ([]*dto.SavedNotification, error)
Notifications fetches notifications with the defined limit and set date
func (*ImplFCM) SendFCMByPhoneOrEmail ¶
func (f *ImplFCM) SendFCMByPhoneOrEmail( ctx context.Context, phoneNumber *string, email *string, data map[string]interface{}, notification firebasetools.FirebaseSimpleNotificationInput, android *firebasetools.FirebaseAndroidConfigInput, ios *firebasetools.FirebaseAPNSConfigInput, web *firebasetools.FirebaseWebpushConfigInput, ) (bool, error)
SendFCMByPhoneOrEmail sends fcm by phone or email
func (*ImplFCM) SendNotification ¶
func (f *ImplFCM) SendNotification( ctx context.Context, registrationTokens []string, data map[string]string, notification *firebasetools.FirebaseSimpleNotificationInput, android *firebasetools.FirebaseAndroidConfigInput, ios *firebasetools.FirebaseAPNSConfigInput, web *firebasetools.FirebaseWebpushConfigInput, ) (bool, error)
SendNotification sends a notification to ios, android, web users
type UsecaseFCM ¶
type UsecaseFCM interface { SendNotification( ctx context.Context, registrationTokens []string, data map[string]string, notification *firebasetools.FirebaseSimpleNotificationInput, android *firebasetools.FirebaseAndroidConfigInput, ios *firebasetools.FirebaseAPNSConfigInput, web *firebasetools.FirebaseWebpushConfigInput, ) (bool, error) Notifications( ctx context.Context, registrationToken string, newerThan time.Time, limit int, ) ([]*dto.SavedNotification, error) SendFCMByPhoneOrEmail( ctx context.Context, phoneNumber *string, email *string, data map[string]interface{}, notification firebasetools.FirebaseSimpleNotificationInput, android *firebasetools.FirebaseAndroidConfigInput, ios *firebasetools.FirebaseAPNSConfigInput, web *firebasetools.FirebaseWebpushConfigInput, ) (bool, error) }
UsecaseFCM defines FCM service usecases interface
Click to show internal directories.
Click to hide internal directories.