Documentation
¶
Index ¶
- Constants
- func ExampleMessage(cfg config.Configuration, data util.ExampleData, eventSlug string) (cc.Message, error)
- func NewHandler() handlers.Handler
- func Normalize(cfg config.Configuration, hReq handlers.HandlerRequest) (cc.Message, error)
- type Field
- type Line
- type WootricDecline
- type WootricEvent
- type WootricResponse
Constants ¶
View Source
const ( DisplayName = "Wootric" HandlerKey = "wootric" MessageDirection = "out" MessageBodyType = models.URLEncodedRails // application/x-www-form-urlencoded //WootricFormatVarResponse = "wootricFormatResponse" WootricQryVarFormatResponse = "wootricFormatResponse" WootricQryVarSkipEmptyText = "wootricSkipEmptyText" WootricFormatDefault = `score[NPS Score],text[Why];firstName lastName[User name];email[User email];survey_id[Survey ID]` )
Variables ¶
This section is empty.
Functions ¶
func ExampleMessage ¶
func ExampleMessage(cfg config.Configuration, data util.ExampleData, eventSlug string) (cc.Message, error)
func NewHandler ¶
func Normalize ¶
func Normalize(cfg config.Configuration, hReq handlers.HandlerRequest) (cc.Message, error)
Types ¶
type WootricDecline ¶
type WootricDecline struct {
ID json.Number `json:"id"`
Email string `json:"email"`
ExternalID string `json:"external_id"`
IPAddress string `json:"ip_address"`
OriginURL string `json:"origin_url"`
EndUserID string `json:"end_user_id"`
EndUserProperties map[string]string `json:"end_user_properties"`
SurveyID string `json:"survey_id"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
CreatedAtTime time.Time
UpdatedAtTime time.Time
}
type WootricEvent ¶
type WootricEvent struct {
Response WootricResponse `json:"response"`
Decline WootricDecline `json:"decline"`
EventName string `json:"event_name"`
Timestamp string `json:"timestamp"`
AccountToken string `json:"account_token"`
SurveyMode string `json:"survey_mode"`
TimestampTime time.Time
}
func ParseQueryString ¶
func ParseQueryString(raw string) (WootricEvent, error)
func (*WootricEvent) Activity ¶
func (we *WootricEvent) Activity() string
func (*WootricEvent) IsDecline ¶
func (we *WootricEvent) IsDecline() bool
func (*WootricEvent) IsResponse ¶
func (we *WootricEvent) IsResponse() bool
type WootricResponse ¶
type WootricResponse struct {
ID string `json:"id"`
Email string `json:"email"`
ExternalID string `json:"external_id"`
Score json.Number `json:"score"`
Text string `json:"text"`
IPAddress string `json:"ip_address"`
OriginURL string `json:"origin_url"`
EndUserID string `json:"end_user_id"`
EndUserProperties map[string]string `json:"end_user_properties"`
SurveyID string `json:"survey_id"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
ExcludeFromCalculations string `json:"excluded_from_calculations"`
CreatedAtTime time.Time
UpdatedAtTime time.Time
}
func (*WootricResponse) Property ¶
func (resp *WootricResponse) Property(key string) string
Click to show internal directories.
Click to hide internal directories.