types

package
v0.29.2 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: MIT Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterProcessInDB

func RegisterProcessInDB(app *pocketbase.PocketBase, input, data any, state string) string

func SetProcess

func SetProcess(app *pocketbase.PocketBase, id, state string)

Types

type AddRequestBodyType

type AddRequestBodyType struct {
	Url         string  `json:"url"`
	Index       float64 `json:"index"`
	Request     string  `json:"request"`
	Response    string  `json:"response"`
	GeneratedBy string  `json:"generated_by"`
	Note        string  `json:"note,omitempty"`
}

type BaseCollection

type BaseCollection struct {
	Id         string
	Name       string
	Type       string
	Schema     any
	System     bool
	ListRule   string
	ViewRule   string
	CreateRule string
	UpdateRule string
	DeleteRule string
}

type Collection

type Collection struct {
	ID             string               `json:"id,omitempty"`
	Name           string               `json:"name"`
	Type           string               `json:"type"` // Can be base/auth
	Schema         []schema.SchemaField `json:"schema,omitempty"`
	System         bool                 `json:"system,omitempty"`
	ListRule       string               `json:"listRule,omitempty"`
	ViewRule       string               `json:"viewRule,omitempty"`
	CreateRule     string               `json:"createRule,omitempty"`
	UpdateRule     string               `json:"updateRule,omitempty"`
	DeleteRule     string               `json:"deleteRule,omitempty"`
	ManageRule     string               `json:"manageRule,omitempty"`
	AllowOAuth2    bool                 `json:"allowOAuth2Auth,omitempty"`
	AllowUsername  bool                 `json:"allowUsernameAuth,omitempty"`
	AllowEmail     bool                 `json:"allowEmailAuth,omitempty"`
	RequireEmail   bool                 `json:"requireEmail,omitempty"`
	ExceptEmail    []string             `json:"exceptEmailDomains,omitempty"`
	OnlyEmail      []string             `json:"onlyEmailDomains,omitempty"`
	MinPasswordLen int                  `json:"minPasswordLength,omitempty"`
	CreatedAt      time.Time            `json:"createdAt,omitempty"`
	UpdatedAt      time.Time            `json:"updatedAt,omitempty"`
}

Collection is a struct that holds information about a collection

type GetData

type GetData struct {
	Collection string `db:"collection" json:"collection"`
	Path       string `db:"path" json:"path"`
	Page       int64  `db:"page" json:"page"`
	PerPage    int64  `db:"perPage" json:"perPage"`
	Sort       string `db:"sort" json:"sort"`
	Search     string `db:"search" json:"search"`
	ColType    string `db:"col_type" json:"col_type"`
}

type Label

type Label struct {
	ID    string `db:"id" json:"id"`
	Name  string `db:"name" json:"name"`
	Color string `db:"color" json:"color"`
	Type  string `db:"type" json:"type"`
	Icon  string `db:"icon" json:"icon"`
}

type NewIntruderRequest

type NewIntruderRequest struct {
	ID      string `json:"id,omitempty"`
	URL     string `json:"url,omitempty"`
	Req     string `json:"req,omitempty"`
	Payload string `json:"payload,omitempty"`
}

type NewRepeaterRequest

type NewRepeaterRequest struct {
	URL   string         `json:"url,omitempty"`
	Req   string         `json:"req,omitempty"`
	Resp  string         `json:"resp,omitempty"`
	Data  map[string]any `json:"data,omitempty"`
	Extra map[string]any `json:"extra,omitempty"`
}

type OutputData

type OutputData struct {
	Userdata UserData
	Host     string
	Port     string
	Folder   string
}

type ParamsList

type ParamsList struct {
	Page    int
	Size    int
	Filters string
	Sort    string

	HackResponseRef any //hack for collection list
}

type PlaygroundAdd

type PlaygroundAdd struct {
	ParentId string           `json:"parent_id"`
	Items    []PlaygroundItem `json:"items"`
}

type PlaygroundItem

type PlaygroundItem struct {
	Name        string         `json:"name,omitempty"`
	Original_Id string         `json:"original_id,omitempty"`
	Type        string         `json:"type,omitempty"`
	ToolData    map[string]any `json:"tool_data,omitempty"`
}

type PlaygroundNew

type PlaygroundNew struct {
	Name     string `json:"name,omitempty"`
	ParentId string `json:"parent_id"`
	Type     string `json:"type,omitempty"`
	Expanded bool   `json:"expanded,omitempty"`
}

type RealtimeRecord

type RealtimeRecord struct {
	UserData

	CollectionId   string `db:"collectionId" json:"collectionId"`
	CollectionName string `db:"collectionName" json:"collectionName"`
	Created        string `db:"created" json:"created"`
	Index          int    `db:"index" json:"index"`
	Updated        string `db:"updated" json:"updated"`
	Action         string `db:"action,omitempty" json:"action,omitempty"`
	Raw            any    `db:"raw,omitempty" json:"raw,omitempty"`
}

func (*RealtimeRecord) Scan

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

type RequestData

type RequestData struct {
	Url        string            `db:"url" json:"url"`
	Path       string            `db:"path" json:"path"`
	Query      string            `db:"query" json:"query"`
	Headers    map[string]string `db:"headers" json:"headers"`
	Fragment   string            `db:"fragment" json:"fragment"`
	Ext        string            `db:"ext" json:"ext"`
	Method     string            `db:"method" json:"method"`
	HasCookies bool              `db:"has_cookies" json:"has_cookies"`
	HasParams  bool              `db:"has_params" json:"has_params"`
	Length     int64             `db:"length" json:"length"`
}

