sendgrid

package
v0.0.0-...-2f12df9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeliveryBounceEvent

type DeliveryBounceEvent struct {
	EventType            EventType `json:"event"`
	Email                string    `json:"email"`
	Timestamp            int64     `json:"timestamp"`
	SMTPID               string    `json:"smtp-id"`
	BounceClassification string    `json:"bounce_classification"`
	Category             []string  `json:"category"`
	SGEventID            string    `json:"sg_event_id"`
	SGMessageID          string    `json:"sg_message_id"`
	Response             string    `json:"response"`
	Reason               string    `json:"reason"`
	Status               string    `json:"status"`
	BounceType           string    `json:"type"`
}

func (DeliveryBounceEvent) GetEventType

func (DeliveryBounceEvent) GetEventType() EventType

type DeliveryDeferredEvent

type DeliveryDeferredEvent struct {
	EventType   EventType `json:"event"`
	Email       string    `json:"email"`
	Timestamp   int64     `json:"timestamp"`
	SMTPID      string    `json:"smtp-id"`
	Category    []string  `json:"category"`
	SGEventID   string    `json:"sg_event_id"`
	SGMessageID string    `json:"sg_message_id"`
	Response    string    `json:"response"`
	Attempt     string    `json:"attempt"`
}

func (DeliveryDeferredEvent) GetEventType

func (DeliveryDeferredEvent) GetEventType() EventType

type DeliveryDeliveredEvent

type DeliveryDeliveredEvent struct {
	EventType   EventType `json:"event"`
	Email       string    `json:"email"`
	Timestamp   int64     `json:"timestamp"`
	SMTPID      string    `json:"smtp-id"`
	Category    []string  `json:"category"`
	SGEventID   string    `json:"sg_event_id"`
	SGMessageID string    `json:"sg_message_id"`
	Response    string    `json:"response"`
}

func (DeliveryDeliveredEvent) GetEventType

func (DeliveryDeliveredEvent) GetEventType() EventType

type DeliveryDroppedEvent

type DeliveryDroppedEvent struct {
	EventType   EventType `json:"event"`
	Email       string    `json:"email"`
	Timestamp   int64     `json:"timestamp"`
	SMTPID      string    `json:"smtp-id"`
	Category    []string  `json:"category"`
	SGEventID   string    `json:"sg_event_id"`
	SGMessageID string    `json:"sg_message_id"`
	Reason      string    `json:"reason"`
	Status      string    `json:"status"`
}

func (DeliveryDroppedEvent) GetEventType

func (DeliveryDroppedEvent) GetEventType() EventType

type DeliveryEventsCountByType

type DeliveryEventsCountByType struct {
	DeliveryProcessed int64
	DeliveryDropped   int64
	DeliveryDelivered int64
	DeliveryDeferred  int64
	DeliveryBounce    int64
}

func CalcDeliveryEventsCountByType

func CalcDeliveryEventsCountByType(events []Event) DeliveryEventsCountByType

type DeliveryProcessedEvent

type DeliveryProcessedEvent struct {
	EventType   EventType `json:"event"`
	Email       string    `json:"email"`
	Timestamp   int64     `json:"timestamp"`
	Pool        Pool      `json:"pool"`
	SMTPID      string    `json:"smtp-id"`
	Category    []string  `json:"category"`
	SGEventID   string    `json:"sg_event_id"`
	SGMessageID string    `json:"sg_message_id"`
}

func (DeliveryProcessedEvent) GetEventType

func (DeliveryProcessedEvent) GetEventType() EventType

type Event

type Event interface {
	GetEventType() EventType
}

func ParseEventsJSON

func ParseEventsJSON(bytes []byte) ([]Event, error)

type EventType

type EventType string
const (
	DeliveryProcessedEventType          EventType = "processed"
	DeliveryDroppedEventType            EventType = "dropped"
	DeliveryDeliveredEventType          EventType = "delivered"
	DeliveryDeferredEventType           EventType = "deferred"
	DeliveryBounceEventType             EventType = "bounce"
	EngagementOpenEventType             EventType = "open"
	EngagementClickEventType            EventType = "click"
	EngagementSpamReportEventType       EventType = "spamreport"
	EngagementUnsubscribeEventType      EventType = "unsubscribe"
	EngagementGroupUnsubscribeEventType EventType = "group_unsubscribe"
	EngagementGroupResubscribeEventType EventType = "group_resubscribe"
)

func (EventType) MarshalJSON

func (t EventType) MarshalJSON() ([]byte, error)

func (*EventType) UnmarshalJSON

func (t *EventType) UnmarshalJSON(data []byte) error

type Pool

type Pool struct {
	Name string `json:"name"`
	ID   int64  `json:"id"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL