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
type MessageContent ¶
type MessageContent struct { Token string `json:"token"` Notification *NotificationContent `json:"notification,omitempty"` Data map[string]interface{} `json:"data,omitempty"` }
type MessageOption ¶
type MessageOption func(*MessageContent)
func WithData ¶
func WithData(data map[string]interface{}) MessageOption
func WithNotification ¶
func WithNotification(title string, body string) MessageOption
type NotificationContent ¶
Click to show internal directories.
Click to hide internal directories.