Documentation ¶
Index ¶
- Constants
- func AddHandleTask(rc redis.Conn, contactID models.ContactID, task *queue.Task) error
- func HandleChannelEvent(ctx context.Context, db *sqlx.DB, rp *redis.Pool, ...) (*models.Session, error)
- func NewExpirationTask(orgID models.OrgID, contactID models.ContactID, sessionID models.SessionID, ...) *queue.Task
- func NewTimeoutTask(orgID models.OrgID, contactID models.ContactID, sessionID models.SessionID, ...) *queue.Task
- func StartRetryCron(mr *mailroom.Mailroom) error
- type HandleEventTask
- type MsgEvent
- type StopEvent
- type TimedEvent
Constants ¶
View Source
const ( MOMissEventType = string(models.MOMissEventType) NewConversationEventType = "new_conversation" WelcomeMessageEventType = "welcome_message" ReferralEventType = "referral" StopEventType = "stop_event" MsgEventType = "msg_event" ExpirationEventType = "expiration_event" TimeoutEventType = "timeout_event" )
Variables ¶
This section is empty.
Functions ¶
func AddHandleTask ¶
AddHandleTask adds a single task for the passed in contact.
func HandleChannelEvent ¶ added in v0.0.74
func HandleChannelEvent(ctx context.Context, db *sqlx.DB, rp *redis.Pool, eventType models.ChannelEventType, event *models.ChannelEvent, conn *models.ChannelConnection) (*models.Session, error)
HandleChannelEvent is called for channel events
func NewExpirationTask ¶ added in v0.0.66
func NewExpirationTask(orgID models.OrgID, contactID models.ContactID, sessionID models.SessionID, runID models.FlowRunID, time time.Time) *queue.Task
NewExpirationTask creates a new event task for the passed in expiration event
func NewTimeoutTask ¶ added in v0.0.66
func NewTimeoutTask(orgID models.OrgID, contactID models.ContactID, sessionID models.SessionID, time time.Time) *queue.Task
NewTimeoutTask creates a new event task for the passed in timeout event
func StartRetryCron ¶ added in v0.0.149
StartRetryCron starts our cron job of retrying pending incoming messages
Types ¶
type HandleEventTask ¶ added in v0.0.69
type MsgEvent ¶ added in v0.0.69
type MsgEvent struct { ContactID models.ContactID `json:"contact_id"` OrgID models.OrgID `json:"org_id"` ChannelID models.ChannelID `json:"channel_id"` MsgID flows.MsgID `json:"msg_id"` MsgUUID flows.MsgUUID `json:"msg_uuid"` MsgExternalID null.String `json:"msg_external_id"` URN urns.URN `json:"urn"` URNID models.URNID `json:"urn_id"` Text string `json:"text"` Attachments []utils.Attachment `json:"attachments"` NewContact bool `json:"new_contact"` }
Click to show internal directories.
Click to hide internal directories.