Documentation ¶
Index ¶
- 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 ContactURNAddedHook
- type FieldDelete
- type FieldUpdate
- type FieldValue
- type SendSessionMessages
- type UnsubscribeResthookHook
- type UpdateCampaignEventsHook
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 ContactURNAddedHook ¶
type ContactURNAddedHook struct{}
ContactURNAddedHook 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 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