Documentation
¶
Index ¶
- Constants
- Variables
- func Bool(v bool) *bool
- func Int(v int) *int
- func SliceString(v []string) *[]string
- func String(v string) *string
- type APIError
- type Attachment
- type Client
- func (c *Client) MessageSendTemplate(req *MessageSendTemplateRequest) ([]MessageSendReturn, error)
- func (c *Client) RejectDelete(req *RejectDeleteRequest) (*RejectDeleteResponse, error)
- func (c *Client) TemplateAdd(req *TemplateAddRequest) (*Template, error)
- func (c *Client) TemplateDelete(req *TemplateDeleteRequest) (*Template, error)
- func (c *Client) TemplateInfo(req *TemplateInfoRequest) (*Template, error)
- func (c *Client) TemplateList(req *TemplateListRequest) (*[]Template, error)
- func (c *Client) TemplateUpdate(req *TemplateUpdateRequest) (*Template, error)
- type MergeLanguageType
- type Message
- type MessageSendReturn
- type MessageSendTemplateRequest
- type MessageStatusType
- type RecipientMetadata
- type RecipientVar
- type RejectDeleteRequest
- type RejectDeleteResponse
- type RejectReasonType
- type Template
- type TemplateAddRequest
- type TemplateDeleteRequest
- type TemplateInfoRequest
- type TemplateListRequest
- type TemplateUpdateRequest
- type To
- type ToType
- type Var
Constants ¶
View Source
const ( ErrNameInvalidKey = "Invalid_Key" ErrNameValidationError = "ValidationError" ErrNameGeneralError = "GeneralError" ErrNameInvalidReject = "Invalid_Reject" ErrNameUnknownSubaccount = "Unknown_Subaccount" ErrNameInvalidTemplate = "Invalid_Template" ErrNameUnknownTemplate = "Unknown_Template" )
View Source
const ( MessageStatusTypeSent MessageStatusType = "sent" MessageStatusTypeQueued = "queued" MessageStatusTypeRejected = "rejected" MessageStatusTypeInvalid = "invalid" )
View Source
const ( RejectReasonTypeHardBounce RejectReasonType = "hard-bounce" RejectReasonTypeSoftBounce = "soft-bounce" RejectReasonTypeSpam = "spam" RejectReasonTypeUnsub = "unsub" RejectReasonTypeCustom = "custom" RejectReasonTypeInvalidSender = "invalid-sender" RejectReasonTypeInvalid = "invalid" RejectReasonTypeTestModeLimit = "test-mode-limit" RejectReasonTypeUnsigned = "unsigned" RejectReasonTypeRule = "rule" )
View Source
const (
Version = "0.1.0"
)
Variables ¶
View Source
var ( ToTypeTo ToType = String("to") ToTypeCC = String("cc") ToTypeBCC = String("bcc") )
Functions ¶
func SliceString ¶
Types ¶
type APIError ¶
type Attachment ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) MessageSendTemplate ¶
func (c *Client) MessageSendTemplate(req *MessageSendTemplateRequest) ([]MessageSendReturn, error)
func (*Client) RejectDelete ¶
func (c *Client) RejectDelete(req *RejectDeleteRequest) (*RejectDeleteResponse, error)
func (*Client) TemplateAdd ¶
func (c *Client) TemplateAdd(req *TemplateAddRequest) (*Template, error)
func (*Client) TemplateDelete ¶
func (c *Client) TemplateDelete(req *TemplateDeleteRequest) (*Template, error)
func (*Client) TemplateInfo ¶
func (c *Client) TemplateInfo(req *TemplateInfoRequest) (*Template, error)
func (*Client) TemplateList ¶
func (c *Client) TemplateList(req *TemplateListRequest) (*[]Template, error)
func (*Client) TemplateUpdate ¶
func (c *Client) TemplateUpdate(req *TemplateUpdateRequest) (*Template, error)
type MergeLanguageType ¶
type MergeLanguageType *string
var ( MergeLanguageTypeMailchimp MergeLanguageType = String("mailchimp") MergeLanguageTypeHandlebars = String("handlebars") )
type Message ¶
type Message struct {
HTML *string `json:"html"`
Text *string `json:"text"`
Subject *string `json:"subject"`
FromEmail *string `json:"from_email"`
FromName *string `json:"from_name"`
To []To `json:"to"`
Headers *map[string]string `json:"headers"`
Important *bool `json:"important"`
TrackOpens *bool `json:"track_opens"`
TrackClicks *bool `json:"track_clicks"`
AutoText *bool `json:"auto_text"`
AutoHTML *bool `json:"auto_html"`
InlineCSS *bool `json:"inline_css"`
URLStripQS *bool `json:"url_strip_qs"`
PreserveRecipients *bool `json:"preserve_recipients"`
ViewContentLink *bool `json:"view_content_link"`
BCCAddress *string `json:"bcc_address"`
TrackingDomain *string `json:"tracking_domain"`
SigningDomain *string `json:"signing_domain"`
ReturnPathDomain *string `json:"return_path_domain"`
Merge *bool `json:"merge"`
MergeLanguage MergeLanguageType `json:"merge_language"`
GlobalMergeVars *[]Var `json:"global_merge_vars"`
MergeVars *[]RecipientVar `json:"merge_vars"`
Tags *[]string `json:"tags"`
Subaccount *string `json:"subaccount"`
GoogleAnalyticsDomains *[]string `json:"google_analytics_domains"`
GoogleAnalyticsCampaign *string `json:"google_analytics_campaign"`
Metadata *[]string `json:"metadata"`
RecipientMetadata *[]RecipientMetadata `json:"recipient_metadata"`
Attachments *[]Attachment `json:"attachments"`
Images *[]Attachment `json:"images"`
}
type MessageSendReturn ¶
type MessageSendReturn struct {
Email string `json:"email"`
Status MessageStatusType `json:"status"`
RejectReason RejectReasonType `json:"reject_reason"`
ID string `json:"_id"`
}
type MessageStatusType ¶
type MessageStatusType string
type RecipientMetadata ¶
type RecipientVar ¶
type RejectDeleteRequest ¶
type RejectDeleteResponse ¶
type RejectReasonType ¶
type RejectReasonType string
type Template ¶
type Template struct {
Slug string `json:"slug"`
Name string `json:"name"`
Labels []string `json:"labels"`
Code string `json:"code"`
Subject string `json:"subject"`
FromEmail string `json:"from_email"`
FromName string `json:"from_name"`
Text string `json:"text"`
PublishName string `json:"publish_name"`
PublishCode string `json:"publish_code"`
PublishSubject string `json:"publish_subject"`
PublishFromEmail string `json:"publish_from_email"`
PublishFromName string `json:"publish_from_name"`
PublishText string `json:"publish_text"`
PublishedAt string `json:"published_at"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
type TemplateAddRequest ¶
type TemplateDeleteRequest ¶
type TemplateDeleteRequest struct {
Name string `json:"name"`
}
type TemplateInfoRequest ¶
type TemplateInfoRequest struct {
Name string `json:"name"`
}
type TemplateListRequest ¶
type TemplateListRequest struct {
Label *string `json:"label"`
}
type TemplateUpdateRequest ¶
Click to show internal directories.
Click to hide internal directories.