event

package
v1.72.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LocatorTypes = struct {
	ContentMatch LocatorType
	ElementMatch LocatorType
}{
	"css",
	"dom",
}

LocatorTypes offers the known enum values

View Source
var Types = struct {
	KeyStrokes   Type
	Cookie       Type
	SelectOption Type
	Javascript   Type
	Click        Type
	Tap          Type
	Navigate     Type
}{
	"keystrokes",
	"cookie",
	"selectOption",
	"javascript",
	"click",
	"tap",
	"navigate",
}

Types offers the known enum values

View Source
var ValidationTypes = struct {
	ContentMatch ValidationType
	ElementMatch ValidationType
}{
	`content_match`,
	`element_match`,
}

ValidationTypes offers the known enum values

Functions

func JSONBytesEqual

func JSONBytesEqual(b1, b2 []byte) bool

func JSONStringsEqual

func JSONStringsEqual(s1, s2 string) bool

func SuppressEquivalent

func SuppressEquivalent(k, old, new string, d *schema.ResourceData) bool

Types

type Click

type Click struct {
	EventBase
	Button   int            `json:"button"`             // the mouse button to be used for the click
	Wait     *WaitCondition `json:"wait,omitempty"`     // The wait condition for the event—defines how long Dynatrace should wait before the next action is executed
	Validate Validations    `json:"validate,omitempty"` // The validation rule for the event—helps you verify that your browser monitor loads the expected page content or page element
	Target   *Target        `json:"target,omitempty"`   // The tab on which the page should open
}

func (*Click) GetType

func (me *Click) GetType() Type

func (*Click) MarshalHCL

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

func (*Click) Schema

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

func (*Click) UnmarshalHCL

func (me *Click) UnmarshalHCL(decoder hcl.Decoder) error
type Cookie struct {
	EventBase
	Cookies request.Cookies `json:"cookies"` // Every cookie must be unique within the list. However, you can use the same cookie again in other event
}

func (*Cookie) GetType

func (me *Cookie) GetType() Type

func (*Cookie) MarshalHCL

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

func (*Cookie) Schema

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

func (*Cookie) UnmarshalHCL

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

type Credential

type Credential struct {
	ID    string `json:"id"`
	Field string `json:"field"`
}

func (*Credential) MarshalHCL

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

func (*Credential) Schema

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

func (*Credential) UnmarshalHCL

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

type Event

type Event interface {
	GetType() Type
	GetDescription() string
	SetDescription(string)
	MarshalHCL(hcl.Properties) error
}

type EventBase

type EventBase struct {
	Type        Type   `json:"type"`        // The type of synthetic event
	Description string `json:"description"` // A short description of the event to appear in the UI
}

func (*EventBase) GetDescription

func (me *EventBase) GetDescription() string

func (*EventBase) GetType

func (me *EventBase) GetType() Type

func (*EventBase) Schema

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

func (*EventBase) SetDescription

func (me *EventBase) SetDescription(description string)

type EventWrapper

type EventWrapper struct {
	Event Event
}

func (*EventWrapper) MarshalHCL

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

func (*EventWrapper) Schema

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

func (*EventWrapper) UnmarshalHCL

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

type Events

type Events []Event

func (Events) MarshalHCL

func (me Events) MarshalHCL(properties hcl.Properties) error

func (*Events) Schema

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

func (*Events) UnmarshalHCL

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

func (*Events) UnmarshalJSON

func (me *Events) UnmarshalJSON(data []byte) error

type Javascript

type Javascript struct {
	EventBase
	Javascript string         `json:"javaScript"`       // The JavaScript code to be executed in this event
	Wait       *WaitCondition `json:"wait,omitempty"`   // The wait condition for the event—defines how long Dynatrace should wait before the next action is executed
	Target     *Target        `json:"target,omitempty"` // The tab on which the page should open
}

func (*Javascript) GetType

func (me *Javascript) GetType() Type

func (*Javascript) MarshalHCL

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

