Documentation ¶
Index ¶
- func CreateZapierRoutes(r chi.Router, db *gorm.DB, store *ZapierResthookStore, rh *resthooks.Resthook)
- func GenerateZapierAccessToken(projectId int) (string, error)
- func RequireValidZapierAuth(next http.Handler) http.Handler
- func SetupZapierAuthContextMiddleware(db *gorm.DB) func(http.Handler) http.Handler
- type HookPayload
- type ParsedZapierToken
- type ZapierResthookStore
- func (s *ZapierResthookStore) DeleteById(id int, r *http.Request) error
- func (s *ZapierResthookStore) FindById(id int) (*resthooks.Subscription, error)
- func (s *ZapierResthookStore) FindByUserId(project_id int, event string) (*resthooks.Subscription, error)
- func (s *ZapierResthookStore) Save(sub *resthooks.Subscription, r *http.Request) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateZapierRoutes ¶
func CreateZapierRoutes(r chi.Router, db *gorm.DB, store *ZapierResthookStore, rh *resthooks.Resthook)
Types ¶
type HookPayload ¶
type HookPayload struct { // UserIdentifier is a required parameter for New User, Error, and SessionFeedback alerts UserIdentifier string `json:"user_identifier"` // UserObject is a required parameter for alerts that relate to a session UserObject model.JSONB `json:"user_object"` // Group is a required parameter for Error alerts Group *model.ErrorGroup `json:"group"` // URL is an optional parameter for Error alerts URL *string `json:"url"` // ErrorsCount is a required parameter for Error alerts ErrorsCount *int64 `json:"errors_count"` // MatchedFields is a required parameter for Track Properties and User Properties alerts MatchedFields []*model.Field `json:"matched_fields"` // RelatedFields is an optional parameter for Track Properties and User Properties alerts RelatedFields []*model.Field `json:"related_fields"` // UserProperties is a required parameter for User Properties alerts UserProperties map[string]string `json:"user_properties"` // CommentID is a required parameter for SessionFeedback alerts CommentID *int `json:"comment_id"` // CommentText is a required parameter for SessionFeedback alerts CommentText string `json:"comment_text"` // RageClicksCount is a required parameter for Rage Click Alerts RageClicksCount *int64 `json:"rage_clicks_count"` // MetricValue is a required parameter for MetricMonitor alerts MetricValue *float64 `json:"metric_value"` // MetricValue is a required parameter for MetricMonitor alerts MetricThreshold *float64 `json:"metric_threshold"` // Timestamp is an optional value for all session alerts. Timestamp *time.Time `json:"timestamp"` }
type ParsedZapierToken ¶
func ParseZapierAccessToken ¶
func ParseZapierAccessToken(token string) (*ParsedZapierToken, error)
type ZapierResthookStore ¶
func (*ZapierResthookStore) DeleteById ¶
func (s *ZapierResthookStore) DeleteById(id int, r *http.Request) error
func (*ZapierResthookStore) FindById ¶
func (s *ZapierResthookStore) FindById(id int) (*resthooks.Subscription, error)
func (*ZapierResthookStore) FindByUserId ¶
func (s *ZapierResthookStore) FindByUserId(project_id int, event string) (*resthooks.Subscription, error)
func (*ZapierResthookStore) Save ¶
func (s *ZapierResthookStore) Save(sub *resthooks.Subscription, r *http.Request) error
Click to show internal directories.
Click to hide internal directories.