MCPcopy Create free account
hub / github.com/bytebase/bytebase / withWorkspaceID

Function withWorkspaceID

backend/api/mcp/tool_http.go:117–119  ·  view source on GitHub ↗

withWorkspaceID adds the workspace ID to the context.

(ctx context.Context, id string)

Source from the content-addressed store, hash-verified

115
116// withWorkspaceID adds the workspace ID to the context.
117func withWorkspaceID(ctx context.Context, id string) context.Context {
118 return context.WithValue(ctx, workspaceIDKey{}, id)
119}
120
121// getWorkspaceID retrieves the workspace ID from the context.
122func getWorkspaceID(ctx context.Context) string {

Callers 3

authMiddlewareMethod · 0.85
testContextFunction · 0.85
TestWorkspaceIDContextFunction · 0.85

Calls

no outgoing calls

Tested by 2

testContextFunction · 0.68
TestWorkspaceIDContextFunction · 0.68