MCPcopy Index your code
hub / github.com/bytebase/bytebase / GetWorkspaceIDFromContext

Function GetWorkspaceIDFromContext

backend/common/context.go:55–60  ·  view source on GitHub ↗

GetWorkspaceIDFromContext returns the workspace ID from the request context.

(ctx context.Context)

Source from the content-addressed store, hash-verified

53
54// GetWorkspaceIDFromContext returns the workspace ID from the request context.
55func GetWorkspaceIDFromContext(ctx context.Context) string {
56 if v, ok := ctx.Value(WorkspaceIDContextKey).(string); ok {
57 return v
58 }
59 return ""
60}
61
62type AuthMethod int
63

Calls

no outgoing calls

Tested by 1