Documentation ¶
Index ¶
- func ApplyEmailCreatedEvent(ctx context.Context, tx *sqlx.Tx, rp *redis.Pool, org *models.OrgAssets, ...) error
- func ApplyMsgCreatedEvent(ctx context.Context, tx *sqlx.Tx, rp *redis.Pool, org *models.OrgAssets, ...) error
- func NoopHandler(ctx context.Context, tx *sqlx.Tx, rp *redis.Pool, org *models.OrgAssets, ...) error
- type CommitContactLanguageChanges
- type CommitContactNameChanges
- type CommitSessionMessages
- type ContactFieldChangedHook
- type ContactGroupsChangedHook
- type ContactModifiedHook
- type ContactURNsChangedHook
- type FieldDelete
- type FieldUpdate
- type FieldValue
- type SendEmails
- type SendSessionMessages
- type UnsubscribeResthookHook
- type UpdateCampaignEventsHook
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyEmailCreatedEvent ¶ added in v0.0.44
func ApplyEmailCreatedEvent(ctx context.Context, tx *sqlx.Tx, rp *redis.Pool, org *models.OrgAssets, session *models.Session, e flows.Event) error
ApplyEmailCreatedEvent event queues an email to be sent later on
Types ¶
type CommitContactLanguageChanges ¶
type CommitContactLanguageChanges struct{}
our hook for language changes
type CommitSessionMessages ¶
type CommitSessionMessages struct{}
CommitSessionMessages is our hook for comitting session messages
func (*CommitSessionMessages) Apply ¶
func (h *CommitSessionMessages) Apply(ctx context.Context, tx *sqlx.Tx, rp *redis.Pool, org *models.OrgAssets, sessions map[*models.Session][]interface{}) error
Apply takes care of inserting all the messages in the passed in sessions assigning topups to them as needed.
type ContactFieldChangedHook ¶
type ContactFieldChangedHook struct{}
ContactFieldChangedHook is our hook for contact field changes
type ContactGroupsChangedHook ¶
type ContactGroupsChangedHook struct{}
ContactGroupsChangedHook is our hook for all group changes
type ContactModifiedHook ¶ added in v0.0.48
type ContactModifiedHook struct{}
ContactModifiedHook is our hook for contact changes that require an update to modified_on
type ContactURNsChangedHook ¶ added in v0.0.48
type ContactURNsChangedHook struct{}
ContactURNsChangedHook is our hook for when a URN is added to a contact
type FieldDelete ¶
type FieldUpdate ¶
type FieldValue ¶
type FieldValue struct {
Text string `json:"text"`
}
type SendEmails ¶ added in v0.0.44
type SendEmails struct{}
SendEmails is our hook for sending emails
type SendSessionMessages ¶
type SendSessionMessages struct{}
SendSessionMessages is our hook for sending session messages
type UnsubscribeResthookHook ¶
type UnsubscribeResthookHook struct{}
UnsubscribeResthookHook is our hook for when a webhook is called
type UpdateCampaignEventsHook ¶
type UpdateCampaignEventsHook struct{}
UpdateCampaignEventsHook is our hook to update any campaign events
func (*UpdateCampaignEventsHook) Apply ¶
func (h *UpdateCampaignEventsHook) Apply(ctx context.Context, tx *sqlx.Tx, rp *redis.Pool, org *models.OrgAssets, sessions map[*models.Session][]interface{}) error
Apply will update all the campaigns for the passed in sessions, minimizing the number of queries to do so