netinspect

package
v0.0.0-...-1b34132 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeDomain = "domain"
	TypeIP     = "ip"

	SchemeHTTP  = "http"
	SchemeHTTPS = "https"

	PortHTTP  = 80
	PortHTTPS = 443
)

Variables

This section is empty.

Functions

func CheckTCP

func CheckTCP(ctx *appcontext.AppContext, address string) error

func IsValidICMP

func IsValidICMP(ctx *appcontext.AppContext, input string) bool

Types

type Domain

type Domain struct {
	IsHTTPS bool
	Name    string
	Scheme  string
	Port    int
}

func ParseDomain

func ParseDomain(ctx *appcontext.AppContext, input string) (*Domain, error)

type ICMP

type ICMP struct {
	PackageTransmitted int
	PackageReceived    int
	PackageLoss        float64
	IPAddress          string
	ResponseTimeInMs   int64
}

func CheckICMP

func CheckICMP(ctx *appcontext.AppContext, address string) (*ICMP, error)

type IP

type IP struct {
	List []string
}

func IPLookup

func IPLookup(ctx *appcontext.AppContext, host string) (*IP, error)

type Measure

type Measure struct {
	IsUp             bool
	ResponseTimeInMs int64
}

func MeasureHTTPResponseTime

func MeasureHTTPResponseTime(ctx *appcontext.AppContext, url string) (*Measure, error)

func MeasureTCPResponseTime

func MeasureTCPResponseTime(ctx *appcontext.AppContext, address string) (*Measure, error)

type SSL

type SSL struct {
	IsHTTPS  bool
	ExpireAt time.Time
	Issuer   string
}

func CheckSSL

func CheckSSL(ctx *appcontext.AppContext, host string, port int) (result *SSL, err error)

type URL

type URL struct {
	Type   string
	Value  string
	Host   string
	Scheme string
	Port   int
}

func ParseURL

func ParseURL(ctx *appcontext.AppContext, input string) (*URL, error)

Jump to

Keyboard shortcuts

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