Documentation ¶
Index ¶
- type ImplNotification
- func (n *ImplNotification) Notify(ctx context.Context, topicID string, uid string, flavour feedlib.Flavour, ...) error
- func (n *ImplNotification) Push(ctx context.Context, sender string, ...) error
- func (n *ImplNotification) ReverseSubscriptionIDs() map[string]string
- func (n *ImplNotification) SubscriptionIDs() map[string]string
- func (n *ImplNotification) TopicIDs() []string
- type UsecaseNotification
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ImplNotification ¶
type ImplNotification struct {
// contains filtered or unexported fields
}
ImplNotification is the pubsub notification service implementation
func NewNotification ¶
func NewNotification(infrastructure infrastructure.Interactor) *ImplNotification
NewNotification initializes a pubsub notification service instance
func (*ImplNotification) Notify ¶
func (n *ImplNotification) Notify( ctx context.Context, topicID string, uid string, flavour feedlib.Flavour, payload feedlib.Element, metadata map[string]interface{}, ) error
Notify Send a message to a topic
func (*ImplNotification) Push ¶
func (n *ImplNotification) Push( ctx context.Context, sender string, payload firebasetools.SendNotificationPayload, ) error
Push instructs a remote FCM service to send a push notification.
This is done over Google Cloud Pub-Sub.
func (*ImplNotification) ReverseSubscriptionIDs ¶
func (n *ImplNotification) ReverseSubscriptionIDs() map[string]string
ReverseSubscriptionIDs gets reverse subscription IDs for the notification service
func (*ImplNotification) SubscriptionIDs ¶
func (n *ImplNotification) SubscriptionIDs() map[string]string
SubscriptionIDs gets subscription IDs for the notification service
func (*ImplNotification) TopicIDs ¶
func (n *ImplNotification) TopicIDs() []string
TopicIDs Ask the notification service about the topics that it knows about
type UsecaseNotification ¶
type UsecaseNotification interface { // Send a message to a topic Notify( ctx context.Context, topicID string, uid string, flavour feedlib.Flavour, payload feedlib.Element, metadata map[string]interface{}, ) error // Ask the notification service about the topics that it knows about TopicIDs() []string SubscriptionIDs() map[string]string ReverseSubscriptionIDs() map[string]string Push( ctx context.Context, sender string, payload firebasetools.SendNotificationPayload, ) error }
UsecaseNotification defines pupsub notification service usecases interface
Click to show internal directories.
Click to hide internal directories.