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.
Click to show internal directories.
Click to hide internal directories.