common

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RequestIDCtxKey Request ID 在 context 中的 key
	RequestIDCtxKey = "requestID"

	// UserIDCtxKey user id 在 context 中的 key
	UserIDCtxKey = "userID"

	// UserLangCtxKey user language 在 context 中的 key
	UserLangCtxKey = "userLang"

	// ErrorCtxKey error 在 context 中的 key
	ErrorCtxKey = "error"

	// TracerCtxKey tracer 在 gin.context 中的 key
	// copy: go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin@v0.57.0/gintrace.go:23
	TracerCtxKey = "otel-go-contrib-tracer"
)
View Source
const (
	// RequestIDLogKey Request ID 在日志中的 key
	RequestIDLogKey = RequestIDCtxKey

	// TraceIDLogKey trace id 在日志中的 key
	TraceIDLogKey = "otelTraceID"

	// SpanIDLogKey span id 在日志中的 key
	SpanIDLogKey = "otelSpanID"
)
View Source
const (
	// UserIDKey user id 在 context / session 中的 key
	UserIDKey = "user_id"

	// UserTokenKey user token 在 cookies / session 中的 key
	UserTokenKey = "user_token"

	// UserAuthSourceKey user 认证来源(AuthBackend Name)在 session 中的 key
	UserAuthSourceKey = "user_auth_source"

	// UserLanguageKey user language 在 cookies / session 中的 key
	UserLanguageKey = "blueking_language"
)
View Source
const (
	// RequestIDHeaderKey Request ID 在 HTTP Header 中的 key
	RequestIDHeaderKey = "X-Request-Id"
)

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
Package probe provides health probes for components
Package probe provides health probes for components

Jump to

Keyboard shortcuts

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