Documentation
¶
Index ¶
- type ATSMSMessageData
- type ATSMSPayload
- type ATSMSRecipient
- type ATSMSResponse
- type BeemSMSDeliveryStatusPayload
- type BeemSMSDeliveryStatusResponse
- type BeemSMSPayload
- type BeemSMSRecipient
- type BeemSMSRequestBody
- type BeemSMSResponse
- type ContextKey
- type DatabaseOptions
- type EmailDetails
- type EncryptReturnType
- type EncryptionConfig
- type ServerResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ATSMSMessageData ¶ added in v1.1.6
type ATSMSMessageData struct {
Message string `json:"Message"` // The SMS message content
Recipients []ATSMSRecipient `json:"Recipients"` // List of recipients and their statuses
}
SMSMessageData encapsulates the message and recipient data in an SMS response Aggregates the message content and list of recipients
type ATSMSPayload ¶ added in v1.1.6
type ATSMSPayload struct {
Username string `json:"username"` // Africa’s Talking account username
Message string `json:"message"` // The SMS message content
SenderID string `json:"senderId"` // Sender ID for the SMS
PhoneNumbers []string `json:"phoneNumbers"` // List of recipient phone numbers
ATAPIKey string `json:"apiKey"` // API key for authentication
}
SMSPayload defines the structure for sending a bulk SMS request Contains the necessary fields for the Africa’s Talking API
type ATSMSRecipient ¶ added in v1.1.6
type ATSMSRecipient struct {
StatusCode int `json:"statusCode"` // HTTP status code for the SMS delivery
Number string `json:"number"` // Recipient’s phone number
Status string `json:"status"` // Status message (e.g., "Sent", "Queued")
Cost string `json:"cost"` // Cost of sending the SMS
MessageID string `json:"messageId"` // Unique ID for the SMS message
}
SMSRecipient represents a single recipient’s details in an SMS response Contains status and metadata for an SMS sent to a phone number
type ATSMSResponse ¶ added in v1.1.6
type ATSMSResponse struct {
SMSMessageData ATSMSMessageData `json:"SMSMessageData"` // The SMS message and recipient details
}
SMSResponse defines the structure of the Africa’s Talking API SMS response Wraps the message data and recipient information
type BeemSMSDeliveryStatusPayload ¶ added in v1.1.6
type BeemSMSDeliveryStatusResponse ¶ added in v1.1.6
type BeemSMSPayload ¶ added in v1.1.6
type BeemSMSRecipient ¶ added in v1.1.6
type BeemSMSRequestBody ¶ added in v1.1.6
type BeemSMSRequestBody struct {
SourceAddr string `json:"source_addr"`
ScheduleTime string `json:"schedule_time,omitempty"` // Optional
Encoding string `json:"encoding"` // Default is "0"
Message string `json:"message"`
Recipients []BeemSMSRecipient `json:"recipients"`
}
type BeemSMSResponse ¶ added in v1.1.6
type ContextKey ¶ added in v1.2.6
type ContextKey string
type DatabaseOptions ¶ added in v1.2.3
type EmailDetails ¶
type EmailDetails struct {
From string // Sender email address
To []string // Recipient email addresses
Subject string // Email subject
Text string // Plain text message body
HTML string // HTML message body
Attachments []string // File paths for email attachments
CC []string // File paths for email CC
BCC []string // File paths for email BCC
ReplyTo string
}
EmailDetails defines the structure for email sending parameters Holds the sender, recipients, subject, body, and attachments for an email
type EncryptReturnType ¶
type EncryptReturnType struct {
Payload string // The encrypted data as a string (base64 or hex encoded)
}
EncryptReturnType defines the structure for the encryption function’s return value Used to hold the encrypted payload in string format
type EncryptionConfig ¶ added in v1.2.7
type ServerResponse ¶
type ServerResponse struct {
Success bool `json:"success"`
Message interface{} `json:"message"`
}
ServerResponse defines the structure for standardized JSON API responses Includes a success flag and a flexible message payload