browser

package
v1.49.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Orientations = struct {
	Portrait  Orientation
	Landscape Orientation
}{
	`portrait`,
	`landscape`,
}

Orientations offers the known enum values

View Source
var ScriptTypes = struct {
	ClickPath    ScriptType
	Availability ScriptType
}{
	"clickpath",
	"availability",
}

ScriptTypes offers the known enum values

Functions

This section is empty.

Types

type Bandwidth

type Bandwidth struct {
	NetworkType *string `json:"networkType,omitempty"` // The type of the preconfigured network—when editing in the browser, press `Crtl+Spacebar` to see the list of available networks
	Latency     *int    `json:"latency,omitempty"`     // The latency of the network, in milliseconds
	Download    *int    `json:"download,omitempty"`    // The download speed of the network, in bytes per second
	Upload      *int    `json:"upload,omitempty"`      // The upload speed of the network, in bytes per second
}

func (*Bandwidth) MarshalHCL

func (me *Bandwidth) MarshalHCL(properties hcl.Properties) error

func (*Bandwidth) Schema

func (me *Bandwidth) Schema() map[string]*schema.Schema

func (*Bandwidth) UnmarshalHCL

func (me *Bandwidth) UnmarshalHCL(decoder hcl.Decoder) error

type Device

type Device struct {
	Name         *string      `json:"deviceName,omitempty"`   // The name of the preconfigured device—when editing in the browser, press `Crtl+Spacebar` to see the list of available devices
	Orientation  *Orientation `json:"orientation,omitempty"`  // The orientation of the device. Possible values are `portrait` or `landscape`. Desktop and laptop devices are not allowed to use the `portrait` orientation
	Mobile       *bool        `json:"mobile,omitempty"`       // The flag of the mobile device.\nSet to `true` for mobile devices or `false` for a desktop or laptop. Required if `touchEnabled` is specified.
	TouchEnabled *bool        `json:"touchEnabled,omitempty"` // The flag of the touchscreen.\nSet to `true` if the device uses touchscreen. In that case, use can set interaction event as `tap`. Required if `mobile` is specified.
	Width        *int         `json:"width,omitempty"`        // The width of the screen in pixels.\nThe maximum allowed width is `1920`
	Height       *int         `json:"height,omitempty"`       // The height of the screen in pixels.\nThe maximum allowed width is `1080`
	ScaleFactor  *float64     `json:"scaleFactor,omitempty"`  // The pixel ratio of the device
}

func (*Device) MarshalHCL

func (me *Device) MarshalHCL(properties hcl.Properties) error

func (*Device) Schema

func (me *Device) Schema() map[string]*schema.Schema

func (*Device) UnmarshalHCL

func (me *Device) UnmarshalHCL(decoder hcl.Decoder) error

type IgnoredErrorCodes

type IgnoredErrorCodes struct {
	StatusCodes              string  `json:"statusCodes"`                        // You can use exact number, range or status class mask. Multiple values can be separated by comma, i.e. 404, 405-410, 5xx
	MatchingDocumentRequests *string `json:"matchingDocumentRequests,omitempty"` // Only apply to document request matching this regex
}

func (*IgnoredErrorCodes) MarshalHCL

func (me *IgnoredErrorCodes) MarshalHCL(properties hcl.Properties) error

func (*IgnoredErrorCodes) Schema

func (me *IgnoredErrorCodes) Schema() map[string]*schema.Schema

func (*IgnoredErrorCodes) UnmarshalHCL

func (me *IgnoredErrorCodes) UnmarshalHCL(decoder hcl.Decoder) error

type JavascriptSettings

type JavascriptSettings struct {
	TimeoutSettings         *TimeoutSettings         `json:"timeoutSettings"`
	CustomProperties        *string                  `json:"customProperties"`
	VisuallyCompleteOptions *VisuallyCompleteOptions `json:"visuallyCompleteOptions"`
}

func (*JavascriptSettings) MarshalHCL

func (me *JavascriptSettings) MarshalHCL(properties hcl.Properties) error

func (*JavascriptSettings) Schema

func (me *JavascriptSettings) Schema() map[string]*schema.Schema

func (*JavascriptSettings) UnmarshalHCL

func (me *JavascriptSettings) UnmarshalHCL(decoder hcl.Decoder) error

type MonitorFrames

type MonitorFrames struct {
	Enabled bool `json:"enabled"`
}

type Orientation

type Orientation string

Orientation The orientation of the device— `portrait` or `landscape`

type Script

type Script struct {
	Version       string        `json:"version"`                 // Script version—use the `1.0` value here
	Type          ScriptType    `json:"type"`                    // The type of monitor. Possible values are `clickpath` for clickpath monitors and `availability` for single-URL browser monitors. These monitors are only allowed to have one event of the `navigate` type
	Configuration *ScriptConfig `json:"configuration,omitempty"` // The setup of the monitor
	Events        event.Events  `json:"events,omitempty"`        // Steps of the clickpath—the first step must always be of the `navigate` type
}

func (*Script) GetVersion

func (me *Script) GetVersion() string

func (*Script) MarshalHCL

func (me *Script) MarshalHCL(properties hcl.Properties) error

func (*Script) Schema

func (me *Script) Schema() map[string]*schema.Schema

func (*Script) UnmarshalHCL

