Chever John 71a2d912e2 feat: initial commit for muyu-apiserver
Go service with gateway, RPC, model layers and k8s deploy configs.

Made-with: Cursor
2026-02-28 15:29:16 +08:00

32 lines
522 B
Go

package ctxdata
import "context"
func GetUserId(ctx context.Context) string {
if v, ok := ctx.Value("userId").(string); ok {
return v
}
return ""
}
func GetRoleKey(ctx context.Context) string {
if v, ok := ctx.Value("roleKey").(string); ok {
return v
}
return ""
}
func GetPathId(ctx context.Context) string {
if v, ok := ctx.Value("pathId").(string); ok {
return v
}
return ""
}
func GetPathKey(ctx context.Context) string {
if v, ok := ctx.Value("pathKey").(string); ok {
return v
}
return ""
}