func (*Javascript) Schema

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

func (*Javascript) UnmarshalHCL

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

type KeyStrokes

type KeyStrokes struct {
	EventBase
	TextValue         *string        `json:"textValue,omitempty"`  // The text to enter
	Masked            *bool          `json:"masked,omitempty"`     // Indicates whether the `textValue` is encrypted (`true`) or not (`false`)
	SimulateBlurEvent bool           `json:"simulateBlurEvent"`    // Defines whether to blur the text field when it loses focus.\nSet to `true` to trigger the blur the `textValue`
	SimulateReturnKey bool           `json:"simulateReturnKey"`    // Simulates pressing the 'Return' key after simulating other keystrokes. For example, to submit a form or trigger a login.
	Wait              *WaitCondition `json:"wait,omitempty"`       // The wait condition for the event—defines how long Dynatrace should wait before the next action is executed
	Validate          Validations    `json:"validate,omitempty"`   // The validation rule for the event—helps you verify that your browser monitor loads the expected page content or page element
	Target            *Target        `json:"target,omitempty"`     // The tab on which the page should open
	Credential        *Credential    `json:"credential,omitempty"` // Credentials for this event
}

func (*KeyStrokes) GetType

func (me *KeyStrokes) GetType() Type

func (*KeyStrokes) MarshalHCL

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

func (*KeyStrokes) Schema

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

func (*KeyStrokes) UnmarshalHCL

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

type ListOption

type ListOption struct {
	Index int    `json:"index"` // The index of the option to be selected
	Value string `json:"value"` // The value of the option to be selected
}

func (*ListOption) MarshalHCL

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

func (*ListOption) Schema

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

func (*ListOption) UnmarshalHCL

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

type ListOptions

type ListOptions []*ListOption

func (ListOptions) MarshalHCL

func (me ListOptions) MarshalHCL(properties hcl.Properties) error

func (*ListOptions) Schema

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

func (*ListOptions) UnmarshalHCL

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

type Locator

type Locator struct {
	Type  LocatorType `json:"type"`  // Defines where to look for an element. `css` (CSS Selector) or `dom` (Javascript code)
	Value string      `json:"value"` // The name of the element to be found
}

func (*Locator) MarshalHCL

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

func (*Locator) Schema

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

func (*Locator) UnmarshalHCL

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

type LocatorType

type LocatorType string

LocatorType defines where to look for an element. `css` (CSS Selector) or `dom` (Javascript code)

type Locators

type Locators []*Locator

Locators a list of locators identifying the desired element

func (Locators) MarshalHCL

func (me Locators) MarshalHCL(properties hcl.Properties) error

func (*Locators) Schema

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

func (*Locators) UnmarshalHCL

func (me *Locators) UnmarshalHCL(decoder hcl.Decoder) error
type Navigate struct {
	EventBase
	URL            string            `json:"url"`                      // The URL to navigate to
	Wait           *WaitCondition    `json:"wait,omitempty"`           // The wait condition for the event—defines how long Dynatrace should wait before the next action is executed
	Validate       Validations       `json:"validate,omitempty"`       // The validation rule for the event—helps you verify that your browser monitor loads the expected page content or page element
	Target         *Target           `json:"target,omitempty"`         // The tab on which the page should open
	Authentication *auth.Credentials `json:"authentication,omitempty"` // The login credentials to bypass the browser login mask
}
func (me *Navigate) GetType() Type
func (me *Navigate) MarshalHCL(properties hcl.Properties) error
func (me *Navigate) Schema() map[string]*schema.Schema
func (me *Navigate) UnmarshalHCL(decoder hcl.Decoder) error

type SelectOption

type SelectOption struct {
	EventBase
	Selections ListOptions    `json:"selections"`         // The options to be selected
	Wait       *WaitCondition `json:"wait,omitempty"`     // The wait condition for the event—defines how long Dynatrace should wait before the next action is executed
	Validate   Validations    `json:"validate,omitempty"` // The validation rule for the event—helps you verify that your browser monitor loads the expected page content or page element
	Target     *Target        `json:"target,omitempty"`   // The tab on which the page should open
}

func (*SelectOption) GetType

func (me *SelectOption) GetType() Type

func (*SelectOption) MarshalHCL

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

func (*SelectOption) Schema

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

func (*SelectOption) UnmarshalHCL

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

type Tap

type Tap struct {
	EventBase
	Button   int            `json:"button"`             // the mouse button to be used for the click
	Wait     *WaitCondition `json:"wait,omitempty"`     // The wait condition for the event—defines how long Dynatrace should wait before the next action is executed
	Validate Validations    `json:"validate,omitempty"` // The validation rule for the event—helps you verify that your browser monitor loads the expected page content or page element
	Target   *Target        `json:"target,omitempty"`   // The tab on which the page should open
}

func (*Tap) GetType

func (me *Tap) GetType() Type

func (*Tap) MarshalHCL

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

func (*Tap) Schema

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

func (*Tap) UnmarshalHCL

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

type Target

type Target struct {
	Window   *string  `json:"window,omitempty"`   // The tab of the target
	Locators Locators `json:"locators,omitempty"` // The list of locators identifying the desired element
}

func (*Target) MarshalHCL

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

func (*Target) Schema

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

func (*Target) UnmarshalHCL

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

type Type

type Type string

Type specifies the type of authentication. `basic` or `webform`

type Validation

type Validation struct {
	Type        ValidationType `json:"type"`              // The goal of the validation. `content_match` (check page for the specific content. Not allowed for validation inside of wait condition), `element_match` (check page for the specific element)
	Match       string         `json:"match"`             // The content to look for on the page.\nRegular expressions are allowed. In that case set `isRegex` as `true`. Required for `content_match`, optional for `element_match`.
	IsRegex     bool           `json:"isRegex,omitempty"` // Defines whether `match` is plain text (`false`) of a regular expression (`true`)
	FailIfFound bool           `json:"failIfFound"`       // The condition of the validation. `false` means the validation succeeds if the specified content/element is found. `true` means the validation fails if the specified content/element is found
	Target      *Target        `json:"target,omitempty"`  // The elemnt to look for on the page
}

func (*Validation) MarshalHCL

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

func (*Validation) Schema

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

func (*Validation) UnmarshalHCL

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

type ValidationType

type ValidationType string

ValidationType The goal of the validation. `content_match` (check page for the specific content. Not allowed for validation inside of wait condition), `element_match` (check page for the specific element)

type Validations

type Validations []*Validation

func (Validations) MarshalHCL

func (me Validations) MarshalHCL(properties hcl.Properties) error

func (*Validations) Schema

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

func (*Validations) UnmarshalHCL

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

type WaitCondition

type WaitCondition struct {
	WaitFor               string      `json:"waitFor"`                         // The time to wait before the next event is triggered. Possible values are `page_complete` (wait for the page to load completely), `network` (wait for background network activity to complete), `next_action` (wait for the next action), `time` (wait for a specified periodof time) and `validation` (wait for a specific element to appear)
	Milliseconds          *int        `json:"milliseconds,omitempty"`          // The time to wait, in millisencods. The maximum allowed value is `60000`. Required for the type `time`, not applicable otherwise.
	TimeoutInMilliseconds *int        `json:"timeoutInMilliseconds,omitempty"` // The maximum amount of time to wait for a certain element to appear, in milliseconds—if exceeded, the action is marked as failed.\nThe maximum allowed value is 60000. Required for the type `validation`, not applicable otherwise.
	Validation            *Validation `json:"validation,omitempty"`            // The element to wait for. Required for the `validation` type, not applicable otherwise.
}

func (*WaitCondition) MarshalHCL

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

func (*WaitCondition) Schema

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

func (*WaitCondition) UnmarshalHCL

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

Jump to

Keyboard shortcuts

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