jxscouttypes

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset

type Asset = assetservice.Asset

type AssetService

type AssetService = assetservice.AssetService

AssetService interface

type Cache

type Cache = cache.Cache

Cache interface

type EventBus

type EventBus = eventbus.EventBus

EventBus interface

type EventBusMessage

type EventBusMessage = eventbus.Message

type HTTPServer

type HTTPServer interface {
	SendSuccessResponse(w http.ResponseWriter, status int, result any)
	SendErrorResponse(w http.ResponseWriter, message string, status int)
}

HTTPServer interface

type JXScout

type JXScout interface {
	Start() error
	RegisterModule(Module) error
}

type Module

type Module interface {
	Initialize(sdk ModuleSDK) error
}

type ModuleSDK

type ModuleSDK struct {
	EventBus     EventBus
	Router       Router
	AssetService AssetService
	Options      Options
	HTTPServer   HTTPServer
	Cache        Cache
	Logger       *slog.Logger
	Scope        Scope
}

ModuleSDK are the exposed dependencies that modules can use

type Options

type Options struct {
	// Port is the port where jxscout will be running
	Port int
	// WorkingDirectory is used by jxscout as the root where files will be saved
	WorkingDirectory string
	// ScopePatterns is a list of wildcard patterns used for filtering requests (e.g. {"*google.com*", "*facebook.com*"})
	ScopePatterns goflags.StringSlice
	// Verbose defines if the server should output logs
	Verbose bool
	// Debug defines if the server should output debug logs
	Debug bool
	// CacheTTL defines the ttl for cache entries. caching is used internally to drop requests if they were already processed. Should be in a format compatible with https://pkg.go.dev/time#ParseDuration"
	CacheTTL string
	// AssetSaveConcurrency defines the max concurrency for asset service (handles saves to the file system and to the DB)
	AssetSaveConcurrency int
	// AssetServiceConcurrency defines the max concurrency for the asset fetch service (handles fetching asset URLs)
	AssetFetchConcurrency int
	// BeautifierConcurrency defines the max concurrency for beautifier processes
	BeautifierConcurrency int
	// ChunkDiscovererConcurrency defines the max concurrency for the chunk discoverer process
	ChunkDiscovererConcurrency int
	// ChunkDiscovererBruteForceLimit defines the max limit for the chunk discoverer to try and bruteforce chunks
	ChunkDiscovererBruteForceLimit int
	// JavascriptRequestsCacheTTL defines the time to wait until a js file is downloaded and processed again
	JavascriptRequestsCacheTTL time.Duration
	// HTMLRequestsCacheTTL defines the time to wait until a html file is downloaded and processed again
	HTMLRequestsCacheTTL time.Duration
}

JXScout Options

type Router

type Router = chi.Router

Router interface

type Scope

type Scope interface {
	IsInScope(url string) bool
}

Scope interface

Jump to

Keyboard shortcuts

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