Documentation
¶
Index ¶
- Variables
- func InitSMS(c *config.SMS)
- func IsInitialized() bool
- func SendErrors(errs []error, service string)
- func SendResolvedNotification(service string)
- func SendSIB(smsArr []*SendInBlueSMS)
- func SendTwilioSMS(sms []*TwilioSMS)
- type SIBResponseData
- type SendInBlueResponse
- type SendInBlueSMS
- type TwilioSMS
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func IsInitialized ¶
func IsInitialized() bool
func SendErrors ¶
func SendResolvedNotification ¶
func SendResolvedNotification(service string)
func SendSIB ¶
func SendSIB(smsArr []*SendInBlueSMS)
func SendTwilioSMS ¶
func SendTwilioSMS(sms []*TwilioSMS)
Types ¶
type SIBResponseData ¶
type SIBResponseData struct {
Status string `json:"status"`
Message string `json:"message"`
NumberSent int `json:"number_sent"`
SMSCount int `json:"sms_count"`
ErrorCode int `json:"error_code"`
CreditsUsed float64 `json:"credits_used"`
To string `json:"to"`
Reply string `json:"reply"`
Description string `json:"description"`
BounceType string `json:"bounce_type"`
Reference map[string]string `json:"reference"`
RemainingCredit float64 `json:"remaining_credit"`
}
type SendInBlueResponse ¶
type SendInBlueResponse struct {
Code string `json:"code"`
Message string `json:"message"`
Data interface{} `json:"data"`
}
SendInblue JSON response from the server.
func (*SendInBlueResponse) GetMessageId ¶
func (s *SendInBlueResponse) GetMessageId() (string, error)
GetMessageId retrieves the sendinblue message-id.
func (*SendInBlueResponse) GetSIBResponseData ¶
func (s *SendInBlueResponse) GetSIBResponseData() (*SIBResponseData, error)
GetSIBResponseData retrieves the sendinblue API response.
type SendInBlueSMS ¶
type SendInBlueSMS struct {
// required fields
From string `json:"sender"`
To string `json:"recipient"`
Content string `json:"content"`
// optional fields
Tag string `json:"tag"`
Type string `json:"type"`
URL string `json:"URL"`
}
V3 API https://developers.sendinblue.com/docs
func GenerateSIBErrorSMS ¶
func GenerateSIBErrorSMS(errs []error, service string) []*SendInBlueSMS
func GenerateSIBResolvedSMS ¶
func GenerateSIBResolvedSMS(service string) []*SendInBlueSMS
Click to show internal directories.
Click to hide internal directories.