Home / Type/ Request Type — gin Architecture

Request Type — gin Architecture

Architecture documentation for the Request type/interface in logger.go from the gin codebase.

Entity Profile

Dependency Diagram

graph TD
  f00a1cbb_8d7e_0c2c_56c4_9df166d5d577["Request"]
  ed464f46_6294_af3d_9831_5646cd0d38c7["logger.go"]
  f00a1cbb_8d7e_0c2c_56c4_9df166d5d577 -->|defined in| ed464f46_6294_af3d_9831_5646cd0d38c7
  style f00a1cbb_8d7e_0c2c_56c4_9df166d5d577 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

logger.go lines 63–86

type LogFormatterParams struct {
	Request *http.Request

	// TimeStamp shows the time after the server returns a response.
	TimeStamp time.Time
	// StatusCode is HTTP response code.
	StatusCode int
	// Latency is how much time the server cost to process a certain request.
	Latency time.Duration
	// ClientIP equals Context's ClientIP method.
	ClientIP string
	// Method is the HTTP method given to the request.
	Method string
	// Path is a path the client requests.
	Path string
	// ErrorMessage is set if error has occurred in processing the request.
	ErrorMessage string
	// isTerm shows whether gin's output descriptor refers to a terminal.
	isTerm bool
	// BodySize is the size of the Response Body
	BodySize int
	// Keys are the keys set on the request's context.
	Keys map[any]any
}

Defined In

Frequently Asked Questions

What is the Request type?
Request is a type/interface in the gin codebase, defined in logger.go.
Where is Request defined?
Request is defined in logger.go at line 63.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free