model

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: May 20, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RequestLog

type RequestLog struct {
	ID              string                   `json:"ID" bson:"_id"`
	Timestamp       time.Time                `json:"Timestamp"`
	Method          string                   `json:"Method"`
	Path            string                   `json:"Path"`
	Query           string                   `json:"Query"`
	RequestHeaders  http.Header              `json:"RequestHeaders"`
	ResponseHeaders http.Header              `json:"ResponseHeaders"`
	StatusCode      int                      `json:"StatusCode"`
	Duration        int64                    `json:"Duration"`
	RequestBody     string                   `json:"RequestBody,omitempty"`
	ResponseBody    string                   `json:"ResponseBody,omitempty"`
	Error           string                   `json:"Error,omitempty"`
	MiddlewareTrace []map[string]interface{} `json:"MiddlewareTrace,omitempty"`
	RouteTrace      map[string]interface{}   `json:"RouteTrace,omitempty"`
}

func NewRequestLog

func NewRequestLog(req *http.Request) *RequestLog

Jump to

Keyboard shortcuts

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