handler

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetResourcesInHeader added in v1.7.1

func GetResourcesInHeader(c *gin.Context) ([]string, bool)

func InsertDetailedOperationLog added in v1.9.9

func InsertDetailedOperationLog(c *gin.Context, username, productName, scene, method, function, detail, requestBody string, logger *zap.SugaredLogger, targets ...string)

func InsertOperationLog

func InsertOperationLog(c *gin.Context, username, productName, method, function, detail, 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{}
	Account      string
	UserName     string
	UserID       string
	IdentityType string
	RequestID    string
}

Context struct

func NewContext

func NewContext(c *gin.Context) *Context

TODO: We need to implement a `context.Context` that conforms to the golang standard library.

type FederatedClaims added in v1.9.9

type FederatedClaims struct {
	ConnectorId string `json:"connector_id"`
	UserId      string `json:"user_id"`
}

Jump to

Keyboard shortcuts

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