(auth *coreauth.Auth)
| 575 | } |
| 576 | |
| 577 | func authWebsocketsValue(auth *coreauth.Auth) (bool, bool) { |
| 578 | if auth == nil { |
| 579 | return false, false |
| 580 | } |
| 581 | if auth.Attributes != nil { |
| 582 | if raw := strings.TrimSpace(auth.Attributes["websockets"]); raw != "" { |
| 583 | parsed, errParse := strconv.ParseBool(raw) |
| 584 | if errParse == nil { |
| 585 | return parsed, true |
| 586 | } |
| 587 | } |
| 588 | } |
| 589 | if auth.Metadata == nil { |
| 590 | return false, false |
| 591 | } |
| 592 | return parseWebsocketsValue(auth.Metadata["websockets"]) |
| 593 | } |
| 594 | |
| 595 | func parsePriorityValue(raw any) (int, bool) { |
| 596 | switch v := raw.(type) { |
no test coverage detected