MCPcopy Create free account
hub / github.com/cloudreve/cloudreve / WithValue

Function WithValue

pkg/util/common.go:251–253  ·  view source on GitHub ↗

WithValue inject key-value pair into request context.

(c *gin.Context, key any, value any)

Source from the content-addressed store, hash-verified

249
250// WithValue inject key-value pair into request context.
251func WithValue(c *gin.Context, key any, value any) {
252 c.Request = c.Request.WithContext(context.WithValue(c.Request.Context(), key, value))
253}
254
255// BoolToString transform bool to string
256func BoolToString(b bool) string {

Callers 15

loadShareForOGFunction · 0.92
ContextHintFunction · 0.92
HashIDFunction · 0.92
SetUserCtxByUserFunction · 0.92
ViewerSessionValidationFunction · 0.92
RegisterMethod · 0.92
ActivateUserFunction · 0.92
DownloadArchivedMethod · 0.92
StatelessCompleteUploadFunction · 0.92
StatelessOnUploadFailedFunction · 0.92
StatelessCreateFileFunction · 0.92
VerifyAndRetrieveUserMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected