Documentation
¶
Index ¶
- func DownloadFile(srvDrive *drive.Service, docId, filename string) error
- func ExportPDF(srvDrive *drive.Service, docId, filename string) error
- func RunCampaigns(ctx context.Context, dcs ...*DripCampaign) error
- type CampaignStep
- type Contact
- type DripCampaign
- type Mailer
- type SMTPService
- type Timestamp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadFile ¶
func RunCampaigns ¶ added in v0.0.14
func RunCampaigns(ctx context.Context, dcs ...*DripCampaign) error
Types ¶
type CampaignStep ¶ added in v0.0.4
type CampaignStep struct { WaitTime time.Duration WeekendAdjustment timex.WeekendAdjustment Mailer Mailer }
type Contact ¶ added in v0.0.4
type Contact struct { Email string `csv:"email"` Data string `csv:"data"` // json format Stop bool `csv:"stop"` Step_0_Timestamp Timestamp `csv:"s0_timestamp"` Step_0_WaitForCondition bool `csv:"s0_wait_for_cond"` Step_0_Done bool `csv:"s0_done"` Step_1_Timestamp Timestamp `csv:"s1_timestamp"` Step_1_WaitForCondition bool `csv:"s1_wait_for_cond"` Step_1_Done bool `csv:"s1_done"` Step_2_Timestamp Timestamp `csv:"s2_timestamp"` Step_2_WaitForCondition bool `csv:"s2_wait_for_cond"` Step_2_Done bool `csv:"s2_done"` Step_3_Timestamp Timestamp `csv:"s3_timestamp"` Step_3_WaitForCondition bool `csv:"s3_wait_for_cond"` Step_3_Done bool `csv:"s3_done"` Step_4_Timestamp Timestamp `csv:"s4_timestamp"` Step_4_WaitForCondition bool `csv:"s4_wait_for_cond"` Step_4_Done bool `csv:"s4_done"` }
type DripCampaign ¶ added in v0.0.4
type DripCampaign struct { Name string Steps []CampaignStep M *SMTPService SheetService *sheets.Service SpreadsheetId string SheetName string }
func (*DripCampaign) AddContact ¶ added in v0.0.4
func (dc *DripCampaign) AddContact(c Contact) error
func (*DripCampaign) ListAudiences ¶ added in v0.0.13
func (dc *DripCampaign) ListAudiences() (sets.String, error)
func (*DripCampaign) Prepare ¶ added in v0.0.4
func (dc *DripCampaign) Prepare(c *Contact, t time.Time)
func (*DripCampaign) ProcessCampaign ¶ added in v0.0.4
func (dc *DripCampaign) ProcessCampaign() error
type Mailer ¶
type Mailer struct { Sender string BCC string ReplyTo string Subject string Body string Plaintext bool Params interface{} AttachmentBytes map[string][]byte GDriveFiles map[string]string GoogleDocIds map[string]string }
type SMTPService ¶ added in v0.0.17
func NewSMTPServiceFromEnv ¶ added in v0.0.18
func NewSMTPServiceFromEnv() (*SMTPService, error)
type Timestamp ¶ added in v0.0.4
func (*Timestamp) MarshalCSV ¶ added in v0.0.4
func (*Timestamp) UnmarshalCSV ¶ added in v0.0.4
Click to show internal directories.
Click to hide internal directories.