Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(env *Options) destination.Destination
New returns a valid Blacksmith destination.Destination for Mailchimp.
Types ¶
type Identify ¶
type Identify struct { Signup // contains filtered or unexported fields }
Identify implements the Blacksmith destination.Action interface for the action "identify". It holds the complete job's structure to load into the destination.
func (Identify) Load ¶
func (a Identify) Load(tk *destination.Toolkit, queue *store.Queue, then chan<- destination.Then)
Load is the function being run by the scheduler to load the data into the destination. It is in charge of the "L" in the ETL process.
func (Identify) Marshal ¶
func (a Identify) Marshal(tk *destination.Toolkit) (*destination.Job, error)
Marshal is the function being run when the action receives data into the Identify receiver. It allows to transform and enrich the data before saving it in the store adapter.
func (Identify) Schedule ¶
func (a Identify) Schedule() *destination.Schedule
Schedule allows the action to override the schedule options of its destination. Do not override.
type Mailchimp ¶
type Mailchimp struct {
// contains filtered or unexported fields
}
Mailchimp implements the Blacksmith destination.Destination interface for the destination "mailchimp".
func (*Mailchimp) Actions ¶
func (d *Mailchimp) Actions() map[string]destination.Action
Actions return a list of actions the destination Mailchimp is able to handle.
func (*Mailchimp) Options ¶
func (d *Mailchimp) Options() *destination.Options
Options returns common destination options for Mailchimp. They will be shared across every actions of this destination, except when overridden.
type Options ¶
type Options struct { // Realtime indicates if the pubsub adapter of the Blacksmith application shall // be used to load events to the destination in realtime or not. When false, the // Interval will be used. Realtime bool // Interval represents an interval or a CRON string at which a job shall be // loaded to the destination. It is used as the time-lapse between retries in // case of a job failure. // // Defaults to "@every 1h". Interval string // MaxRetries indicates the maximum number of retries per job the scheduler will // attempt to execute before it succeed. When the limit is reached, the job is // marked as "discarded". // // Defaults to 72. MaxRetries uint16 // APIKey is the Mailchimp API Key to use for loading data into Mailchimp. You // can create and copy-paste your Mailchimp API Key from 'Account Settings' > // 'Extras' > 'API Keys'. // // Required. APIKey string // DatacenterID is the datacenter identifier of your Mailchimp account. You // can find it in the Mailchimp URL in your browser when you are logged in. // It is the 'us1' in 'https://us1.admin.mailchimp.com/lists/'. // // Required. DatacenterID string // AudienceID is the audience identifier to connect to. You can find your // Audience ID in your Mailchimp Settings pane under the Audiences tab. Go // to 'Manage Audiences' > 'Settings' and click on 'Audience Name & Defaults'. // The Audience ID will be on the right side. // // Required. AudienceID string // EnableDoubleOptIn is an optional flag to control whether a double opt-in // confirmation message is sent when subscribing new users. When enabled, // the status of a new subscriber will be set to 'pending' until the // subscription has been confirmed by the subscriber (via email). When // disabled, the subscription will automatically be set to 'subscribed' // and no email confirmation is sent to the subscriber. // // Defaults to false. EnableDoubleOptIn bool }
Options is the options the destination can take as an input to be configured.
type Signup ¶
type Signup struct { StatusIfNew string `json:"status_if_new,omitempty"` Email string `json:"email_address"` FirstName string `json:"first_name,omitempty"` LastName string `json:"last_name,omitempty"` IPSignup net.IP `json:"ip_signup"` TimestampSignup time.Time `json:"timestamp_signup"` Location *analytics.LocationInfo `json:"location,omitempty"` }
Signup holds the data to identify a new user via the Mailchimp API.