handler

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InsertOperationLog

func InsertOperationLog(c *gin.Context, username, productName, method, function, detail, permissionUUID, requestBody string, logger *zap.SugaredLogger)

InsertOperationLog 插入操作日志

func JSONResponse

func JSONResponse(c *gin.Context, ctx *Context)

func Stream

func Stream(c *gin.Context, p producer, log *zap.SugaredLogger)

Types

type Context

type Context struct {
	Logger    *zap.SugaredLogger
	Err       error
	Resp      interface{}
	Username  string
	User      *permission.User
	RequestID string
}

Context struct

func NewContext

func NewContext(c *gin.Context) *Context

Jump to

Keyboard shortcuts

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