config

package
v0.0.0-...-9fb6cf1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MODE_HTTP = iota + 1
	MODE_SOCKET
)
View Source
const (
	SPACE = " "
	COLON = ":"
)

Variables

View Source
var (
	HTTPVer          = "1.1"
	HTTPSVer         = "1.1"
	HTTP             = "http"
	HTTPS            = "https"
	MethodSocket     = "SOCKET"
	MethodAbsSocket  = "ABSSOCKET"
	AllSupportedConn = []string{MethodSocket, http.MethodGet, http.MethodPut, http.MethodPost, http.MethodDelete, http.MethodPatch}
	Help             = `` /* 357-byte string literal not displayed */

)

Functions

This section is empty.

Types

type Flags

type Flags struct {
	// Verbose to turn on/off the verbose output mode
	Verbose bool
	// Method denotes the http method the current http request is using
	Method string
	// Data denotes the payload to be sent to the server parsed via command line
	Data string
	// Headers denotes the header information to be sent to the server
	Headers string
	// UnixSocket flag sets scour into unixsocket mode
	UnixSocket bool
	// InteractiveMode opens scour console where requests can be sent and received interactively
	InteractiveMode bool
	// SocketLoc saves the path to the socket to be created
	SocketLoc string
}

Flags struct holds the flag values passed in via the commandline to Scour.

func NewFlags

func NewFlags() *Flags

NewFlags is a consuructor function for Flags

func (*Flags) Resolve

func (f *Flags) Resolve() int

Resolve resolves the mode of the current request

func (*Flags) ValidateAll

func (f *Flags) ValidateAll() error

ValidateAll implements validation for Flags values

Jump to

Keyboard shortcuts

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