request

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const LogType = "request"

Variables

This section is empty.

Functions

This section is empty.

Types

type LoggableData added in v0.0.4

type LoggableData struct {
	Date       time.Time         `json:"date"`
	ReqID      string            `json:"requestID"`
	Type       string            `json:"type"`
	Method     string            `json:"method"`
	URL        string            `json:"URL"`
	Header     http.Header       `json:"header"`
	RemoteAddr string            `json:"remoteAddr"`
	Params     map[string]string `json:"params"`
}

func (*LoggableData) RequestID added in v0.0.4

func (r *LoggableData) RequestID() string

func (*LoggableData) SetRequestID added in v0.0.4

func (r *LoggableData) SetRequestID(id string)

type ParametersExtractor

type ParametersExtractor struct {
}

func NewParametersExtractor

func NewParametersExtractor() *ParametersExtractor

func (*ParametersExtractor) GetParameter

func (e *ParametersExtractor) GetParameter(param string, req *http.Request) (string, error)

GetParameter - checking if the param. is existing in request, it will be returned

func (*ParametersExtractor) HasParameter

func (e *ParametersExtractor) HasParameter(param string, req *http.Request) bool

HasParameter - checking the param. is existing in request

func (*ParametersExtractor) Parameters

func (e *ParametersExtractor) Parameters(r *http.Request) map[string]string

Parameters - will return a map with param. names as keys to values

Jump to

Keyboard shortcuts

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