Versions in this module Expand all Collapse all v0 v0.1.0 Aug 5, 2021 Changes in this version + var ErrEmptyPage = errors.New("empty page") + func ParseContent(content interface{}) (err error) + func ParseEvents(rawEventsPtr []*json.RawMessage) (*[]events.Event, error) + func ParseRecipients(recips interface{}) (ra *[]Recipient, err error) + type Address struct + Email string + HeaderTo string + Name string + func ParseAddress(addr interface{}) (a Address, err error) + type Attachment struct + B64Data string + Filename string + MIMEType string + type Client struct + Client *http.Client + Config *Config + func (api *Client) Init(cfg *Config) error + func (c *Client) DoRequest(method, urlStr string, data []byte) (*Response, error) + func (c *Client) EventDocumentation() (g map[string]*EventGroup, res *Response, err error) + func (c *Client) EventSamples(types *[]string) (*events.Events, error) + func (c *Client) HttpDelete(url string) (*Response, error) + func (c *Client) HttpGet(url string) (*Response, error) + func (c *Client) HttpPost(url string, data []byte) (*Response, error) + func (c *Client) HttpPut(url string, data []byte) (*Response, error) + func (c *Client) ListWebhooks(parameters map[string]string) (*WebhookListWrapper, error) + func (c *Client) MessageEvents(params map[string]string) (*EventsPage, error) + func (c *Client) MetricEventAsString(e *DeliverabilityMetricItem) string + func (c *Client) QueryDeliverabilityMetrics(extraPath string, parameters map[string]string) (*DeliverabilityMetricEventsWrapper, error) + func (c *Client) QueryWebhook(id string, parameters map[string]string) (*WebhookQueryWrapper, error) + func (c *Client) RecipientListCreate(rl *RecipientList) (id string, res *Response, err error) + func (c *Client) RecipientLists() (*[]RecipientList, *Response, error) + func (c *Client) RemoveHeader(header string) + func (c *Client) Send(t *Transmission) (id string, res *Response, err error) + func (c *Client) SetHeader(header string, value string) + func (c *Client) Subaccount(id int) (subaccount *Subaccount, res *Response, err error) + func (c *Client) SubaccountCreate(s *Subaccount) (res *Response, err error) + func (c *Client) SubaccountUpdate(s *Subaccount) (res *Response, err error) + func (c *Client) Subaccounts() (subaccounts []Subaccount, res *Response, err error) + func (c *Client) SuppressionDelete(recipientEmail string) (res *Response, err error) + func (c *Client) SuppressionInsertOrUpdate(entries []SuppressionEntry) (*Response, error) + func (c *Client) SuppressionList() (*SuppressionListWrapper, *Response, error) + func (c *Client) SuppressionRetrieve(recipientEmail string) (*SuppressionListWrapper, *Response, error) + func (c *Client) SuppressionSearch(parameters map[string]string) (*SuppressionListWrapper, *Response, error) + func (c *Client) TemplateCreate(t *Template) (id string, res *Response, err error) + func (c *Client) TemplateDelete(id string) (res *Response, err error) + func (c *Client) TemplatePreview(id string, payload *PreviewOptions) (res *Response, err error) + func (c *Client) TemplateUpdate(t *Template) (res *Response, err error) + func (c *Client) Templates() ([]Template, *Response, error) + func (c *Client) Transmission(id string) (*Transmission, *Response, error) + func (c *Client) TransmissionDelete(id string) (*Response, error) + func (c *Client) Transmissions(campaignID, templateID *string) ([]Transmission, *Response, error) + func (c *Client) WebhookStatus(id string, parameters map[string]string) (*WebhookStatusWrapper, error) + type Config struct + ApiKey string + ApiVersion int + BaseUrl string + Password string + Username string + Verbose bool + func NewConfig(m map[string]string) (*Config, error) + type Content struct + Attachments []Attachment + EmailRFC822 string + From interface{} + HTML string + Headers map[string]string + InlineImages []InlineImage + ReplyTo string + Subject string + Text string + type DeliverabilityMetricEventsWrapper struct + Errors []interface{} + Links []map[string]string + Results []*DeliverabilityMetricItem + TotalCount int + type DeliverabilityMetricItem struct + Binding string + BindingGroup string + CampaignId string + CountAccepted int + CountAdminBounce int + CountBlockBounce int + CountBounce int + CountClicked int + CountDelayed int + CountDelayedFirst int + CountDelivered int + CountDeliveredFirst int + CountDeliveredSubsequent int + CountGenerationFailed int + CountGenerationRejection int + CountHardBounce int + CountInbandBounce int + CountInjected int + CountOutofbandBounce int + CountPolicyRejection int + CountRejected int + CountRendered int + CountSent int + CountSoftBounce int + CountSpamComplaint int + CountTargeted int + CountUndeterminedBounce int + CountUniqueClicked int + CountUniqueConfirmedOpened int + CountUniqueRendered int + Domain string + TemplateId string + TimeStamp string + TotalDeliveryTimeFirst int + TotalDeliveryTimeSubsequent int + TotalMsgVolume int + WatchedDomain string + type Error struct + Code string + Description string + Line int + Message string + Part string + func (e Error) Json() (string, error) + type EventField struct + Description string + SampleValue interface{} + type EventGroup struct + Description string + DisplayName string + Events map[string]EventMeta + Name string + type EventMeta struct + Description string + DisplayName string + Fields map[string]EventField + Name string + type EventsPage struct + Events events.Events + TotalCount int + func (ep *EventsPage) UnmarshalJSON(data []byte) error + func (events *EventsPage) Next() (*EventsPage, error) + type From struct + Email string + Name string + func ParseFrom(from interface{}) (f From, err error) + type InlineImage Attachment + type PreviewOptions struct + SubstitutionData map[string]interface{} + type RFC3339 time.Time + func (r *RFC3339) MarshalJSON() ([]byte, error) + type Recipient struct + Address interface{} + Metadata interface{} + ReturnPath string + SubstitutionData interface{} + Tags []string + func (r Recipient) Validate() error + type RecipientList struct + Accepted *int + Attributes interface{} + Description string + ID string + Name string + Recipients *[]Recipient + func (rl *RecipientList) String() string + func (rl *RecipientList) Validate() error + type Response struct + Body []byte + Errors []Error + HTTP *http.Response + Results interface{} + Verbose map[string]string + func (r *Response) AssertJson() error + func (r *Response) ParseResponse() error + func (r *Response) PrettyError(noun, verb string) error + func (r *Response) ReadBody() ([]byte, error) + type Subaccount struct + ComplianceStatus string + Grants []string + ID int + Key string + KeyLabel string + Name string + ShortKey string + Status string + type SuppressionEntry struct + Created string + Description string + Email string + NonTransactional bool + Recipient string + Source string + Transactional bool + Type string + Updated string + type SuppressionListWrapper struct + Recipients []SuppressionEntry + Results []*SuppressionEntry + type Template struct + Content Content + Description string + ID string + LastUpdate time.Time + LastUse time.Time + Name string + Options *TmplOptions + Published bool + func (t *Template) SetHeaders(headers map[string]string) + func (t *Template) Validate() error + type TmplOptions struct + ClickTracking bool + OpenTracking bool + Transactional bool + type Transmission struct + CampaignID string + Content interface{} + Description string + ID string + Metadata interface{} + NumFailedGeneration *int + NumGenerated *int + NumInvalidRecipients *int + Options *TxOptions + Recipients interface{} + ReturnPath string + State string + SubstitutionData interface{} + TotalRecipients *int + func (t *Transmission) Validate() error + type TxOptions struct + InlineCSS bool + Sandbox string + SkipSuppression string + StartTime *RFC3339 + type WebhookItem struct + AuthCredentials struct{ ... } + AuthRequestDetails struct{ ... } + AuthToken string + AuthType string + Events []string + ID string + LastFailure string + LastSuccessful string + Links []struct{ ... } + Name string + Target string + type WebhookListWrapper struct + Errors []interface{} + Results []*WebhookItem + type WebhookQueryWrapper struct + Errors []interface{} + Results *WebhookItem + type WebhookStatus struct + Attempts int + BatchID string + ResponseCode string + Ts string + type WebhookStatusWrapper struct + Errors []interface{} + Results []*WebhookStatus