Versions in this module Expand all Collapse all v0 v0.1.2 Mar 4, 2016 Changes in this version + const EVENT_DATA_SUBMIT + const STATUS_SENDING + var ErrFromAddressNotSpecified = errors.New("No From Address specified") + var ErrHostNotSpecified = errors.New("No SMTP Host specified") + var ErrSMTPNotFound = errors.New("Sending profile not found") + var ErrSMTPNotSpecified = errors.New("No sending profile specified") + func DeleteSMTP(id int64, uid int64) error + func PostSMTP(s *SMTP) error + func PutSMTP(s *SMTP) error type Campaign + SMTPId int64 type Event + Details string type Page + CaptureCredentials bool + CapturePasswords bool type Result + Position string type SMTP + Id int64 + IgnoreCertErrors bool + Interface string + ModifiedDate time.Time + Name string + UserId int64 + func GetSMTP(id int64, uid int64) (SMTP, error) + func GetSMTPByName(n string, uid int64) (SMTP, error) + func GetSMTPs(uid int64) ([]SMTP, error) type SendTestEmailRequest + From string v0.1.1 Jan 29, 2016 Changes in this version + const CAMPAIGN_COMPLETE + const CAMPAIGN_EMAILS_SENT + const CAMPAIGN_IN_PROGRESS + const CAMPAIGN_QUEUED + const ERROR + const EVENT_CLICKED + const EVENT_OPENED + const EVENT_SENDING_ERROR + const EVENT_SENT + const STATUS_SUCCESS + const STATUS_UNKNOWN + var ErrCampaignNameNotSpecified = errors.New("Campaign name not specified") + var ErrEmailNotSpecified = errors.New("No email address specified") + var ErrGroupNameNotSpecified = errors.New("Group name not specified") + var ErrGroupNotFound = errors.New("Group not found") + var ErrGroupNotSpecified = errors.New("No groups specified") + var ErrNoTargetsSpecified = errors.New("No targets specified") + var ErrPageNameNotSpecified = errors.New("Page Name not specified") + var ErrPageNotFound = errors.New("Page not found") + var ErrPageNotSpecified = errors.New("No landing page specified") + var ErrTemplateMissingParameter = errors.New("Need to specify at least plaintext or HTML content") + var ErrTemplateNameNotSpecified = errors.New("Template name not specified") + var ErrTemplateNotFound = errors.New("Template not found") + var ErrTemplateNotSpecified = errors.New("No email template specified") + var ErrUsernameTaken = errors.New("username already taken") + var Logger = log.New(os.Stdout, " ", log.Ldate | log.Ltime | log.Lshortfile) + func DeleteCampaign(id int64) error + func DeleteGroup(g *Group) error + func DeletePage(id int64, uid int64) error + func DeleteTemplate(id int64, uid int64) error + func PostCampaign(c *Campaign, uid int64) error + func PostGroup(g *Group) error + func PostPage(p *Page) error + func PostTemplate(t *Template) error + func PutGroup(g *Group) error + func PutPage(p *Page) error + func PutTemplate(t *Template) error + func PutUser(u *User) error + func Setup() error + type Attachment struct + Content string + Id int64 + Name string + TemplateId int64 + Type string + type Campaign struct + CompletedDate time.Time + CreatedDate time.Time + Events []Event + Groups []Group + Id int64 + Name string + Page Page + PageId int64 + Results []Result + SMTP SMTP + Status string + Template Template + TemplateId int64 + URL string + UserId int64 + func GetCampaign(id int64, uid int64) (Campaign, error) + func GetCampaigns(uid int64) ([]Campaign, error) + func (c *Campaign) AddEvent(e Event) error + func (c *Campaign) UpdateStatus(s string) error + func (c *Campaign) Validate() error + type Event struct + CampaignId int64 + Email string + Id int64 + Message string + Time time.Time + type Flash struct + Message string + Type string + type Group struct + Id int64 + ModifiedDate time.Time + Name string + Targets []Target + UserId int64 + func GetGroup(id int64, uid int64) (Group, error) + func GetGroupByName(n string, uid int64) (Group, error) + func GetGroups(uid int64) ([]Group, error) + func (g *Group) Validate() error + type GroupTarget struct + GroupId int64 + TargetId int64 + type Page struct + HTML string + Id int64 + ModifiedDate time.Time + Name string + UserId int64 + func GetPage(id int64, uid int64) (Page, error) + func GetPageByName(n string, uid int64) (Page, error) + func GetPages(uid int64) ([]Page, error) + func (p *Page) Validate() error + type Response struct + Data interface{} + Message string + Success bool + type Result struct + CampaignId int64 + Email string + FirstName string + IP string + Id int64 + LastName string + Latitude float64 + Longitude float64 + RId string + Status string + UserId int64 + func GetResult(rid string) (Result, error) + func (r *Result) GenerateId() + func (r *Result) UpdateGeo(addr string) error + func (r *Result) UpdateStatus(s string) error + type SMTP struct + CampaignId int64 + FromAddress string + Host string + Password string + SMTPId int64 + Username string + func (s *SMTP) Validate() (string, bool) + func (s SMTP) TableName() string + type SendTestEmailRequest struct + Page Page + SMTP SMTP + Template Template + Tracker string + TrackingURL string + URL string + func (s *SendTestEmailRequest) Validate() error + type Target struct + Email string + FirstName string + Id int64 + LastName string + Position string + func GetTargets(gid int64) ([]Target, error) + type Template struct + Attachments []Attachment + HTML string + Id int64 + ModifiedDate time.Time + Name string + Subject string + Text string + UserId int64 + func GetTemplate(id int64, uid int64) (Template, error) + func GetTemplateByName(n string, uid int64) (Template, error) + func GetTemplates(uid int64) ([]Template, error) + func (t *Template) Validate() error + type User struct + ApiKey string + Hash string + Id int64 + Username string + func GetUser(id int64) (User, error) + func GetUserByAPIKey(key string) (User, error) + func GetUserByUsername(username string) (User, error)