Documentation
¶
Overview ¶
Package types defines webhook types.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Bounce ¶
type Bounce struct { Event `json:"event"` // Event name (“bounced”). Recipient string `json:"recipient"` // Recipient who could not be reached. Domain string `json:"domain"` // Domain that sent the original message. MessageHeaders string `json:"message-headers"` // String list of all MIME headers of the original message dumped to a JSON string (order of headers preserved). Code string `json:"code"` // SMTP bounce error code in form (X.X.X). Error string `json:"error"` // SMTP bounce error string. Notification string `json:"notification"` // Detailed reason for bouncing (optional). CampaignID string `json:"campaign-id"` // The id of campaign triggering the event. CampaignName string `json:"campaign-name"` // The name of campaign triggering the event. Tag string `json:"tag"` // Message tag, if it was tagged. See Tagging. MailingList string `json:"mailing-list"` // The address of mailing list the original message was sent to. CustomVariables map[string]interface{} `json:"-"` // Your own custom JSON object included in the header (see Attaching Data to Messages). Timestamp `json:"timestamp"` // Number of seconds passed since January 1, 1970 (see securing webhooks). Token `json:"token"` // Randomly generated string with length 50 (see securing webhooks). Signature `json:"signature"` // String with hexadecimal digits generate by HMAC algorithm (see securing webhooks). Attachments map[*textproto.MIMEHeader][]byte `json:"-"` // attached file (‘x’ stands for number of the attachment). Attachments are included if the recipient ESP includes them in the bounce message. They are handled as file uploads, encoded as multipart/form-data. }
type Click ¶
type Click struct { Event `json:"event"` // Event name (“clicked”). Recipient string `json:"recipient"` // Recipient who clicked. Domain string `json:"domain"` // Domain that sent the original message. IP string `json:"ip"` // IP address the event originated from. Country string `json:"country"` // Two-letter country code (as specified by ISO3166) the event came from or ‘unknown’ if it couldn’t be determined. Region string `json:"region"` // Two-letter or two-digit region code or ‘unknown’ if it couldn’t be determined. City string `json:"city"` // Name of the city the event came from or ‘unknown’ if it couldn’t be determined. UserAgent string `json:"user-agent"` // User agent string of the client triggered the event. DeviceType string `json:"device-type"` // Device type the link was clicked on. Can be ‘desktop’, ‘mobile’, ‘tablet’, ‘other’ or ‘unknown’. ClientType string `json:"client-type"` // Type of software the link was opened in, e.g. ‘browser’, ‘mobile browser’, ‘email client’. ClientName string `json:"client-name"` // Name of the client software, e.g. ‘Thunderbird’, ‘Chrome’, ‘Firefox’. ClientOS string `json:"client-os"` // OS family running the client software, e.g. ‘Linux’, ‘Windows’, ‘OSX’. CampaignID string `json:"campaign-id"` // The id of campaign triggering the event. CampaignName string `json:"campaign-name"` // The name of campaign triggering the event. Tag string `json:"tag"` // Message tag, if it was tagged. See Tagging. URL string `json:"url"` // The URL that was clicked. MailingList string `json:"mailing-list"` // The address of mailing list the original message was sent to. CustomVariables map[string]interface{} `json:"-"` // Your own custom JSON object included in the header (see Attaching Data to Messages). Timestamp `json:"timestamp"` // Number of seconds passed since January 1, 1970 (see securing webhooks). Token `json:"token"` // Randomly generated string with length 50 (see securing webhooks). Signature `json:"signature"` // String with hexadecimal digits generate by HMAC algorithm (see securing webhooks). }
type Complaint ¶
type Complaint struct { Event `json:"event"` // Event name (“complained”). Recipient string `json:"recipient"` // Recipient who clicked spam. Domain string `json:"domain"` // Domain that sent the original message. MessageHeaders string `json:"message-headers"` // String list of all MIME headers of the original message dumped to a JSON string (order of headers preserved). CampaignID string `json:"campaign-id"` // The id of campaign triggering the event. CampaignName string `json:"campaign-name"` // The name of campaign triggering the event. Tag string `json:"tag"` // Message tag, if it was tagged. See Tagging. MailingList string `json:"mailing-list"` // The address of mailing list the original message was sent to. CustomVariables map[string]interface{} `json:"-"` // Your own custom JSON object included in the header (see Attaching Data to Messages). Timestamp `json:"timestamp"` // Number of seconds passed since January 1, 1970 (see securing webhooks). Token `json:"token"` // Randomly generated string with length 50 (see securing webhooks). Signature `json:"signature"` // String with hexadecimal digits generate by HMAC algorithm (see securing webhooks). Attachments map[*textproto.MIMEHeader][]byte `json:"-"` // attached file (‘x’ stands for number of the attachment). Attachments are included if the recipient ESP includes them in the bounce message. They are handled as file uploads, encoded as multipart/form-data. }
type Delivered ¶
type Delivered struct { Event `json:"event"` // Event name (“delivered”). Recipient string `json:"recipient"` // Intended recipient. Domain string `json:"domain"` // Domain that sent the original message. MessageHeaders string `json:"message-headers"` // String list of all MIME headers dumped to a JSON string (order of headers preserved). MessageID string `json:"Message-Id"` // String id of the original message delivered to the recipient. CustomVariables map[string]interface{} `json:"-"` // Your own custom JSON object included in the header of the original message (see Attaching Data to Messages). Timestamp `json:"timestamp"` // Number of seconds passed since January 1, 1970 (see securing webhooks). Token `json:"token"` // Randomly generated string with length 50 (see securing webhooks). Signature `json:"signature"` // String with hexadecimal digits generate by HMAC algorithm (see securing webhooks). }
type Drop ¶
type Drop struct { Event `json:"event"` // Event name (“dropped”). Recipient string `json:"recipient"` // Intended recipient. Domain string `json:"domain"` // Domain that sent the original message. MessageHeaders string `json:"message-headers"` // String list of all MIME headers of the original message dumped to a JSON string (order of headers preserved). Reason string `json:"reason"` // Reason for failure. Can be one either “hardfail” or “old”. See below. Code string `json:"code"` // ESP response code, e.g. if the message was blocked as a spam (optional). Description string `json:"description"` // Detailed explanation of why the messages was dropped CustomVariables map[string]interface{} `json:"-"` // Your own custom JSON object included in the header (see Attaching Data to Messages). Timestamp `json:"timestamp"` // Number of seconds passed since January 1, 1970 (see securing webhooks). Token `json:"token"` // Randomly generated string with length 50 (see securing webhooks). Signature `json:"signature"` // String with hexadecimal digits generate by HMAC algorithm (see securing webhooks). Attachments map[*textproto.MIMEHeader][]byte `json:"-"` // attached file (‘x’ stands for number of the attachment). Attachments are included if the recipient ESP includes them in the bounce message. They are handled as file uploads, encoded as multipart/form-data. }
type IComplaint ¶
type IComplaint interface{ Complaint() Complaint }
type IDelivered ¶
type IDelivered interface{ Delivered() Delivered }
type IUnsubscribe ¶
type IUnsubscribe interface{ Unsubscribe() Unsubscribe }
type Open ¶
type Open struct { Event `json:"event"` // Event name (“opened”). Recipient string `json:"recipient"` // Recipient who opened. Domain string `json:"domain"` // Domain that sent the original message. IP string `json:"ip"` // IP address the event originated from. Country string `json:"country"` // Two-letter country code (as specified by ISO3166) the event came from or ‘unknown’ if it couldn’t be determined. Region string `json:"region"` // Two-letter or two-digit region code or ‘unknown’ if it couldn’t be determined. City string `json:"city"` // Name of the city the event came from or ‘unknown’ if it couldn’t be determined. UserAgent string `json:"user-agent"` // User agent string of the client triggered the event. DeviceType string `json:"device-type"` // Device type the email was opened on. Can be ‘desktop’, ‘mobile’, ‘tablet’, ‘other’ or ‘unknown’. ClientType string `json:"client-type"` // Type of software the email was opened in, e.g. ‘browser’, ‘mobile browser’, ‘email client’. ClientName string `json:"client-name"` // Name of the client software, e.g. ‘Thunderbird’, ‘Chrome’, ‘Firefox’. ClientOS string `json:"client-os"` // OS family running the client software, e.g. ‘Linux’, ‘Windows’, ‘OSX’. CampaignID string `json:"campaign-id"` // The id of campaign triggering the event. CampaignName string `json:"campaign-name"` // The name of campaign triggering the event. Tag string `json:"tag"` // Message tag, if message was tagged. See Tagging MailingList string `json:"mailing-list"` // The address of mailing list the original message was sent to. CustomVariables map[string]interface{} `json:"-"` // Your own custom JSON object included in the header (see Attaching Data to Messages). Timestamp `json:"timestamp"` // Number of seconds passed since January 1, 1970 (see securing webhooks). Token `json:"token"` // Randomly generated string with length 50 (see securing webhooks). Signature `json:"signature"` // String with hexadecimal digits generate by HMAC algorithm (see securing webhooks). }
type Unsubscribe ¶
type Unsubscribe struct { Event `json:"event"` // Event name (“unsubscribed”). Recipient string `json:"recipient"` // Recipient who unsubscribed. Domain string `json:"domain"` // Domain that sent the original message. IP string `json:"ip"` // IP address the event originated from. Country string `json:"country"` // Two-letter country code (as specified by ISO3166) the event came from or ‘unknown’ if it couldn’t be determined. Region string `json:"region"` // Two-letter or two-digit region code or ‘unknown’ if it couldn’t be determined. City string `json:"city"` // Name of the city the event came from or ‘unknown’ if it couldn’t be determined. UserAgent string `json:"user-agent"` // User agent string of the client triggered the event. DeviceType string `json:"device-type"` // Device type the person unsubscribed on. Can be ‘desktop’, ‘mobile’, ‘tablet’, ‘other’ or ‘unknown’. ClientType string `json:"client-type"` // Type of software the unsubscribe link was clicked in, e.g. ‘browser’, ‘mobile browser’, ‘email client’. ClientName string `json:"client-name"` // Name of the client software, e.g. ‘Thunderbird’, ‘Chrome’, ‘Firefox’. ClientOS string `json:"client-os"` // OS family running the client software, e.g. ‘Linux’, ‘Windows’, ‘OSX’. CampaignID string `json:"campaign-id"` // The id of the campaign that recipient has unsubscribed from. CampaignName string `json:"campaign-name"` // The name of campaign triggering the event. Tag string `json:"tag"` // Message tag, if it was tagged. See Tagging. MailingList string `json:"mailing-list"` // The address of mailing list the original message was sent to. CustomVariables map[string]interface{} `json:"-"` // Your own custom JSON object included in the header (see Attaching Data to Messages). Timestamp `json:"timestamp"` // Number of seconds passed since January 1, 1970 (see securing webhooks). Token `json:"token"` // Randomly generated string with length 50 (see securing webhooks). Signature `json:"signature"` // String with hexadecimal digits generate by HMAC algorithm (see securing webhooks). }
func (Unsubscribe) Unsubscribe ¶
func (u Unsubscribe) Unsubscribe() Unsubscribe
Source Files
¶
Click to show internal directories.
Click to hide internal directories.