daemon

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2023 License: GPL-3.0 Imports: 32 Imported by: 2 modules, 2 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

View Source
const (
	WiretapServiceChan      = "wiretap"
	WiretapBroadcastChan    = "wiretap-broadcast"
	WiretapStaticChangeChan = "wiretap-static-change"
	IncomingHttpRequest     = "incoming-http-request"
)

Variables

This section is empty.

Functions

func CORSMiddleware

func CORSMiddleware() mux.MiddlewareFunc

func MonitorStatic added in v0.0.18

func MonitorStatic(wiretapConfig *shared.WiretapConfiguration)

Types

type CloneRequest added in v0.0.15

type CloneRequest struct {
	Request     *http.Request
	Protocol    string
	Host        string
	Port        string
	DropHeaders []string
}

type FormFile added in v0.0.10

type FormFile struct {
	Name    string               `json:"name,omitempty"`
	Headers textproto.MIMEHeader `json:"headers,omitempty"`
	Data    string               `json:"data,omitempty"`
}

type FormPart added in v0.0.10

type FormPart struct {
	Name  string      `json:"name,omitempty"`
	Value []string    `json:"value,omitempty"`
	Files []*FormFile `json:"files,omitempty"`
}

type HttpCookie

type HttpCookie struct {
	Value   string `json:"value,omitempty"`
	Path    string `json:"path,omitempty"`
	Domain  string `json:"domain,omitempty"`
	Expires string `json:"expires,omitempty"`
	// MaxAge=0 means no 'Max-Age' attribute specified.
	// MaxAge<0 means delete cookie now, equivalently 'Max-Age: 0'
	// MaxAge>0 means Max-Age attribute present and given in seconds
	MaxAge   int  `json:"maxAge,omitempty"`
	Secure   bool `json:"secure,omitempty"`
	HttpOnly bool `json:"httpOnly,omitempty"`
}

type HttpRequest

type HttpRequest struct {
	Timestamp int64                  `json:"timestamp,omitempty"`
	URL       string                 `json:"url,omitempty"`
	Method    string                 `json:"method,omitempty"`
	Path      string                 `json:"path,omitempty"`
	Query     string                 `json:"query,omitempty"`
	Headers   map[string]any         `json:"headers,omitempty"`
	Body      string                 `json:"requestBody,omitempty"`
	Cookies   map[string]*HttpCookie `json:"cookies,omitempty"`
}

type HttpResponse

type HttpResponse struct {
	Timestamp  int64                  `json:"timestamp,omitempty"`
	Headers    map[string]any         `json:"headers,omitempty"`
	StatusCode int                    `json:"statusCode,omitempty"`
	Body       string                 `json:"responseBody,omitempty"`
	Cookies    map[string]*HttpCookie `json:"cookies,omitempty"`
	Time       time.Time              `json:"-"`
}

type HttpTransaction

type HttpTransaction struct {
	Request            *HttpRequest              `json:"httpRequest,omitempty"`
	RequestValidation  []*errors.ValidationError `json:"requestValidation,omitempty"`
	Response           *HttpResponse             `json:"httpResponse,omitempty"`
	ResponseValidation []*errors.ValidationError `json:"responseValidation,omitempty"`
	Id                 string                    `json:"id,omitempty"`
}

type WiretapService

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

func NewWiretapService

func NewWiretapService(document libopenapi.Document, config *shared.WiretapConfiguration) *WiretapService

func (*WiretapService) HandleHttpRequest added in v0.0.8

func (ws *WiretapService) HandleHttpRequest(request *model.Request)

func (*WiretapService) HandleServiceRequest

func (ws *WiretapService) HandleServiceRequest(request *model.Request, core service.FabricServiceCore)

func (*WiretapService) Init

Jump to

Keyboard shortcuts

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