(model string, authSnapshot *Auth)
| 85 | } |
| 86 | |
| 87 | func buildErrorEventAuthStatus(model string, authSnapshot *Auth) errorEventAuthStatus { |
| 88 | status := errorEventAuthStatus{ |
| 89 | Status: authSnapshot.Status, |
| 90 | StatusMessage: strings.TrimSpace(authSnapshot.StatusMessage), |
| 91 | Disabled: authSnapshot.Disabled, |
| 92 | Unavailable: authSnapshot.Unavailable, |
| 93 | NextRetryAfter: timePtrIfSet(authSnapshot.NextRetryAfter), |
| 94 | Quota: errorEventQuotaStatusFrom(authSnapshot.Quota), |
| 95 | } |
| 96 | if modelState := errorEventModelStatusFrom(model, authSnapshot); modelState != nil { |
| 97 | status.Model = modelState |
| 98 | } |
| 99 | return status |
| 100 | } |
| 101 | |
| 102 | func errorEventModelStatusFrom(model string, authSnapshot *Auth) *errorEventModelStatus { |
| 103 | model = strings.TrimSpace(model) |
no test coverage detected