MCPcopy Create free account
hub / github.com/cloudbase/garm / SetUserID

Function SetUserID

auth/context.go:299–301  ·  view source on GitHub ↗

SetUserID sets the userID in the context

(ctx context.Context, userID string)

Source from the content-addressed store, hash-verified

297
298// SetUserID sets the userID in the context
299func SetUserID(ctx context.Context, userID string) context.Context {
300 return context.WithValue(ctx, UserIDFlag, userID)
301}
302
303// UserID returns the userID from the context
304func UserID(ctx context.Context) string {

Callers 2

PopulateContextFunction · 0.85
GetAdminContextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected