()
| 102 | } |
| 103 | |
| 104 | func (e *modelCooldownError) Headers() http.Header { |
| 105 | headers := make(http.Header) |
| 106 | headers.Set("Content-Type", "application/json") |
| 107 | resetSeconds := int(math.Ceil(e.resetIn.Seconds())) |
| 108 | if resetSeconds < 0 { |
| 109 | resetSeconds = 0 |
| 110 | } |
| 111 | headers.Set("Retry-After", strconv.Itoa(resetSeconds)) |
| 112 | return headers |
| 113 | } |
| 114 | |
| 115 | func authPriority(auth *Auth) int { |
| 116 | if auth == nil || auth.Attributes == nil { |