kgin

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2021 License: MIT Imports: 9 Imported by: 0

README

gin

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(ctx *gin.Context, err error)

Error encodes the object to the HTTP response.

func FromGinContext

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

FromGinContext returns the gin.Context value stored in ctx, if any.

func Middlewares

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

Middlewares return middlewares wrapper

func NewGinContext

func NewGinContext(ctx context.Context, c *gin.Context) context.Context

NewGinContext returns a new Context that carries gin.Context value.

func Success

func Success(ctx *gin.Context, data interface{})

func Validate

func Validate(in interface{}) error

Types

type Validator

type Validator interface {
	Validate() error
}

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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