tools

package
v0.28.1 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FuzzerMgr = &FuzzerManager{
	instances: make(map[string]*fuzzer.Fuzzer),
}

Functions

This section is empty.

Types

type FuzzerManager

type FuzzerManager struct {
	// contains filtered or unexported fields
}

type FuzzerStartRequest

type FuzzerStartRequest struct {
	Collection  string         `json:"collection"`
	Request     string         `json:"request"`
	Host        string         `json:"host"`
	Port        string         `json:"port"`
	UseTLS      bool           `json:"useTLS"`
	UseHTTP2    bool           `json:"http2"`   // Enable HTTP/2 support
	Markers     map[string]any `json:"markers"` // marker -> string (file path) or []string (inline payloads)
	Mode        string         `json:"mode"`
	Concurrency int            `json:"concurrency"`
	Timeout     float64        `json:"timeout"` // in seconds
	ProcessData any            `json:"process_data"`
	GeneratedBy string         `json:"generated_by"`
}

type LoginSDKRequest

type LoginSDKRequest struct {
	URL      string `json:"url"`
	Email    string `json:"email"`
	Password string `json:"password"`
}

type RunCommandData

type RunCommandData struct {
	ID         string `db:"id,omitempty" json:"id,omitempty"`
	SaveTo     string `db:"save_to,omitempty" json:"save_to,omitempty"`
	Data       string `db:"data,omitempty" json:"data,omitempty"`
	Command    string `db:"command,omitempty" json:"command,omitempty"`
	Collection string `db:"collection,omitempty" json:"collection,omitempty"`
	Filename   string `db:"filename,omitempty" json:"filename,omitempty"`
}

func (*RunCommandData) Scan

func (d *RunCommandData) Scan(value interface{}) error

type Tools

type Tools struct {
	App        *pocketbase.PocketBase
	Config     *config.Config
	Cook       *cook.COOK
	CmdChannel chan process.RunCommandData

	// SDK client to connect to main app's database
	AppSDK *sdk.Client
	AppURL string // Main app URL (e.g., "http://localhost:8090")
}

func (*Tools) CommandManager

func (backend *Tools) CommandManager()

loop over commandChannel

func (*Tools) CreateCollection

func (backend *Tools) CreateCollection(collectionName string, dbSchema schema.Schema) error

CreateCollection creates a collection with the specified schema

func (*Tools) LoginSDK

func (t *Tools) LoginSDK(url, email, password string) error

LoginSDK initializes and authenticates the SDK client for connecting to the main app

func (*Tools) LoginSDKEndpoint

func (backend *Tools) LoginSDKEndpoint(e *core.ServeEvent) error

func (*Tools) RegisterProcessInDB

func (backend *Tools) RegisterProcessInDB(input, data any, name, typz, state string) string

func (*Tools) RunCommand

func (backend *Tools) RunCommand(e *core.ServeEvent) error

func (*Tools) RunningCommand

func (backend *Tools) RunningCommand(id string, command string, filename string)

func (*Tools) RunningCommandSaveToCollection

func (backend *Tools) RunningCommandSaveToCollection(id, command, collectionName string)

func (*Tools) SDKStatus

func (backend *Tools) SDKStatus(e *core.ServeEvent) error

func (*Tools) SetProcess

func (backend *Tools) SetProcess(id, state string)

func (*Tools) StartFuzzer

func (backend *Tools) StartFuzzer(e *core.ServeEvent) error

func (*Tools) StopFuzzer

func (backend *Tools) StopFuzzer(e *core.ServeEvent) error

Jump to

Keyboard shortcuts

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