context

package
v0.0.0-...-1142a2b Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: Apache-2.0 Imports: 8 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 {
	Log *logrus.Entry
	// contains filtered or unexported fields
}

Context Context

func New

func New(c *gin.Context, log *logrus.Entry) *Context

New New

func (*Context) GetContext

func (a *Context) GetContext() *gin.Context

GetContext GetContext

func (*Context) GetRawData

func (a *Context) GetRawData() ([]byte, error)

GetRawData Get gin context raw data

func (*Context) ResErr

func (a *Context) ResErr(err error, data ...interface{})

ResErr ResErr

func (*Context) ResError

func (a *Context) ResError(err error, respCode string, data ...interface{})

ResError ResSuccess body has err msg

func (*Context) ResJSON

func (a *Context) ResJSON(status int, v interface{})

ResJSON 响应JSON数据

func (*Context) ResSucData

func (a *Context) ResSucData(data interface{})

ResSucData ResSucData

Jump to

Keyboard shortcuts

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