validation

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: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Types = struct {
	PatternConstraint               Type
	RegexConstraint                 Type
	HTTPStatusesList                Type
	CertificateExpiryDateConstraint Type
}{
	`patternConstraint`,
	`regexConstraint`,
	`httpStatusesList`,
	`certificateExpiryDateConstraint`,
}

ValidationRuleTypes offers the known enum values

Functions

This section is empty.

Types

type Rule

type Rule struct {
	Type        Type   `json:"type"`        // The type of the rule. Possible values are `patternConstraint`, `regexConstraint`, `httpStatusesList` and `certificateExpiryDateConstraint`
	PassIfFound bool   `json:"passIfFound"` // The validation condition. `true` means validation succeeds if the specified content/element is found. `false` means validation fails if the specified content/element is found. Always specify `false` for `certificateExpiryDateConstraint` to fail the monitor if SSL cedrtificate expiry is within the specified number of days
	Value       string `json:"value"`       // The content to look for
}

func (*Rule) MarshalHCL

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

func (*Rule) Schema

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

func (*Rule) UnmarshalHCL

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

type Rules

type Rules []*Rule

Rules is a list of validation rules

type Settings

type Settings struct {
	Rules Rules `json:"rules,omitempty"` // A list of validation rules
}

Settings helps you verify that your HTTP monitor loads the expected content

func (*Settings) MarshalHCL

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

func (*Settings) Schema

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

func (*Settings) UnmarshalHCL

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

type Type

type Type string

Type The type of the rule. Possible values are `patternConstraint`, `regexConstraint`, `httpStatusesList` and `certificateExpiryDateConstraint`

Jump to

Keyboard shortcuts

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