Documentation ¶
Index ¶
- Constants
- Variables
- type CustomTableModel
- func (m *CustomTableModel) AddEditedRequest(r *Request, id int64)
- func (m *CustomTableModel) AddEditedResponse(r *Response, id int64)
- func (m *CustomTableModel) AddRequest(r *Request, id int64)
- func (m *CustomTableModel) AddResponse(r *Response, id int64)
- func (m *CustomTableModel) GetReqResp(i int64) (*Request, *Request, *Response, *Response)
- type Filter
- type HTTPItem
- type Request
- type Response
- type Row
- type SortFilterModel
Constants ¶
const ( ID = iota Host Method Path Params Edit Status Length Ip )
Variables ¶
var DefaultFilter = &Filter{ Search: "", StatusCode: []int{100, 200, 300, 400, 500}, Show: false, Hide: true, HideExt: []string{"jpg", "png"}, ShowExt: []string{"asp", "php"}, ScopeOnly: false, Scope: []string{}, }
var HashMapHistory = make(map[int64]int)
used to map id to actual rows in the table
var History []*Row
Functions ¶
This section is empty.
Types ¶
type CustomTableModel ¶
type CustomTableModel struct { core.QAbstractTableModel // contains filtered or unexported fields }
CustomTableModel represents a table model used to populate the history QtTableView
func (*CustomTableModel) AddEditedRequest ¶
func (m *CustomTableModel) AddEditedRequest(r *Request, id int64)
AddEditedRequest adds an edited Request to the history
func (*CustomTableModel) AddEditedResponse ¶
func (m *CustomTableModel) AddEditedResponse(r *Response, id int64)
AddEditedResponse adds an edited Response to the history
func (*CustomTableModel) AddRequest ¶
func (m *CustomTableModel) AddRequest(r *Request, id int64)
AddRequest adds a Request to the history
func (*CustomTableModel) AddResponse ¶
func (m *CustomTableModel) AddResponse(r *Response, id int64)
AddResponse adds a Response to the history
func (*CustomTableModel) GetReqResp ¶
GetReqResp retursn request, response, edited request and edited response for a given context.ID
type Filter ¶
type Filter struct { Search string StatusCode []int Show bool Hide bool ShowExt []string HideExt []string ScopeOnly bool Scope []string }
Filter represents the filter of the history table
type HTTPItem ¶
type HTTPItem struct { core.QObject ID int Req *Request Resp *Response EditedReq *Request EditedResp *Response }
HTTPItem represent an item in the history table
type Request ¶
type Request struct { ID int64 URL *url.URL Proto string Method string Host string Headers http.Header ContentLength int64 Body []byte Extension string Params bool IP string }
Request represents an HTTP request logged in the history
type Response ¶
type Response struct { ID int64 Proto string Status string StatusCode int Headers http.Header ContentLength int64 Body []byte }
Response represents an HTTP response logged in the history
type SortFilterModel ¶
type SortFilterModel struct { core.QSortFilterProxyModel Custom *CustomTableModel // contains filtered or unexported fields }
SortFilterModel represent a sorted filter model to perform sorting and filtering of the history table
func (*SortFilterModel) GetRowId ¶
func (m *SortFilterModel) GetRowId(r int) int64
func (*SortFilterModel) ResetFilters ¶
func (m *SortFilterModel) ResetFilters()
ResetFilters remove all filters on the model
func (*SortFilterModel) SetFilter ¶
func (m *SortFilterModel) SetFilter(f *Filter)
SetFilter sets a filter on the model