known

package
v0.0.0-...-dfe2c77 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// XRequestID is used to define the key within the context, representing the request ID.
	XRequestID = "x-request-id"

	// XUserID serves as the key for defining the context and represents the ID of the requesting user.
	// The UserID is unique throughout the entire user lifecycle.
	XUserID = "x-user-id"

	XUsername = "x-username"
)
View Source
const (
	AdminUserName = "admin"

	// MaxErrGroupConcurrency is the maximum number of concurrent goroutines for errgroup.
	// This is used to limit the number of Goroutines that can be executed simultaneously within an errgroup,
	// in order to prevent resource exhaustion and enhance the stability of the program.
	// According to the requirements of the specific scenario, this value can be adjusted accordingly.
	MaxErrGroupConcurrency = 1000
)
View Source
const (
	// Role for regular users
	RoleUser = "role::user"
	// Role for administrators
	RoleAdmin = "role::admin"
)

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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