Documentation ¶
Overview ¶
Package search provides termshark's search widget including the various drop down menus to control the type of search to be issued.
Index ¶
- type HexSearchValidator
- func (f *HexSearchValidator) Kill() (bool, error)
- func (f *HexSearchValidator) SetEmpty(cb filter.IValidateCB)
- func (f *HexSearchValidator) SetInvalid(cb filter.IValidateCB)
- func (f *HexSearchValidator) SetKilled(cb filter.IValidateCB)
- func (f *HexSearchValidator) SetValid(cb filter.IValidateCB)
- func (f *HexSearchValidator) Validate(filter string)
- type IAlgorithm
- type ICallbacks
- type IErrorHandler
- type INeedle
- type IRequestStop
- type IResult
- type IntermediateResult
- type RegexSearchValidator
- func (f *RegexSearchValidator) Kill() (bool, error)
- func (f *RegexSearchValidator) SetEmpty(cb filter.IValidateCB)
- func (f *RegexSearchValidator) SetInvalid(cb filter.IValidateCB)
- func (f *RegexSearchValidator) SetKilled(cb filter.IValidateCB)
- func (f *RegexSearchValidator) SetValid(cb filter.IValidateCB)
- func (f *RegexSearchValidator) Validate(filter string)
- type Result
- type StringSearchValidator
- func (f *StringSearchValidator) Kill() (bool, error)
- func (f *StringSearchValidator) SetEmpty(cb filter.IValidateCB)
- func (f *StringSearchValidator) SetInvalid(cb filter.IValidateCB)
- func (f *StringSearchValidator) SetKilled(cb filter.IValidateCB)
- func (f *StringSearchValidator) SetValid(cb filter.IValidateCB)
- func (f *StringSearchValidator) Validate(filter string)
- type Widget
- func (w *Widget) CaseSensitive() bool
- func (w *Widget) Clear(app gowid.IApp)
- func (w *Widget) Close(app gowid.IApp) error
- func (w *Widget) Focus() int
- func (w *Widget) FocusIsOnFilter() bool
- func (w *Widget) GetPreferedPosition() gwutil.IntOption
- func (w *Widget) Open(app gowid.IApp)
- func (w *Widget) SetCaseSensitive(val bool)
- func (w *Widget) SetFocus(app gowid.IApp, i int)
- func (w *Widget) SetPreferedPosition(cols int, app gowid.IApp)
- func (w *Widget) SetValue(val string, app gowid.IApp)
- func (w *Widget) SubWidgets() []gowid.IWidget
- func (w *Widget) Value() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HexSearchValidator ¶
type HexSearchValidator struct { Valid filter.IValidateCB Invalid filter.IValidateCB KilledCB filter.IValidateCB EmptyCB filter.IValidateCB }
func (*HexSearchValidator) Kill ¶
func (f *HexSearchValidator) Kill() (bool, error)
func (*HexSearchValidator) SetEmpty ¶
func (f *HexSearchValidator) SetEmpty(cb filter.IValidateCB)
func (*HexSearchValidator) SetInvalid ¶
func (f *HexSearchValidator) SetInvalid(cb filter.IValidateCB)
func (*HexSearchValidator) SetKilled ¶
func (f *HexSearchValidator) SetKilled(cb filter.IValidateCB)
func (*HexSearchValidator) SetValid ¶
func (f *HexSearchValidator) SetValid(cb filter.IValidateCB)
func (*HexSearchValidator) Validate ¶
func (f *HexSearchValidator) Validate(filter string)
type IAlgorithm ¶
type IAlgorithm interface {
SearchPackets(term INeedle, cb ICallbacks, app gowid.IApp)
}
type ICallbacks ¶
type ICallbacks interface { Reset(app gowid.IApp) // Intended to make things ready for next "Find" invocation StartingPosition() (interface{}, error) SearchPacketsFrom(from interface{}, start interface{}, term INeedle, app gowid.IApp) SearchPacketsResult(res Result, app gowid.IApp) RequestStop(app gowid.IApp) OnTick(app gowid.IApp) OnError(err error, app gowid.IApp) }
ICallbacks is intended to be a callback issued when the Find invocation yields a result of some kind
type IErrorHandler ¶
type IRequestStop ¶
type IntermediateResult ¶
type RegexSearchValidator ¶
type RegexSearchValidator struct { Valid filter.IValidateCB Invalid filter.IValidateCB KilledCB filter.IValidateCB EmptyCB filter.IValidateCB }
func (*RegexSearchValidator) Kill ¶
func (f *RegexSearchValidator) Kill() (bool, error)
func (*RegexSearchValidator) SetEmpty ¶
func (f *RegexSearchValidator) SetEmpty(cb filter.IValidateCB)
func (*RegexSearchValidator) SetInvalid ¶
func (f *RegexSearchValidator) SetInvalid(cb filter.IValidateCB)
func (*RegexSearchValidator) SetKilled ¶
func (f *RegexSearchValidator) SetKilled(cb filter.IValidateCB)
func (*RegexSearchValidator) SetValid ¶
func (f *RegexSearchValidator) SetValid(cb filter.IValidateCB)
func (*RegexSearchValidator) Validate ¶
func (f *RegexSearchValidator) Validate(filter string)
type StringSearchValidator ¶
type StringSearchValidator struct { Valid filter.IValidateCB Invalid filter.IValidateCB KilledCB filter.IValidateCB EmptyCB filter.IValidateCB }
func (*StringSearchValidator) Kill ¶
func (f *StringSearchValidator) Kill() (bool, error)
func (*StringSearchValidator) SetEmpty ¶
func (f *StringSearchValidator) SetEmpty(cb filter.IValidateCB)
func (*StringSearchValidator) SetInvalid ¶
func (f *StringSearchValidator) SetInvalid(cb filter.IValidateCB)
func (*StringSearchValidator) SetKilled ¶
func (f *StringSearchValidator) SetKilled(cb filter.IValidateCB)
func (*StringSearchValidator) SetValid ¶
func (f *StringSearchValidator) SetValid(cb filter.IValidateCB)
func (*StringSearchValidator) Validate ¶
func (f *StringSearchValidator) Validate(filter string)
type Widget ¶
Widget represents a composite UI element for driving packet search operations. It comprises a menu allowing the type of data to be searched - PSML, PDML or raw bytes; a menu determining the search method - string, regex, hex or filter; the input field for the search, and a button to start the search. Note that the filter search is a special case - the search value is used as a display filter to select packets from the current source, rather than for searching within packet data.
func New ¶
func New(alg IAlgorithm, searchPktList func() ICallbacks, searchPktStruct func() ICallbacks, searchPktDetails func() ICallbacks, searchByFilter func() ICallbacks, men menu.IOpener, comp fields.IPrefixCompleter, errHandler IErrorHandler) *Widget