Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Notification ¶
type Notification interface {
Type() string
// contains filtered or unexported methods
}
Notification represents different types of notifications Notification is a discriminated union
type NotificationEmail ¶
type NotificationEmail struct {
Type_ string `json:"type"`
Attachments []struct{} `json:"attachments,omitempty"`
Bcc []string `json:"bcc,omitempty"`
Body string `json:"body"`
Cc []string `json:"cc,omitempty"`
From string `json:"from"`
IsHtml bool `json:"isHtml"`
Subject string `json:"subject"`
To string `json:"to"`
}
NotificationEmail is the "email" variant of Notification
func (NotificationEmail) Type ¶
func (v NotificationEmail) Type() string
type NotificationLog ¶
type NotificationLog struct {
Attempts int32 `json:"attempts"`
Error *string `json:"error,omitempty"`
Id string `json:"id"`
Notification Notification `json:"notification"`
Status NotificationStatus `json:"status"`
Timestamp time.Time `json:"timestamp"`
}
type NotificationPush ¶
type NotificationPush struct {
Type_ string `json:"type"`
Badge *int32 `json:"badge,omitempty"`
Body string `json:"body"`
Data map[string]string `json:"data,omitempty"`
DeviceToken string `json:"deviceToken"`
Sound *string `json:"sound,omitempty"`
Title string `json:"title"`
}
NotificationPush is the "push" variant of Notification
func (NotificationPush) Type ¶
func (v NotificationPush) Type() string
type NotificationSms ¶
type NotificationSms struct {
Type_ string `json:"type"`
Message string `json:"message"`
Provider *string `json:"provider,omitempty"`
To string `json:"to"`
}
NotificationSms is the "sms" variant of Notification
func (NotificationSms) Type ¶
func (v NotificationSms) Type() string
type NotificationStatus ¶
type NotificationStatus string
const ( NotificationStatusPending NotificationStatus = "pending" NotificationStatusSent NotificationStatus = "sent" NotificationStatusDelivered NotificationStatus = "delivered" NotificationStatusFailed NotificationStatus = "failed" )
Click to show internal directories.
Click to hide internal directories.