gin

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2022 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContentType

func ContentType(subtype string) string

ContentType returns the content-type with base prefix.

func Error

func Error(c *gin.Context, se error)

Error encodes the object to the HTTP response.

func Middlewares

func Middlewares(m ...middleware.Middleware) gin.HandlerFunc

func NewGinContext

func NewGinContext(ctx context.Context, c GinCtx) context.Context

NewServerContext returns a new Context that carries value.

Types

type GinCtx

type GinCtx struct {
	Ctx *gin.Context
}

func FromGinContext

func FromGinContext(ctx context.Context) (c GinCtx, ok bool)

FromServerContext returns the Transport value stored in ctx, if any.

Jump to

Keyboard shortcuts

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