webserver

package
v0.0.24 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package webserver contains the logic and data structures necessary for the `webcan probe` command

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProbeReport

type ProbeReport struct {
	Targets []string     `json:"targets" yaml:"targets"`
	URLs    []URLDetails `json:"urls" yaml:"urls"`
	Errors  []string     `json:"errors" yaml:"errors"`
}

A ProbeReport represents a holistic report of all the URLs that were probed during a web server probe operation,

func PerformWebServerProbe

func PerformWebServerProbe(ctx context.Context, targets string, timeout time.Duration) (ProbeReport, error)

PerformWebServerProbe performs a web server probe against the provided targets, returning a ProbeReport with the results of the probe.

type URLDetails

type URLDetails struct {
	URL    string `json:"url" yaml:"url"`
	Status int    `json:"status" yaml:"status"`
	Title  string `json:"title" yaml:"title"`
}

URLDetails represents the data returned from a probe of a singular URL.

Jump to

Keyboard shortcuts

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