package param import ( "context" "encoding/json" ) func GetUserID(c context.Context) int64 { userID := c.Value("user_id") if _, ok := userID.(int64); ok { return userID.(int64) } return 0 } func GetAuthToken(c context.Context) string { token := c.Value("token") if _, ok := token.(string); ok { return token.(string) } return "" } func GetJwtClaims(c context.Context) json.RawMessage { claim := c.Value("claim") if _, ok := claim.(json.RawMessage); ok { return claim.(json.RawMessage) } return []byte{} }