Home / Type/ responseWriter Type — gin Architecture

responseWriter Type — gin Architecture

Architecture documentation for the responseWriter type/interface in context.go from the gin codebase.

Entity Profile

Dependency Diagram

graph TD
  1b739ec9_1ab4_4290_9c12_51d9eb5c3360["responseWriter"]
  c22deef8_5218_863f_341c_441bf58f550e["context.go"]
  1b739ec9_1ab4_4290_9c12_51d9eb5c3360 -->|defined in| c22deef8_5218_863f_341c_441bf58f550e
  style 1b739ec9_1ab4_4290_9c12_51d9eb5c3360 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

context.go lines 61–97

type Context struct {
	writermem responseWriter
	Request   *http.Request
	Writer    ResponseWriter

	Params   Params
	handlers HandlersChain
	index    int8
	fullPath string

	engine       *Engine
	params       *Params
	skippedNodes *[]skippedNode

	// This mutex protects Keys map.
	mu sync.RWMutex

	// Keys is a key/value pair exclusively for the context of each request.
	Keys map[any]any

	// Errors is a list of errors attached to all the handlers/middlewares who used this context.
	Errors errorMsgs

	// Accepted defines a list of manually accepted formats for content negotiation.
	Accepted []string

	// queryCache caches the query result from c.Request.URL.Query().
	queryCache url.Values

	// formCache caches c.Request.PostForm, which contains the parsed form data from POST, PATCH,
	// or PUT body parameters.
	formCache url.Values

	// SameSite allows a server to define a cookie attribute making it impossible for
	// the browser to send this cookie along with cross-site requests.
	sameSite http.SameSite
}

Defined In

Frequently Asked Questions

What is the responseWriter type?
responseWriter is a type/interface in the gin codebase, defined in context.go.
Where is responseWriter defined?
responseWriter is defined in context.go at line 61.

Analyze Your Own Codebase

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

Try Supermodel Free