Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DebugMode = parseEnvBool(envDebugMode) IsPrimoVE bool )
Functions ¶
func SetIsPrimoVE ¶
func SetIsPrimoVE(yamlPath string)
SetIsPrimoVE sets the IsPrimoVE flag based on the yamlPath.
Types ¶
type AppCheckStatus ¶
type AppCheckStatus struct {
Application *Application
StatusOk bool
StatusContentOk bool
StatusCSPOk bool
ActualStatusCode int
ActualLocation string `default:""`
ActualContent string `default:""`
ActualCSP string `default:""`
}
AppCheckStatus represents the results of a synthetic test
func (AppCheckStatus) String ¶
func (results AppCheckStatus) String() string
String outputs the application status as a single string
type Application ¶
type Application struct {
Name string `yaml:"name"`
URL string `yaml:"url"`
ExpectedStatusCode int `yaml:"expected_status"`
Timeout time.Duration `yaml:"timeout"`
IncludeActualContentOnFailure bool `yaml:"include_actual_content_on_failure"`
MaxRedirects int `yaml:"max_redirects"`
ExpectedLocation string `yaml:"expected_location"`
ExpectedContent string `yaml:"expected_content"`
ExpectedCSP string `yaml:"expected_csp"`
}
Application represents a synthetic test on an external url to perform
func (Application) GetStatus ¶
func (test Application) GetStatus() *AppCheckStatus
GetStatus performs an HTTP request for the given application's URL and evaluates its response against expected criteria such as status code, redirect location, and optional content or CSP header.
Behavior summary:
- Always validates the original URL’s HTTP status and redirect (no auto-follow).
- If ExpectedContent is configured, also performs a GET request to fetch and validate page content (optionally following the expected redirect).
func (Application) IsGet ¶
func (test Application) IsGet() bool
Click to show internal directories.
Click to hide internal directories.