erequest

package
v0.1.4-alpha Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2021 License: Apache-2.0 Imports: 11 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 *server.ApiRequest, err error)

ParseRequestItem apply regexp on ApiRequest

func RequestItemFind

func RequestItemFind(le *server.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 *server.ApiRequest, format RequestFormat)

RequestPrn print ApiRequest data

Types

type HandlerFunc

type HandlerFunc func(request *server.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