Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Key = flag.String("sparkpost-key", "", "the SparkPost key")
)
Flags
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents the client
func (*Client) CreateTransmission ¶
func (c *Client) CreateTransmission(t Transmission) (r TransmissionResults, err error)
CreateLink creates a link
type Configuration ¶
type Configuration struct { Key string `toml:"key"` Sender astikit.HTTPSenderOptions }
Configuration represents the lib's configuration
func FlagConfig ¶
func FlagConfig() Configuration
FlagConfig generates a Configuration based on flags
type ErrorPayload ¶
type ErrorPayload struct {
Errors []Error `json:"errors"`
}
type InlineContent ¶
type InlineContent struct { Attachments []Attachment `json:"attachments,omitempty"` From *Address `json:"from,omitempty"` Headers *Headers `json:"headers,omitempty"` HTML string `json:"html,omitempty"` InlineImages []InlineImage `json:"inline_images,omitempty"` ReplyTo string `json:"reply_to,omitempty"` Subject string `json:"subject,omitempty"` Text string `json:"text,omitempty"` }
type InlineImage ¶
type Recipient ¶
type Recipient struct { Address *Address `json:"address,omitempty"` Metadata *Metadata `json:"metadata,omitempty"` ReturnPath string `json:"return_path,omitempty"` SubstitutionData *SubstitutionData `json:"substitution_data,omitempty"` Tags []string `json:"tags,omitempty"` }
type SubstitutionData ¶
type Transmission ¶
type Transmission struct { CampaignID string `json:"campaign_id,omitempty"` Content *InlineContent `json:"content,omitempty"` Description string `json:"description,omitempty"` Metadata *Metadata `json:"metadata,omitempty"` Options *TransmissionOptions `json:"options,omitempty"` Recipients []Recipient `json:"recipients,omitempty"` ReturnPath string `json:"return_path,omitempty"` SubstitutionData *SubstitutionData `json:"substitution_data,omitempty"` }
type TransmissionOptions ¶
type TransmissionOptions struct {
Sandbox bool `json:"sandbox,omitempty"`
}
type TransmissionResults ¶
Click to show internal directories.
Click to hide internal directories.