http

package
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2022 License: MIT Imports: 5 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NewContext = func(ctx *gin.Context) Context {
	return &Ctx{
		Context: ctx,
	}
}

Functions

func Cors

func Cors() gin.HandlerFunc

Cors 跨域

Types

type Context

type Context interface {
	Success(data interface{})
	Fail(err error)
	Gin() *gin.Context
	Token() string
	Id() uint64
}

type Ctx

type Ctx struct {
	*gin.Context
}

func (Ctx) Fail

func (receiver Ctx) Fail(err error)

func (Ctx) Gin

func (receiver Ctx) Gin() *gin.Context

func (Ctx) Id

func (receiver Ctx) Id() uint64

func (Ctx) Success

func (receiver Ctx) Success(data interface{})

func (Ctx) Token

func (receiver Ctx) Token() string

func (Ctx) User

func (receiver Ctx) User() interface{}

Jump to

Keyboard shortcuts

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