cmd

package
v0.0.0-...-51fe4c8 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Overview

Copyright © 2024 Dr. Harald Leinders <harald@leinders.de>

Copyright © 2024 Dr. Harald Leinders <harald@leinders.de>

Copyright © 2024 Dr. Harald Leinders <harald@leinders.de>

Copyright © 2024 Dr. Harald Leinders <harald@leinders.de>

Copyright © 2024 Dr. Harald Leinders <harald@leinders.de>

Copyright © 2024 Dr. Harald Leinders <harald@leinders.de>

Copyright © 2024 Dr. Harald Leinders <harald@leinders.de>

Copyright © 2024 Dr. Harald Leinders <harald@leinders.de>

Index

Constants

View Source
const (
	OK = iota
	ErrUndef
	ErrNoArg
	ErrCookieJar
	ErrRequest
	ErrResponse
	ErrResolve
	ErrGetFlag
	ErrTimeFmt
	ErrNoURL
	ErrFileIO
	ErrNoFile
	ErrNoMethod
)

Return values

View Source
const (
	AppName                  = "HtProbe"
	AppVersion               = "1.2 (2024-04-05)"
	Author                   = "Harald Leinders <harald@leinders.de>"
	DefaultConnectionTimeout = 3
	MaxRedirects             = 25
	MaxHeaderLen             = 30
)

Variables

View Source
var AllowedHttpMethods = []RequestMethod{
	{"GET", false},
	{"HEAD", false},
	{"POST", true},
	{"PUT", true},
	{"PATCH", true},
	{"DELETE", false},
	{"CONNECT", false},
	{"OPTIONS", false},
	{"TRACE", false},
}

Functions

func ExecCertificate

func ExecCertificate(cmd *cobra.Command, args []string)

func ExecContent

func ExecContent(cmd *cobra.Command, args []string)

func ExecCookies

func ExecCookies(cmd *cobra.Command, args []string)

func ExecHeaders

func ExecHeaders(cmd *cobra.Command, args []string)

func ExecRedirects

func ExecRedirects(cmd *cobra.Command, args []string)

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func PersistentPreRun

func PersistentPreRun(cmd *cobra.Command, args []string)

Types

type CertificateFlags

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

type ConnectionSetup

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

type ContentFlags

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

type CookieFlags

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

type HeaderFlags

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

type RedirectFlags

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

type RequestMethod

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

type RootFlags

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

type WebRequest

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

func (WebRequest) String

func (r WebRequest) String() string

type WebRequestResult

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

func (WebRequestResult) GetRequest

func (r WebRequestResult) GetRequest() string

func (WebRequestResult) PrettyPrintFirst

func (r WebRequestResult) PrettyPrintFirst() string

func (WebRequestResult) PrettyPrintLast

func (r WebRequestResult) PrettyPrintLast() string

func (WebRequestResult) PrettyPrintNormal

func (r WebRequestResult) PrettyPrintNormal(lastStatusCode int) string

func (WebRequestResult) PrettyPrintRedir

func (r WebRequestResult) PrettyPrintRedir(num int) string

func (WebRequestResult) String

func (r WebRequestResult) String() string

Jump to

Keyboard shortcuts

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