Documentation
¶
Overview ¶
Package contextHandler manages request-scoped context, including getting and setting values on application contexts.
Index ¶
- Variables
- func AddUserContext(ctx context.Context, userID, userName string) context.Context
- func Debug(c context.Context, name string)
- func GetSession_Expiry(ctx context.Context) time.Time
- func GetSession_ID(ctx context.Context) string
- func GetSession_Identifier() string
- func GetSession_Locale(ctx context.Context) string
- func GetSession_Theme(ctx context.Context) string
- func GetSession_Timezone(ctx context.Context) string
- func GetSession_Token(ctx context.Context) any
- func GetSession_UserCode(ctx context.Context) string
- func GetSession_UserKey(ctx context.Context) string
- func GetSession_UserRole(ctx context.Context) string
- func GetUserDetails() *user.User
- func GetWorkerPool(ctx context.Context) (pond.Pool, error)
- func GetWorkerPoolName(ctx context.Context) string
- func NewWorkerPool(ctx context.Context, poolName string, poolSize int) context.Context
- func SetSession_Expiry(ctx context.Context, expiry time.Time) context.Context
- func SetSession_ID(ctx context.Context, sessionID string) context.Context
- func SetSession_Locale(ctx context.Context, locale string) context.Context
- func SetSession_Theme(ctx context.Context, theme string) context.Context
- func SetSession_Timezone(ctx context.Context, timezone string) context.Context
- func SetSession_Token(ctx context.Context, token any) context.Context
- func SetSession_UserCode(ctx context.Context, userCode string) context.Context
- func SetSession_UserKey(ctx context.Context, userKey string) context.Context
- func SetSession_UserRole(ctx context.Context, role string) context.Context
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrWorkerPoolNotFound = fmt.Errorf("Worker pool not found in context")
View Source
var WorkerPoolKey = contextKey{/* contains filtered or unexported fields */}
Functions ¶
func AddUserContext ¶ added in v1.22.0
func GetSession_ID ¶ added in v1.2.66
func GetSession_Identifier ¶ added in v1.2.66
func GetSession_Identifier() string
func GetSession_Locale ¶ added in v1.2.66
func GetSession_Theme ¶ added in v1.2.66
func GetSession_Timezone ¶ added in v1.2.66
func GetSession_Token ¶ added in v1.2.66
func GetSession_UserCode ¶ added in v1.2.66
func GetSession_UserKey ¶ added in v1.2.66
func GetSession_UserRole ¶ added in v1.2.68
func GetUserDetails ¶ added in v1.22.0
func GetWorkerPoolName ¶ added in v1.22.0
func NewWorkerPool ¶ added in v1.22.0
func SetSession_Expiry ¶ added in v1.2.66
func SetSession_ID ¶ added in v1.2.66
func SetSession_Locale ¶ added in v1.2.66
func SetSession_Theme ¶ added in v1.2.66
func SetSession_Timezone ¶ added in v1.2.66
func SetSession_Token ¶ added in v1.2.66
func SetSession_UserCode ¶ added in v1.2.66
func SetSession_UserKey ¶ added in v1.2.66
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.