func (*RequestData) Scan

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

type ResponseCreate

type ResponseCreate struct {
	ID      string `json:"id"`
	Created string `json:"created"`
	Field   string `json:"field"`
	Updated string `json:"updated"`
}

type ResponseData

type ResponseData struct {
	Title      string            `db:"title" json:"title"`
	Mime       string            `db:"mime" json:"mime"`
	Status     int               `db:"status" json:"status"`
	Headers    map[string]string `db:"headers" json:"headers"`
	Length     int64             `db:"length" json:"length"`
	HasCookies bool              `db:"has_cookies" json:"has_cookies"`
	Date       string            `db:"date" json:"date"`
	Time       string            `db:"time" json:"time"`
}

func (*ResponseData) Scan

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

type ResponseList

type ResponseList[T any] struct {
	Page       int `json:"page"`
	PerPage    int `json:"perPage"`
	TotalItems int `json:"totalItems"`
	TotalPages int `json:"totalPages"`
	Items      []T `json:"items"`
}

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 SitemapFetch

type SitemapFetch struct {
	Host  string `db:"host" json:"host"`
	Path  string `db:"path" json:"path"`
	Depth int    `db:"depth" json:"depth"` // Depth limit: 0 or not set = default 1 level, -1 = unlimited, positive number = specific depth

}

type SitemapGet

type SitemapGet struct {
	Host     string `db:"host" json:"host"`
	Path     string `db:"path" json:"path"`
	Query    string `db:"query" json:"query"`
	Fragment string `db:"fragment" json:"fragment"`
	Data     string `db:"data" json:"data"`
	Type     string `db:"type" json:"type"`
	Ext      string `db:"ext" json:"ext"`
}

type SitemapNode

type SitemapNode struct {
	Host          string         `json:"host"`
	Path          string         `json:"path"`
	Type          interface{}    `json:"type"`
	Title         string         `json:"title"`
	Ext           interface{}    `json:"ext"`
	Query         interface{}    `json:"query"`
	Children      []*SitemapNode `json:"children,omitempty"`
	ChildrenCount int            `json:"children_count"`
	IsFolder      bool           `json:"is_folder"`
}

type SitemapRows

type SitemapRows struct {
	Host    string `db:"host" json:"host"`
	Path    string `db:"path" json:"path"`
	Page    int64  `db:"page" json:"page"`
	PerPage int64  `db:"perPage" json:"perPage"`
}

type SitemapRowsResponse

type SitemapRowsResponse struct {
	TotalItems int `json:"totalItems"`
	TotalPages int `json:"totalPages"`
}

type UserData

type UserData struct {
	ID             string         `db:"id,omitempty" json:"id,omitempty"`
	Index          float64        `db:"index,omitempty" json:"index,omitempty"`
	IndexMinor     float64        `db:"index_minor,omitempty" json:"index_minor,omitempty"`
	Host           string         `db:"host,omitempty" json:"host,omitempty"`
	Port           string         `db:"port,omitempty" json:"port,omitempty"`
	HasResp        bool           `db:"has_resp,omitempty" json:"has_resp,omitempty"`
	HasParams      bool           `db:"has_params,omitempty" json:"has_params,omitempty"`
	IsReqEdited    bool           `db:"is_req_edited,omitempty" json:"is_req_edited,omitempty"`
	IsRespEdited   bool           `db:"is_resp_edited,omitempty" json:"is_resp_edited,omitempty"`
	IsHTTPS        bool           `db:"is_https" json:"is_https"`
	Http           string         `db:"http" json:"http"`
	ProxyId        string         `db:"proxy_id,omitempty" json:"proxy_id,omitempty"`
	Req            string         `db:"req" json:"req"`
	Resp           string         `db:"resp" json:"resp"`
	ReqEdited      string         `db:"req_edited,omitempty" json:"req_edited,omitempty"`
	RespEdited     string         `db:"resp_edited,omitempty" json:"resp_edited,omitempty"`
	ReqJson        RequestData    `db:"req_json" json:"req_json"`
	RespJson       ResponseData   `db:"resp_json" json:"resp_json"`
	ReqEditedJson  RequestData    `db:"req_edited_json,omitempty" json:"req_edited_json,omitempty"`
	RespEditedJson ResponseData   `db:"resp_edited_json,omitempty" json:"resp_edited_json,omitempty"`
	GeneratedBy    string         `db:"generated_by,omitempty" json:"generated_by,omitempty"`
	Extra          map[string]any `db:"extra,omitempty" json:"extra,omitempty"`
	Attached       string         `db:"attached,omitempty" json:"attached,omitempty"`

	// Action didn't get saved anywhere, it for intercept forward/drop. Although for below {RealtimeRecord} it's saved in `_intercept` collection.
	Action string `db:"action,omitempty" json:"action,omitempty"`
}

func (*UserData) RequestDeleteKey

func (userdata *UserData) RequestDeleteKey(req *http.Request, key string)

func (*UserData) RequestUpdateKey

func (userdata *UserData) RequestUpdateKey(req *http.Request, key string, value any)

func (*UserData) ResponseDeleteKey

func (userdata *UserData) ResponseDeleteKey(resp *http.Response, key string)

func (*UserData) ResponseUpdateKey

func (userdata *UserData) ResponseUpdateKey(resp *http.Response, key string, value any)

func (*UserData) Scan

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

type Verbosity

type Verbosity int
const (
	VerbositySilent Verbosity = iota
	VerbosityDefault
	VerbosityVerbose
	VerbosityVeryVerbose
)

Jump to

Keyboard shortcuts

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