Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Message ¶
type Message struct {
MessageContent `json:"message"`
}
func NewMessage ¶
func NewMessage(token string, opts ...MessageOption) (*Message, error)
type MessageContent ¶
type MessageContent struct {
Notification *NotificationContent `json:"notification,omitempty"`
Data map[string]any `json:"data,omitempty"`
Token string `json:"token"`
}
type MessageOption ¶
type MessageOption func(*MessageContent)
func WithData ¶
func WithData(data map[string]any) MessageOption
func WithNotification ¶
func WithNotification(title string, body string) MessageOption
type NotificationContent ¶
Click to show internal directories.
Click to hide internal directories.