Documentation ¶
Index ¶
Constants ¶
View Source
const ( ErrAssetTooLarge = "ErrAssetTooLarge" ErrAssetSizeUnknown = "ErrAssetSizeUnknown" ErrFailedToFetch = "ErrFailedToFetch" ErrFetchNotOk = "ErrFetchNotOk" // MaxAssetSize = 200 GB storage per ECS node / 64 parallel kafka workers MaxAssetSize = 3 * 1e9 MaxSnapshotSize = 64 * 1024 * 1024 )
View Source
const (
ScriptPlaceholder = "SCRIPT_PLACEHOLDER"
)
Variables ¶
View Source
var DisallowedTagPrefixes = []string{
"onchange",
"onclick",
"onkey",
"onload",
"onmouse",
}
View Source
var ProxyURL = fmt.Sprintf("%s/cors", env.Config.PublicGraphUri)
Functions ¶
func GetHostUrlFromEvents ¶
func GetHostUrlFromEvents(events []*ReplayEvent) *string
Types ¶
type Event ¶
func FilterEventsForInsights ¶
type EventSource ¶
type EventSource int
const ( Mutation EventSource = iota MouseMove MouseInteraction Scroll ViewportResize Input TouchMove MediaInteraction StyleSheetRule CanvasMutation Font Log Drag )
type MouseInteractionEventData ¶
type MouseInteractionEventData struct { X *float64 `json:"x"` Y *float64 `json:"y"` Source *EventSource `json:"source"` Type *MouseInteractions `json:"type"` }
MouseInteractionEventData represents the data field for click events from the following parent events
func UnmarshallMouseInteractionEvent ¶
func UnmarshallMouseInteractionEvent(data json.RawMessage) (*MouseInteractionEventData, error)
type MouseInteractions ¶
type MouseInteractions int
const ( MouseUp MouseInteractions = iota MouseDown Click ContextMenu DblClick Focus Blur TouchStart TouchMove_Departed TouchEnd TouchCancel )
type ReplayEvent ¶
type ReplayEvent struct { Timestamp time.Time `json:"-"` Type EventType `json:"type"` Data json.RawMessage `json:"data"` TimestampRaw float64 `json:"timestamp"` SID float64 `json:"_sid"` }
ReplayEvent represents a single event that represents a change on the DOM.
func (*ReplayEvent) UnmarshalJSON ¶
func (r *ReplayEvent) UnmarshalJSON(b []byte) error
type ReplayEvents ¶
type ReplayEvents struct {
Events []*ReplayEvent `json:"events"`
}
ReplayEvents is a set of ReplayEvent(s).
func EventsFromString ¶
func EventsFromString(eventsString string) (*ReplayEvents, error)
EventsFromString parses a json string in the form {events: [ev1, ev2, ...]}.
type Snapshot ¶
type Snapshot struct {
// contains filtered or unexported fields
}
func NewSnapshot ¶
func NewSnapshot(inputData json.RawMessage, hostUrl *string) (*Snapshot, error)
func (*Snapshot) EscapeJavascript ¶
EscapeJavascript adds a guardrail to prevent javascript from being stored in the recording.
func (*Snapshot) InjectStylesheets ¶
InjectStylesheets injects custom stylesheets into a given snapshot event.
func (*Snapshot) ReplaceAssets ¶
func (s *Snapshot) ReplaceAssets(ctx context.Context, projectId int, store *store.Store, retentionPeriod modelInputs.RetentionPeriod) error
Click to show internal directories.
Click to hide internal directories.