parser

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendJsonLinesRequests added in v1.0.0

func SendJsonLinesRequests(
	requestsWithContext chan<- RequestWithContext,
	reader *bufio.Reader,
	requestMethod string,
	staticHeaders []config.RequestHeader,
) error

func SendRequests

func SendRequests(
	requestsWithContext chan<- RequestWithContext,
	in io.Reader,
	requestMethod string,
	staticHeaders []config.RequestHeader,
) error

func SendUrlsRequests added in v1.0.0

func SendUrlsRequests(
	requestsWithContext chan<- RequestWithContext,
	reader *bufio.Reader,
	requestMethod string,
	staticHeaders []config.RequestHeader,
) error

Each line is an URL and optionally some TSV context that can be passed through an emitted along with the response output

Types

type InputType added in v1.0.0

type InputType int
const (
	Unknown InputType = iota
	Urls
	JsonLines
)

type JsonLine added in v1.0.0

type JsonLine struct {
	URL      string            `json:"url"`
	Method   string            `json:"method"`
	Context  interface{}       `json:"context"`
	Headers  map[string]string `json:"headers"`
	Body     json.RawMessage   `json:"body"`
	BodyType string            `json:"bodyType"`
}

type RequestWithContext added in v1.0.0

type RequestWithContext struct {
	Request        *http.Request
	RequestContext interface{}
}

Jump to

Keyboard shortcuts

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