Documentation ¶
Index ¶
- Constants
- Variables
- func ExampleMessage(cfg config.Configuration, data util.ExampleData, eventSlug string) (cc.Message, error)
- func GlipActivityForChat(event string, feedback string) string
- func LinkifyURL(innerHtml string, url string, skipLinking bool) (string, bool)
- func NewHandler() handlers.Handler
- func Normalize(cfg config.Configuration, hReq handlers.HandlerRequest) (cc.Message, error)
- func NormalizeChatMeta(cfg config.Configuration, src UserlikeChatMetaStartOutMessage) cc.Message
- func NormalizeChatWidget(cfg config.Configuration, src UserlikeChatWidgetOutMessage) cc.Message
- func NormalizeOfflineMessage(cfg config.Configuration, src UserlikeOfflineMessageOutMessage) cc.Message
- func NormalizeOperator(cfg config.Configuration, src UserlikeOperatorOutMessage) cc.Message
- type OperatorGroup
- type UserlikeBaseOutMessage
- type UserlikeChatMetaStartOutMessage
- type UserlikeChatWidget
- type UserlikeChatWidgetOutMessage
- type UserlikeOfflineMessageOutMessage
- type UserlikeOperatorOutMessage
Constants ¶
View Source
const ( DisplayName = "Userlike" HandlerKey = "userlike" MessageDirection = "out" MessageBodyType = models.JSON )
Variables ¶
View Source
var ( ChatMetaEvents = []string{"feedback", "forward", "rating", "receive", "start", "survey"} OperatorEvents = []string{"away", "back", "offline", "online"} )
Functions ¶
func ExampleMessage ¶
func ExampleMessage(cfg config.Configuration, data util.ExampleData, eventSlug string) (cc.Message, error)
func GlipActivityForChat ¶
func NewHandler ¶
func Normalize ¶
func Normalize(cfg config.Configuration, hReq handlers.HandlerRequest) (cc.Message, error)
func NormalizeChatMeta ¶
func NormalizeChatMeta(cfg config.Configuration, src UserlikeChatMetaStartOutMessage) cc.Message
func NormalizeChatWidget ¶
func NormalizeChatWidget(cfg config.Configuration, src UserlikeChatWidgetOutMessage) cc.Message
func NormalizeOfflineMessage ¶
func NormalizeOfflineMessage(cfg config.Configuration, src UserlikeOfflineMessageOutMessage) cc.Message
func NormalizeOperator ¶
func NormalizeOperator(cfg config.Configuration, src UserlikeOperatorOutMessage) cc.Message
Types ¶
type OperatorGroup ¶
type UserlikeBaseOutMessage ¶
type UserlikeBaseOutMessage struct { Event string `json:"_event,omitempty"` Type string `json:"_type,omitempty"` }
func UserlikeBaseOutMessageFromBytes ¶
func UserlikeBaseOutMessageFromBytes(bytes []byte) (UserlikeBaseOutMessage, error)
type UserlikeChatMetaStartOutMessage ¶
type UserlikeChatMetaStartOutMessage struct { UserlikeBaseOutMessage BrowserName string `json:"browser_name,omitempty"` BrowserOS string `json:"browser_os,omitempty"` BrowserVersion string `json:"browser_version,omitempty"` ChatWidget UserlikeChatWidget `json:"chat_widget,omitempty"` ClientEmail string `json:"client_email,omitempty"` ClientName string `json:"client_name,omitempty"` ClientUUID string `json:"client_uuid,omitempty"` CreatedAt string `json:"created_at,omitempty"` DataPrivacy bool `json:"data_privacy,omitempty"` Duration string `json:"duration,omitempty"` EndedAt string `json:"ended_at,omitempty"` FeedbackMessage string `json:"feedback_message,omitempty"` Id int64 `json:"id,omitempty"` InitialURL string `json:"initial_url,omitempty"` LocCity string `json:"loc_city,omitempty"` LocCountry string `json:"loc_country,omitempty"` LocLat float64 `json:"loc_lat,omitempty"` LocLon float64 `json:"loc_lon,omitempty"` MarkedRead bool `json:"marked_read,omitempty"` OperatorCurrentId int64 `json:"operator_current_id,omitempty"` PageImpressions int64 `json:"page_impressions,omitempty"` PostSurveyOption string `json:"post_survey_option,omitempty"` Rate int64 `json:"rate,omitempty"` Referrer string `json:"referrer,omitempty"` Status string `json:"status,omitempty"` Topic string `json:"topic,omitempty"` URL string `json:"url,omitempty"` Visits int64 `json:"visits,omitempty"` WasProactive bool `json:"was_proactive,omitempty"` }
func UserlikeChatMetaStartOutMessageFromBytes ¶
func UserlikeChatMetaStartOutMessageFromBytes(bytes []byte) (UserlikeChatMetaStartOutMessage, error)
type UserlikeChatWidget ¶
type UserlikeChatWidgetOutMessage ¶
type UserlikeChatWidgetOutMessage struct { UserlikeBaseOutMessage CustomUrl string `json:"custom_url,omitempty"` Name string `json:"name,omitempty"` TransitionDuration int64 `json:"transition_duration,omitempty"` StatusUrl string `json:"status_url,omitempty"` TestUrl string `json:"test_url,omitempty"` WidgetExternalType string `json:"widget_external_type,omitempty"` WidgetVersion int64 `json:"widget_version,omitempty"` }
func UserlikeChatWidgetOutMessageFromBytes ¶
func UserlikeChatWidgetOutMessageFromBytes(bytes []byte) (UserlikeChatWidgetOutMessage, error)
type UserlikeOfflineMessageOutMessage ¶
type UserlikeOfflineMessageOutMessage struct { UserlikeBaseOutMessage BrowserName string `json:"browser_name,omitempty"` BrowserOS string `json:"browser_os,omitempty"` BrowserVersion string `json:"browser_version,omitempty"` ChatWidget UserlikeChatWidget `json:"chat_widget,omitempty"` ClientEmail string `json:"client_email,omitempty"` ClientName string `json:"client_name,omitempty"` CreatedAt string `json:"created_at,omitempty"` Custom interface{} `json:"custom,omitempty"` DataPrivacy interface{} `json:"data_privacy,omitempty"` Id int64 `json:"id,omitempty"` LocCity string `json:"loc_city,omitempty"` LocCountry string `json:"loc_country,omitempty"` LocLat float64 `json:"loc_lat,omitempty"` LocLon float64 `json:"loc_lon,omitempty"` MarkedRead bool `json:"marked_read,omitempty"` Message string `json:"message,omitempty"` PageImpressions int64 `json:"page_impresions,omitempty"` ScreenshotOID string `json:"screenshot_oid,omitempty"` ScreenshotURL string `json:"screenshot_url,omitempty"` Status string `json:"status,omitempty"` Topic string `json:"topic,omitempty"` URL string `json:"url,omitempty"` Visits int64 `json:"visits,omitempty"` }
func UserlikeOfflineMessageOutMessageFromBytes ¶
func UserlikeOfflineMessageOutMessageFromBytes(bytes []byte) (UserlikeOfflineMessageOutMessage, error)
type UserlikeOperatorOutMessage ¶
type UserlikeOperatorOutMessage struct { UserlikeBaseOutMessage DashboardUrl string `json:"dashboard_url,omitempty"` Email string `json:"email,omitempty"` FirstName string `json:"first_name,omitempty"` Id int64 `json:"id,omitempty"` IsActive bool `json:"is_active,omitempty"` JID string `json:"jid,omitempty"` Lang string `json:"lang,omitempty"` LastName string `json:"last_name,omitempty"` Locale string `json:"locale,omitempty"` Name string `json:"name,omitempty"` OperatorGroup OperatorGroup `json:"operator_group,omitempty"` OperatorGroupId int64 `json:"operator_group_id,omitempty"` Role string `json:"role,omitempty"` RoleName string `json:"role_name,omitempty"` Timezone string `json:"timezone,omitempty"` UrlImage string `json:"url_image,omitempty"` Username string `json:"username,omitempty"` }
func UserlikeOperatorOutMessageFromBytes ¶
func UserlikeOperatorOutMessageFromBytes(bytes []byte) (UserlikeOperatorOutMessage, error)
Click to show internal directories.
Click to hide internal directories.