types

package
v2.0.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0, BSD-3-Clause, Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMonitoringError

func NewMonitoringError(msg string) error

NewMonitoringError creates and returns a new HTTP monitoring error, wrapped under sharedesec.MonitoringError

Types

type HandlerOperationArgs

type HandlerOperationArgs struct {
	// ClientIP corresponds to the address `http.client_ip`
	ClientIP netip.Addr
	// Headers corresponds to the address `server.request.headers.no_cookies`
	Headers map[string][]string
	// Cookies corresponds to the address `server.request.cookies`
	Cookies map[string][]string
	// Query corresponds to the address `server.request.query`
	Query map[string][]string
	// PathParams corresponds to the address `server.request.path_params`
	PathParams map[string]string
	// Method is the http method verb of the request, address is `server.request.method`
	Method string
	// RequestURI corresponds to the address `server.request.uri.raw`
	RequestURI string
}

HandlerOperationArgs is the HTTP handler operation arguments.

func (HandlerOperationArgs) IsArgOf

func (HandlerOperationArgs) IsArgOf(*Operation)

type HandlerOperationRes

type HandlerOperationRes struct {
	Headers map[string][]string
	// Status corresponds to the address `server.response.status`.
	Status int
}

HandlerOperationRes is the HTTP handler operation results.

func (HandlerOperationRes) IsResultOf

func (HandlerOperationRes) IsResultOf(*Operation)

type MonitoringError

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

MonitoringError is used to vehicle an HTTP error, usually resurfaced through Appsec SDKs.

func (*MonitoringError) Error

func (e *MonitoringError) Error() string

Error implements the Error interface

type Operation

type Operation struct {
	dyngo.Operation
	trace.TagsHolder
	trace.SecurityEventsHolder
	// contains filtered or unexported fields
}

Operation type representing an HTTP operation. It must be created with StartOperation() and finished with its Finish().

func (*Operation) Finish

func (op *Operation) Finish(res HandlerOperationRes) []any

Finish the HTTP handler operation, along with the given results and emits a finish event up in the operation stack.

type SDKBodyOperation

type SDKBodyOperation struct {
	dyngo.Operation
}

SDKBodyOperation type representing an SDK body

func (*SDKBodyOperation) Finish

func (op *SDKBodyOperation) Finish()

Finish finishes the SDKBody operation and emits a finish event

type SDKBodyOperationArgs

type SDKBodyOperationArgs struct {
	// Body corresponds to the address `server.request.body`.
	Body interface{}
}

SDKBodyOperationArgs is the SDK body operation arguments.

func (SDKBodyOperationArgs) IsArgOf

type SDKBodyOperationRes

type SDKBodyOperationRes struct{}

SDKBodyOperationRes is the SDK body operation results.

func (SDKBodyOperationRes) IsResultOf

Jump to

Keyboard shortcuts

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