ictx

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2025 License: MIT Imports: 4 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 interface {
	context.Context

	// Set 设置键值对
	Set(key string, value interface{})

	// Get 获取值
	Get(key string) (interface{}, bool)

	// GetString 获取字符串值
	GetString(key string) string

	// GetInt 获取整数值
	GetInt(key string) int

	// GetAllKey 获取所有键值对
	GetAllKey() map[string]interface{}

	// LogInfo 记录信息日志
	LogInfo(msg string, fields ...log.Field)

	// LogError 记录错误日志
	LogError(msg string, fields ...log.Field)

	// LogWarn 记录警告日志
	LogWarn(msg string, fields ...log.Field)

	// LogDebug 记录调试日志
	LogDebug(msg string, fields ...log.Field)
}

Context 增强的上下文接口

func Ginform

func Ginform(c *gin.Context) Context

Ginform 从gin.Context创建增强上下文

func NewContext

func NewContext() Context

NewContext 创建新的上下文

Jump to

Keyboard shortcuts

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