handler

package
v0.0.73 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2018 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StopEventType            = "stop_event"
	MsgEventType             = "msg_event"
	NewConversationEventType = "new_conversation"
	ReferralEventType        = "referral"
	ExpirationEventType      = "expiration_event"
	TimeoutEventType         = "timeout_event"
)

Variables

This section is empty.

Functions

func AddHandleTask

func AddHandleTask(rc redis.Conn, contactID flows.ContactID, task *queue.Task) error

AddHandleTask adds a single task for the passed in contact

func NewExpirationTask added in v0.0.66

func NewExpirationTask(orgID models.OrgID, contactID flows.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 flows.ContactID, sessionID models.SessionID, time time.Time) *queue.Task

NewTimeoutTask creates a new event task for the passed in timeout event

Types

type ChannelEvent added in v0.0.69

type ChannelEvent struct {
	ContactID  flows.ContactID   `json:"contact_id"`
	URNID      models.URNID      `json:"urn_id"`
	OrgID      models.OrgID      `json:"org_id"`
	ChannelID  models.ChannelID  `json:"channel_id"`
	Extra      map[string]string `json:"extra"`
	NewContact bool              `json:"new_contact"`
}

type HandleEventTask added in v0.0.69

type HandleEventTask struct {
	ContactID flows.ContactID `json:"contact_id"`
}

type MsgEvent added in v0.0.69

type MsgEvent struct {
	ContactID     flows.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 string             `json:"msg_external_id"`
	URN           urns.URN           `json:"urn"`
	URNID         models.URNID       `json:"urn_id"`
	Text          string             `json:"text"`
	Attachments   []flows.Attachment `json:"attachments"`
	NewContact    bool               `json:"new_contact"`
}

type StopEvent added in v0.0.69

type StopEvent struct {
	ContactID flows.ContactID `json:"contact_id"`
	OrgID     models.OrgID    `json:"org_id"`
}

type TimedEvent added in v0.0.69

type TimedEvent struct {
	ContactID flows.ContactID  `json:"contact_id"`
	OrgID     models.OrgID     `json:"org_id"`
	SessionID models.SessionID `json:"session_id"`
	RunID     models.FlowRunID `json:"run_id,omitempty"`
	Time      time.Time        `json:"time"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL