repeater

package
v1.0.0-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2020 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	core.ControllerModule
	Module *Repeater
	Gui    *Gui
	Sess   *core.Session
	Tabs   map[int]*Tab
}

Controller represents the controller of the repeater module

func LoadRepeaterModule

func LoadRepeaterModule(s *core.Session) *Controller

LoadRepeaterModule loads the repeater module in the given session

func NewController

func NewController(module *Repeater, gui *Gui, s *core.Session) *Controller

NewController creates a new controller for the repeater module

func (*Controller) ExecCommand

func (c *Controller) ExecCommand(m string, args ...interface{})

ExecCommand execs commands submitted by other modules

func (*Controller) GetGui

func (c *Controller) GetGui() core.GuiModule

GetGui returns the Gui of the current controller

func (*Controller) GetModule

func (c *Controller) GetModule() core.Module

GetModule returns the module of the current controller

func (*Controller) GoClick

func (c *Controller) GoClick(id int, host, request string, ch chan string)

GoClick is the event fired when clicking the Go button in a repeater tab func (c *Controller) GoClick(t *TabGui) {

func (*Controller) NewTab

func (c *Controller) NewTab(host, request string)

type Entry

type Entry struct {
	ID        int
	Timestamp int64
	Type      string
	Data      []byte
	Host      string
}

Entry describes one entry of the textfile containing the history

type Gui

type Gui struct {
	core.GuiModule
	Sess *core.Session

	//GoClick func(*TabGui)
	GoClick        func(int, string, string, chan string)
	ChangeTabName  func(int, string)
	NewTabEvent    func(string, string)
	RemoveTabEvent func(int)
	Load           func()
	GetStuff       func(int, int) (string, string, string)
	// contains filtered or unexported fields
}

Gui represents the Gui of the repeater module

func NewGui

func NewGui(s *core.Session) *Gui

NewGui creates a new Gui for the repeater module

func (*Gui) AddNewTab

func (g *Gui) AddNewTab(title string, id int, host, request, response string)

AddNewTab adds a new repeater tab

func (*Gui) AddToHistory

func (g *Gui) AddToHistory(tabId int, idTabContent int, label string)

func (*Gui) GetModuleGui

func (g *Gui) GetModuleGui() interface{}

GetModuleGui returns the Gui for the current module

func (*Gui) GetSettings

func (g *Gui) GetSettings() interface{}

func (*Gui) NewTab

func (g *Gui) NewTab(title string, id int, host, request, response string) widgets.QWidget_ITF

NewTab adds a new tab

func (*Gui) Title

func (g *Gui) Title() string

Title returns the time of this Gui

type Repeater

type Repeater struct {
	core.Module

	Gui  *core.GuiModule
	Sess *core.Session
	// contains filtered or unexported fields
}

Repeater represents the repeater module

func NewRepeater

func NewRepeater(s *core.Session) *Repeater

NewRepeater returns a new repeater module

func (*Repeater) Description

func (r *Repeater) Description() string

Description returns the description of the current module

func (*Repeater) Name

func (r *Repeater) Name() string

Name returns the name of the current module

func (*Repeater) RunRequest

func (r *Repeater) RunRequest(req *http.Request) (*http.Response, error)

RunRequest performs the given HTTP request and return the HTTP response

type Tab

type Tab struct {
	ID    int
	Title string
	Path  string
	// contains filtered or unexported fields
}

Tab describes a tab

type TabContent

type TabContent struct {
	Host      string
	Timestamp int64
	Request   string
	Response  string
}

TabContent describes the content of a tab

type TabGui

type TabGui struct {
	HostLine       *widgets.QLineEdit
	TabLine        *widgets.QLineEdit
	RequestEditor  *widgets.QPlainTextEdit
	ResponseEditor *widgets.QPlainTextEdit
	ComboHistory   *widgets.QComboBox
	// contains filtered or unexported fields
}

Tab represents a tab in the repeater module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL