Skip to content

Commit

Permalink
Fixing golint and gofmt errors
Browse files Browse the repository at this point in the history
  • Loading branch information
prateekpandey14 committed Oct 9, 2017
1 parent 9f5e731 commit 799f6ae
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
14 changes: 14 additions & 0 deletions helpers/mail/mail_v3.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ type SGMailV3 struct {
ReplyTo *Email `json:"reply_to,omitempty"`
}

// Personalization holds mail body struct
type Personalization struct {
To []*Email `json:"to,omitempty"`
CC []*Email `json:"cc,omitempty"`
Expand All @@ -44,11 +45,13 @@ type Email struct {
Address string `json:"email,omitempty"`
}

// Content defines content of the mail body
type Content struct {
Type string `json:"type,omitempty"`
Value string `json:"value,omitempty"`
}

// Attachment holds attachement information
type Attachment struct {
Content string `json:"content,omitempty"`
Type string `json:"type,omitempty"`
Expand All @@ -58,11 +61,13 @@ type Attachment struct {
ContentID string `json:"content_id,omitempty"`
}

// Asm contains Grpip Id and int array of groups ID
type Asm struct {
GroupID int `json:"group_id,omitempty"`
GroupsToDisplay []int `json:"groups_to_display,omitempty"`
}

// MailSettings defines mail and spamCheck settings
type MailSettings struct {
BCC *BccSetting `json:"bcc,omitempty"`
BypassListManagement *Setting `json:"bypass_list_management,omitempty"`
Expand All @@ -71,6 +76,7 @@ type MailSettings struct {
SpamCheckSetting *SpamCheckSetting `json:"spam_check,omitempty"`
}

// TrackingSettings holds tracking settings and mail settings
type TrackingSettings struct {
ClickTracking *ClickTrackingSetting `json:"click_tracking,omitempty"`
OpenTracking *OpenTrackingSetting `json:"open_tracking,omitempty"`
Expand All @@ -82,11 +88,15 @@ type TrackingSettings struct {
SandboxMode *SandboxModeSetting `json:"sandbox_mode,omitempty"`
}

// BccSetting holds email bcc setings to enable of disable
// default is false
type BccSetting struct {
Enable *bool `json:"enable,omitempty"`
Email string `json:"email,omitempty"`
}

// FooterSetting holds enaable/disable settings
// and the format of footer i.e HTML/Text
type FooterSetting struct {
Enable *bool `json:"enable,omitempty"`
Text string `json:"text,omitempty"`
Expand All @@ -109,6 +119,9 @@ type SandboxModeSetting struct {
SpamCheck *SpamCheckSetting `json:"spam_check,omitempty"`
}

// SpamCheckSetting holds spam settings and
// which can be enable or disable and
// contains spamThreshold value
type SpamCheckSetting struct {
Enable *bool `json:"enable,omitempty"`
SpamThreshold int `json:"threshold,omitempty"`
Expand All @@ -131,6 +144,7 @@ type GaSetting struct {
CampaignMedium string `json:"utm_medium,omitempty"`
}

// Setting enables the mail settings
type Setting struct {
Enable *bool `json:"enable,omitempty"`
}
Expand Down
1 change: 1 addition & 0 deletions helpers/mail/mail_v3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"time"
)

// TestV3NewMail will test New mail method
func TestV3NewMail(t *testing.T) {
m := NewV3Mail()

Expand Down

0 comments on commit 799f6ae

Please sign in to comment.