tempalerts

package
v0.0.0-...-f6774a9 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BLUE_ALERT = "#1e40af"
View Source
var FILE_NAME_LENGTH_LIMIT = 75
View Source
var GREEN_ALERT = "#2eb886"
View Source
var RED_ALERT = "#961e13"
View Source
var YELLOW_ALERT = "#f2c94c"

Functions

func GetLogAlertURL

func GetLogAlertURL(projectId int, query string, startDate time.Time, endDate time.Time) string

func SendAlertFeedback

func SendAlertFeedback(ctx context.Context, db *gorm.DB, mailClient *sendgrid.Client, obj *model.ErrorAlert, input *SendSlackAlertInput)

func SendErrorAlerts

func SendErrorAlerts(ctx context.Context, db *gorm.DB, mailClient *sendgrid.Client, lambdaClient *lambda.Client, obj *model.ErrorAlert, input *SendSlackAlertInput)

func SendSessionAlerts

func SendSessionAlerts(ctx context.Context, db *gorm.DB, mailClient *sendgrid.Client, lambdaClient *lambda.Client, obj *model.SessionAlert, input *SendSlackAlertInput)

func SendSlackLogAlert

func SendSlackLogAlert(ctx context.Context, db *gorm.DB, obj *model.LogAlert, input *SendSlackAlertForLogAlertInput) error

Types

type PropertyPair

type PropertyPair struct {
	// contains filtered or unexported fields
}

type SendSlackAlertForLogAlertInput

type SendSlackAlertForLogAlertInput struct {
	Body      string
	Workspace *model.Workspace
	StartDate time.Time
	EndDate   time.Time
}

type SendSlackAlertForMetricMonitorInput

type SendSlackAlertForMetricMonitorInput struct {
	Message   string
	Workspace *model.Workspace
}

type SendSlackAlertInput

type SendSlackAlertInput struct {
	// Workspace is a required parameter
	Workspace *model.Workspace
	// SessionSecureID is a required parameter
	SessionSecureID string
	// Project is a required parameter
	Project *model.Project
	// SessionExluded is a required parameter to tell if the session is playable
	SessionExcluded bool
	// UserIdentifier is a required parameter for New User, Error, and SessionFeedback alerts
	UserIdentifier string
	// UserObject is a required parameter for alerts that relate to a session
	UserObject model.JSONB
	// Group is a required parameter for Error alerts
	Group *model.ErrorGroup
	// ErrorObject is a required parameter for Error alerts
	ErrorObject *model.ErrorObject
	// URL is an optional parameter for Error alerts
	URL *string
	// ErrorsCount is a required parameter for Error alerts
	ErrorsCount *int64
	// FirstErrorAlert is a required parameter for Error alerts
	FirstErrorAlert bool
	// MatchedFields is a required parameter for Track Properties and User Properties alerts
	MatchedFields []*model.Field
	// RelatedFields is an optional parameter for Track Properties and User Properties alerts
	RelatedFields []*model.Field
	// UserProperties is a required parameter for User Properties alerts
	UserProperties map[string]string
	// CommentID is a required parameter for SessionFeedback alerts
	CommentID *int
	// CommentText is a required parameter for SessionFeedback alerts
	CommentText string
	// QueryParams is a map of query params to be appended to the url suffix
	// `key:value` will be converted to `key=value` in the url with the appropriate separator (`?` or `&`)
	// - tsAbs is required for rage click alerts
	QueryParams map[string]string
	// RageClicksCount is a required parameter for Rage Click Alerts
	RageClicksCount *int64
	// Timestamp is an optional value for all session alerts.
	Timestamp *time.Time
}

Jump to

Keyboard shortcuts

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