Documentation ¶
Index ¶
- Constants
- Variables
- func SetUserAgentVersion(version string)
- type CheckContext
- type Error
- func ValidateContentType(ctx *CheckContext) (errs []Error)
- func ValidateDuration(ctx *CheckContext) (errs []Error)
- func ValidateGoQuery(ctx *CheckContext) (errs []Error)
- func ValidateHeaders(ctx *CheckContext) (errs []Error)
- func ValidateJsonPath(ctx *CheckContext) (errs []Error)
- func ValidateMatchReply(ctx *CheckContext) (errs []Error)
- func ValidateRedirects(ctx *CheckContext) (errs []Error)
- func ValidateRegex(ctx *CheckContext) (errs []Error)
- func ValidateStatusCode(ctx *CheckContext) (errs []Error)
- type ErrorType
- type Result
- type ValidatorFunc
- type Watcher
Constants ¶
View Source
const ( ErrorInvalidEndpoint ErrorType = "endpointInvalid" ErrorTypeServerTooSlow = "serverTooSlow" ErrorTypeNotImplemented = "notImplemented" ErrorTypeUnknownError = "unknownError" ErrorTypeClientError = "clientError" ErrorTypeDNS = "dns" ErrorTypeDNSConfig = "dnsConfig" ErrorTypeTLSCertificateInvalid = "tlsCertificateInvalid" ErrorTypeTLSHostNameError = "tlsHostNameError" ErrorTypeTLSSystemRootsError = "tlsSystemRootsError" ErrorTypeTLSUnknownAuthority = "tlsUnknownAutority" ErrorTypeWrongHTTPStatusCode = "wrongHTTPStatus" ErrorTypeCertificateIsExpiring = "certificateIsExpiring" ErrorTypeUnexpectedContentType = "unexpectedContentType" ErrorTypeSessionFail = "sessionFail" ErrorTypeGoQueryMismatch = "goqueryMismatch" ErrorTypeGoQuery = "goQueryGeneralError" ErrorTypeDataMismatch = "dataMismatch" ErrorJsonPath = "jsonPathError" ErrorRegex = "regexError" ErrorBadResponseBody = "badResponseBody" ErrorTypeHeaderMismatch = "headerMismatch" ErrorTypeRedirectMismatch = "redirectMismatch" ErrorTypeReplyMismatch = "replyMismatch" )
Variables ¶
View Source
var ContextValidators = []ValidatorFunc{ ValidateRedirects, ValidateHeaders, ValidateStatusCode, ValidateJsonPath, ValidateGoQuery, ValidateDuration, ValidateContentType, ValidateRegex, ValidateMatchReply, }
Functions ¶
func SetUserAgentVersion ¶
func SetUserAgentVersion(version string)
Types ¶
type CheckContext ¶
type CheckContext struct {
// contains filtered or unexported fields
}
type Error ¶
type Error struct { Error string `json:"error"` Type ErrorType `json:"type"` Comment string `json:"comment,omitempty"` Location string `json:"location,omitempty"` }
func ValidateContentType ¶
func ValidateContentType(ctx *CheckContext) (errs []Error)
func ValidateDuration ¶
func ValidateDuration(ctx *CheckContext) (errs []Error)
func ValidateGoQuery ¶
func ValidateGoQuery(ctx *CheckContext) (errs []Error)
func ValidateHeaders ¶
func ValidateHeaders(ctx *CheckContext) (errs []Error)
func ValidateJsonPath ¶
func ValidateJsonPath(ctx *CheckContext) (errs []Error)
func ValidateMatchReply ¶
func ValidateMatchReply(ctx *CheckContext) (errs []Error)
func ValidateRedirects ¶
func ValidateRedirects(ctx *CheckContext) (errs []Error)
func ValidateRegex ¶
func ValidateRegex(ctx *CheckContext) (errs []Error)
func ValidateStatusCode ¶
func ValidateStatusCode(ctx *CheckContext) (errs []Error)
type Result ¶
type ValidatorFunc ¶
type ValidatorFunc func(ctx *CheckContext) (errs []Error)
type Watcher ¶
type Watcher struct {
// contains filtered or unexported fields
}
func (*Watcher) LastErrors ¶
func (*Watcher) SetLastErrors ¶
Click to show internal directories.
Click to hide internal directories.