fakecontext

package
v1.41.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: MIT Imports: 9 Imported by: 0

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  gin.Params
	Request *Request
}

gin.Context replacement that can be almost completely be serialized to/from a gin.Context

func NewContext

func NewContext(c *gin.Context) *Context

func (Context) Context

func (c Context) Context(ctx context.Context) (ginCtx *gin.Context, err error)

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