localbundle

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: MIT Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArtifactSummary

type ArtifactSummary struct {
	Screenshot   bool `json:"screenshot"`
	Replay       bool `json:"replay"`
	ConsoleCount int  `json:"console_count"`
	NetworkCount int  `json:"network_count"`
	EventCount   int  `json:"event_count"`
}

ArtifactSummary counts the artifacts captured for a pin.

type Bundle

type Bundle struct {
	Path string
	// contains filtered or unexported fields
}

Bundle is a portable local Disbug report downloaded from the Chrome extension.

func Load

func Load(reportPath string) (*Bundle, error)

Load parses a portable local Disbug report JSON file.

func (*Bundle) InspectPin

func (b *Bundle) InspectPin(number int, fields []string, cacheDir string) (PinInspect, error)

InspectPin returns the field-selected details for one pin in the local report.

func (*Bundle) Summary

func (b *Bundle) Summary() (Summary, error)

Summary returns the source/session/pin summary for the local report.

type LocalAsset

type LocalAsset struct {
	Path        string `json:"path"`
	ContentType string `json:"content_type,omitempty"`
	SizeBytes   int64  `json:"size_bytes"`
}

LocalAsset describes a binary artifact (e.g. screenshot) extracted from a local report.

type LocalReplayFile

type LocalReplayFile struct {
	Path         string `json:"path"`
	ContentType  string `json:"content_type,omitempty"`
	SizeBytes    int64  `json:"size_bytes"`
	EventCount   int    `json:"event_count"`
	RRWebVersion string `json:"rrweb_version,omitempty"`
	StartedAt    string `json:"started_at,omitempty"`
	EndedAt      string `json:"ended_at,omitempty"`
}

LocalReplayFile describes the rrweb replay artifact extracted from a local report.

type PinInspect

type PinInspect struct {
	Number        int              `json:"number"`
	Feedback      string           `json:"feedback,omitempty"`
	URL           string           `json:"url,omitempty"`
	Selector      string           `json:"selector,omitempty"`
	ElementInfo   map[string]any   `json:"element_info,omitempty"`
	Metadata      map[string]any   `json:"metadata,omitempty"`
	Artifacts     ArtifactSummary  `json:"artifacts"`
	Screenshot    *LocalAsset      `json:"screenshot,omitempty"`
	SessionReplay *LocalReplayFile `json:"session_replay,omitempty"`
	Console       []map[string]any `json:"console,omitempty"`
	Network       []map[string]any `json:"network,omitempty"`
	Events        []map[string]any `json:"events,omitempty"`
}

PinInspect is the field-selected output for one local report pin.

type PinSummary

type PinSummary struct {
	Number    int             `json:"number"`
	Feedback  string          `json:"feedback,omitempty"`
	URL       string          `json:"url,omitempty"`
	Selector  string          `json:"selector,omitempty"`
	Artifacts ArtifactSummary `json:"artifacts"`
}

PinSummary is the per-pin summary in a local report.

type SessionSummary

type SessionSummary struct {
	ID        string `json:"id,omitempty"`
	Status    string `json:"status,omitempty"`
	URL       string `json:"url,omitempty"`
	UpdatedAt string `json:"updated_at,omitempty"`
	PinCount  int    `json:"pin_count"`
}

SessionSummary is the session-level summary of a local report.

type Summary

type Summary struct {
	Source  string         `json:"source"`
	Path    string         `json:"path"`
	Session SessionSummary `json:"session"`
	Pins    []PinSummary   `json:"pins"`
}

Summary is the lightweight output for a local report.

Jump to

Keyboard shortcuts

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