Documentation
¶
Index ¶
- Variables
- func Load(filename string, replayview *ReplayView, prox *ProxyView, sitemap *SiteMapView) bool
- func Save(filename string, replayview *ReplayView, proxy *ProxyView) bool
- type ProxyView
- type ReplayRequests
- type ReplaySaves
- type ReplayView
- func (view *ReplayView) AddItem(r *replay.Request)
- func (view *ReplayView) DeleteItem(rr *ReplayRequests)
- func (view *ReplayView) GetView() (title string, content tview.Primitive)
- func (view *ReplayView) Init(app *tview.Application)
- func (view *ReplayView) LoadReplays(rr *ReplayRequests)
- func (view *ReplayView) RenameItem(rr *ReplayRequests, newName string)
- type SaveRestoreView
- type SiteMapView
- type TextPrimitive
- func (t *TextPrimitive) Clear()
- func (t *TextPrimitive) Draw(screen tcell.Screen)
- func (t *TextPrimitive) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
- func (t *TextPrimitive) MouseHandler() ...
- func (t *TextPrimitive) ScrollToBeginning()
- func (t *TextPrimitive) Write(p []byte) (n int, err error)
- type ViewFilter
Constants ¶
This section is empty.
Variables ¶
var (
TabSize = 4
)
Functions ¶
func Load ¶
func Load(filename string, replayview *ReplayView, prox *ProxyView, sitemap *SiteMapView) bool
Load - needs to read a json file, clear out the proxy and replay tables and repopulate them
Types ¶
type ProxyView ¶
type ProxyView struct { Layout *tview.Pages // The main replay view, all others should be underneath Layout Table *tview.Table // the proxy history table Logger *modifier.Logger // the Martian logger // contains filtered or unexported fields }
ProxyView - struct that holds the main prox elements
func (*ProxyView) AddEntry ¶ added in v0.1.3
AddEntry - add a modifier entry to the proxy table, t indicates request, response or save/load
func (*ProxyView) Init ¶
func (view *ProxyView) Init(app *tview.Application, replayview *ReplayView, logger *modifier.Logger, channel chan modifier.Notification)
Init - Main initialization method for the proxy view
type ReplayRequests ¶ added in v0.1.7
type ReplayRequests struct { ID string // The ID as displayed in the table // contains filtered or unexported fields }
ReplayRequests - hold an array of requests for a replay item and the currently selected array ID
type ReplaySaves ¶ added in v0.1.7
type ReplaySaves struct { ID string // The ID as displayed in the table Entries []replay.Request // an array of replay requests Selected int // the currently selected request }
Like ReplayRequests, but we want to store each replay directly in here
type ReplayView ¶
type ReplayView struct { Layout *tview.Pages // The main replay view, all others should be underneath Layout Table *tview.Table // the main table that lists all the replay items // contains filtered or unexported fields }
ReplayView - struct that holds the main replayview elements
func (*ReplayView) AddItem ¶
func (view *ReplayView) AddItem(r *replay.Request)
AddItem method - create a new replay entry
func (*ReplayView) DeleteItem ¶ added in v0.1.4
func (view *ReplayView) DeleteItem(rr *ReplayRequests)
DeleteItem - delete an entry
func (*ReplayView) GetView ¶
func (view *ReplayView) GetView() (title string, content tview.Primitive)
GetView - should return a title and the top-level primitive
func (*ReplayView) Init ¶
func (view *ReplayView) Init(app *tview.Application)
Init - Initialization method for the replayer view
func (*ReplayView) LoadReplays ¶ added in v0.1.7
func (view *ReplayView) LoadReplays(rr *ReplayRequests)
func (*ReplayView) RenameItem ¶
func (view *ReplayView) RenameItem(rr *ReplayRequests, newName string)
RenameItem - change the name of an entry
type SaveRestoreView ¶
SaveRestoreView - the main struct for the view
func (*SaveRestoreView) GetView ¶
func (view *SaveRestoreView) GetView() (title string, content tview.Primitive)
GetView - should return a title and the top-level primitive
func (*SaveRestoreView) Init ¶
func (view *SaveRestoreView) Init(app *tview.Application, replays *ReplayView, proxy *ProxyView, sitemap *SiteMapView)
Init - Initialize the save view
type SiteMapView ¶ added in v0.1.4
type SiteMapView struct { Layout *tview.Pages Logger *modifier.Logger // the Martian logger // contains filtered or unexported fields }
SiteMapView - the main struct for the view
func (*SiteMapView) GetView ¶ added in v0.1.4
func (view *SiteMapView) GetView() (title string, content tview.Primitive)
GetView - should return a title and the top-level primitive
func (*SiteMapView) Init ¶ added in v0.1.4
func (view *SiteMapView) Init(app *tview.Application, logger *modifier.Logger, channel chan modifier.Notification)
Init - Initialize the save view
type TextPrimitive ¶ added in v0.1.5
TextPrimitive is a basic, line wrapped text view that is designed to replicate a severely cut down version of tview's TextView, removing color support, grapheme cluster handling, regions and other functionality with the aim of increasing performance and being able to handle megabytes of data with wrapping. You probably don't want to use this. See: https://github.com/rivo/tview/issues/686
func NewTextPrimitive ¶ added in v0.1.5
func NewTextPrimitive() *TextPrimitive
func (*TextPrimitive) Clear ¶ added in v0.1.5
func (t *TextPrimitive) Clear()
func (*TextPrimitive) Draw ¶ added in v0.1.5
func (t *TextPrimitive) Draw(screen tcell.Screen)
func (*TextPrimitive) InputHandler ¶ added in v0.1.5
func (t *TextPrimitive) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
func (*TextPrimitive) MouseHandler ¶ added in v0.1.5
func (t *TextPrimitive) MouseHandler() func(action tview.MouseAction, event *tcell.EventMouse, setFocus func(p tview.Primitive)) (consumed bool, capture tview.Primitive)
func (*TextPrimitive) ScrollToBeginning ¶ added in v0.1.5
func (t *TextPrimitive) ScrollToBeginning()
type ViewFilter ¶ added in v0.1.3
type ViewFilter struct {
// contains filtered or unexported fields
}
ViewFilter - specify a match pattern and whether to include or exclude the pattern