check

package
v0.0.4-beta3 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Check

type Check interface {
	GetType() Type
	Check() Result
}

func NewGraphQLCheck

func NewGraphQLCheck(url string, query string, variables map[string]interface{}, certificateWarningDelta time.Duration, auth *HttpCheckAuth) Check

func NewHttpCheck

func NewHttpCheck(url string, expectedStatusCode *int, certificateWarningDelta time.Duration, auth *HttpCheckAuth) Check

func NewIcmpCheck

func NewIcmpCheck(addr string) Check

func NewTcpCheck

func NewTcpCheck(addr string) Check

func NewTlsCheck

func NewTlsCheck(url string, tlsConfig *tls.Config) Check

type GraphQLCheck

type GraphQLCheck struct {
	HttpCheck
	// contains filtered or unexported fields
}

func (GraphQLCheck) Check

func (h GraphQLCheck) Check() Result

func (GraphQLCheck) GetType

func (h GraphQLCheck) GetType() Type

type GraphQLCheckAuth

type GraphQLCheckAuth struct {
	OIDC *GraphQLCheckAuthOIDC `json:"oidc"`
}

type GraphQLCheckAuthOIDC

type GraphQLCheckAuthOIDC struct {
	ClientID     string   `json:"clientId"`
	ClientSecret string   `json:"clientSecret"`
	TokenURL     string   `json:"tokenUrl"`
	Scopes       []string `json:"scopes"`
	GrantType    string   `json:"grantType"`
	User         string   `json:"user"`
	Password     string   `json:"password"`
}

type GraphQLStatistics

type GraphQLStatistics struct {
	TimeTaken     time.Duration
	Headers       map[string][]string
	ContentLength int64
}

func (GraphQLStatistics) GetTimeTaken

func (i GraphQLStatistics) GetTimeTaken() time.Duration

type HttpCheck

type HttpCheck struct {
	// contains filtered or unexported fields
}

func (HttpCheck) Check

func (h HttpCheck) Check() Result

func (HttpCheck) GetHttpHeaders

func (h HttpCheck) GetHttpHeaders(ctx context.Context) (http.Header, error)

func (HttpCheck) GetType

func (h HttpCheck) GetType() Type

type HttpCheckAuth

type HttpCheckAuth struct {
	OIDC *HttpCheckAuthOIDC `json:"oidc"`
}

type HttpCheckAuthOIDC

type HttpCheckAuthOIDC struct {
	ClientID     string   `json:"clientId"`
	ClientSecret string   `json:"clientSecret"`
	TokenURL     string   `json:"tokenUrl"`
	Scopes       []string `json:"scopes"`
	GrantType    string   `json:"grantType"`
	User         string   `json:"user"`
	Password     string   `json:"password"`
}

type HttpStatistics

type HttpStatistics struct {
	TimeTaken     time.Duration
	StatusCode    int
	Headers       map[string][]string
	ContentLength int64
}

func (HttpStatistics) GetTimeTaken

func (i HttpStatistics) GetTimeTaken() time.Duration

type IcmpCheck

type IcmpCheck struct {
	// contains filtered or unexported fields
}

func (IcmpCheck) Check

func (h IcmpCheck) Check() (result Result)

func (IcmpCheck) GetType

func (h IcmpCheck) GetType() Type

type IcmpStatistics

type IcmpStatistics struct {
	TimeTaken      time.Duration
	PingStatistics *ping.Statistics
}

func (IcmpStatistics) GetTimeTaken

func (i IcmpStatistics) GetTimeTaken() time.Duration

type PeerCertificate

type PeerCertificate struct {
	Content []byte
}

type Result

type Result struct {
	Error               error
	Message             string
	Warnings            []Warning
	CertificateWarnings []Warning
	Statistics          Statistics
}

type Statistics

type Statistics interface {
	GetTimeTaken() time.Duration
}

type TcpCheck

type TcpCheck struct {
	// contains filtered or unexported fields
}

func (TcpCheck) Check

func (h TcpCheck) Check() Result

func (TcpCheck) GetType

func (h TcpCheck) GetType() Type

type TcpStatistics

type TcpStatistics struct {
	TimeTaken  time.Duration
	RemoteAddr string
}

func (TcpStatistics) GetTimeTaken

func (i TcpStatistics) GetTimeTaken() time.Duration

type TlsCheck

type TlsCheck struct {
	// contains filtered or unexported fields
}

func (TlsCheck) Check

func (h TlsCheck) Check() Result

func (TlsCheck) GetType

func (h TlsCheck) GetType() Type

type TlsStatistics

type TlsStatistics struct {
	TimeTaken        time.Duration
	PeerCertificates []PeerCertificate
}

func (TlsStatistics) GetTimeTaken

func (i TlsStatistics) GetTimeTaken() time.Duration

type Type

type Type string
const (
	HttpType    Type = "http"
	GraphQLType Type = "graphql"
	IcmpType    Type = "icmp"
	TcpType     Type = "tcp"
	TlsType     Type = "tls"
)

type Warning

type Warning struct {
	Message string
}

Jump to

Keyboard shortcuts

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