func (me *Script) UnmarshalHCL(decoder hcl.Decoder) error

type ScriptConfig

type ScriptConfig struct {
	UserAgent          *string                 `json:"userAgent,omitempty"`          // The user agent of the request
	Device             *Device                 `json:"device,omitempty"`             // The emulated device of the monitor—holds either the parameters of the custom device or the name and orientation of the preconfigured device.\n\nIf not set, then the Desktop preconfigured device is used
	Bandwidth          *Bandwidth              `json:"bandwidth,omitempty"`          // The emulated network conditions of the monitor.\n\nIf not set, then the full available bandwidth is used
	RequestHeaders     *request.HeadersSection `json:"requestHeaders,omitempty"`     // The list of HTTP headers to be sent with requests of the monitor
	Cookies            request.Cookies         `json:"cookies,omitempty"`            // These cookies are added before execution of the first step
	BlockRequests      []string                `json:"blockRequests,omitempty"`      // Block these URLs
	BypassCSP          bool                    `json:"bypassCSP"`                    // Bypass Content Security Policy of monitored pages
	MonitorFrames      *MonitorFrames          `json:"monitorFrames,omitempty"`      // Capture performance metrics for pages loaded in frames
	JavascriptSettings *JavascriptSettings     `json:"javaScriptSettings,omitempty"` // Custom JavaScript Agent settings
	DisableWebSecurity bool                    `json:"disableWebSecurity"`           // No documentation available
	IgnoredErrorCodes  *IgnoredErrorCodes      `json:"ignoredErrorCodes"`            // Ignore specific status codes
}

ScriptConfig contains the setup of the monitor

func (*ScriptConfig) MarshalHCL

func (me *ScriptConfig) MarshalHCL(properties hcl.Properties) error

func (*ScriptConfig) Schema

func (me *ScriptConfig) Schema() map[string]*schema.Schema

func (*ScriptConfig) UnmarshalHCL

func (me *ScriptConfig) UnmarshalHCL(decoder hcl.Decoder) error

type ScriptType

type ScriptType string

ScriptType The type of monitor. Possible values are `clickpath` for clickpath monitors and `availability` for single-URL browser monitors. These monitors are only allowed to have one event of the `navigate` type

type SyntheticMonitor

type SyntheticMonitor struct {
	monitors.SyntheticMonitor
	KeyPerformanceMetrics *monitors.KeyPerformanceMetrics `json:"keyPerformanceMetrics"` // The key performance metrics configuration
	Script                *Script                         `json:"script,omitempty"`
}

BrowserSyntheticMonitorUpdate Browser synthetic monitor update. Some fields are inherited from base `SyntheticMonitorUpdate` model

func (*SyntheticMonitor) GetType

func (me *SyntheticMonitor) GetType() monitors.Type

func (*SyntheticMonitor) MarshalHCL

func (me *SyntheticMonitor) MarshalHCL(properties hcl.Properties) error

func (*SyntheticMonitor) MarshalJSON

func (me *SyntheticMonitor) MarshalJSON() ([]byte, error)

func (*SyntheticMonitor) Schema

func (me *SyntheticMonitor) Schema() map[string]*schema.Schema

func (*SyntheticMonitor) UnmarshalHCL

func (me *SyntheticMonitor) UnmarshalHCL(decoder hcl.Decoder) error

type TimeoutSettings

type TimeoutSettings struct {
	TemporaryActionLimit        int `json:"temporaryActionLimit"`        // Track up to n cascading setTimeout calls
	TemporaryActionTotalTimeout int `json:"temporaryActionTotalTimeout"` // Limit cascading timeouts cumulatively to n ms
}

func (*TimeoutSettings) MarshalHCL

func (me *TimeoutSettings) MarshalHCL(properties hcl.Properties) error

func (*TimeoutSettings) Schema

func (me *TimeoutSettings) Schema() map[string]*schema.Schema

func (*TimeoutSettings) UnmarshalHCL

func (me *TimeoutSettings) UnmarshalHCL(decoder hcl.Decoder) error

type VisuallyCompleteOptions

type VisuallyCompleteOptions struct {
	ImageSizeThreshold int      `json:"imageSizeThreshold"` // Use this setting to define the minimum visible area per element (in pixels) for an element to be counted towards Visually complete and Speed index
	InactivityTimeout  int      `json:"inactivityTimeout"`  // The time the Visually complete module waits for inactivity and no further mutations on the page after the load action
	MutationTimeout    int      `json:"mutationTimeout"`    // The time the Visually complete module waits after an XHR or custom action closes to start the calculation
	ExcludedURLs       []string `json:"excludedUrls"`       // Use regular expressions to define URLs for images and iFrames to exclude from detection by the Visually complete module
	ExcludedElements   []string `json:"excludedElements"`   // Query CSS selectors to specify mutation nodes (elements that change) to ignore in Visually complete and Speed index calculation
}

func (*VisuallyCompleteOptions) MarshalHCL

func (me *VisuallyCompleteOptions) MarshalHCL(properties hcl.Properties) error

func (*VisuallyCompleteOptions) Schema

func (me *VisuallyCompleteOptions) Schema() map[string]*schema.Schema

func (*VisuallyCompleteOptions) UnmarshalHCL

func (me *VisuallyCompleteOptions) UnmarshalHCL(decoder hcl.Decoder) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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