erequest

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package erequest provides primitives for searching and processing data in Request files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseRequestItem

func ParseRequestItem(data []byte) (logItem *types.APIRequest, err error)

ParseRequestItem apply regexp on APIRequest

func RequestItemFind

func RequestItemFind(le *types.APIRequest, query map[string]string) bool

RequestItemFind find APIRequest records by reqexps in 'query' corresponded to APIRequest structure.

func RequestLast

func RequestLast(loader loaders.Loader, query map[string]string, handler HandlerFunc) error

RequestLast function process Request files in the 'filepath' directory according to the 'query' reqexps and return last founded item

func RequestPrn

func RequestPrn(le *types.APIRequest, format RequestFormat)

RequestPrn print APIRequest data

Types

type HandlerFunc

type HandlerFunc func(request *types.APIRequest) bool

HandlerFunc must process APIRequest and return true to exit or false to continue

type RequestFormat

type RequestFormat byte

RequestFormat the format to print output Requests

const (
	//RequestLines returns requests line by line
	RequestLines RequestFormat = iota
	//RequestJSON returns requests in JSON format
	RequestJSON
)

Jump to

Keyboard shortcuts

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