Documentation ¶
Overview ¶
Package erequest provides primitives for searching and processing data in Request files.
Index ¶
- func ParseRequestItem(data []byte) (logItem *types.APIRequest, err error)
- func RequestItemFind(le *types.APIRequest, query map[string]string) bool
- func RequestLast(loader loaders.Loader, query map[string]string, handler HandlerFunc) error
- func RequestPrn(le *types.APIRequest, format RequestFormat)
- type HandlerFunc
- type RequestFormat
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 ¶
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 )
Click to show internal directories.
Click to hide internal directories.