fakecontext

package
v1.49.52 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: MIT Imports: 9 Imported by: 1 module, 0 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

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	Keys    map[string]interface{}
	Params  []Param
	Request *Request
}

zip.Ctx replacement that can be almost completely be serialized to/from a request context.

func NewContext

func NewContext(c *zip.Ctx) *Context

func (Context) Context

func (c Context) Context(ctx context.Context) (zc *zip.Ctx, err error)

type Param added in v1.48.0

type Param struct {
	Key   string
	Value string
}

Param is one captured route parameter (gin.Param without the gin dependency).

type Request

type Request struct {
	Close            bool
	ContentLength    int64
	Form             url.Values
	Header           http.Header
	Host             string
	Method           string
	PostForm         url.Values
	Proto            string
	ProtoMajor       int
	ProtoMinor       int
	RemoteAddr       string
	RequestURI       string
	Trailer          http.Header
	TransferEncoding []string
}

Request that can be almost completely be serialized to/from a real Request

func NewRequest

func NewRequest(r *http.Request) *Request

func (Request) Request

func (r Request) Request() (req *http.Request, err error)

Jump to

Keyboard shortcuts

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