(now time.Time)
| 5420 | } |
| 5421 | |
| 5422 | func (c CryptoKey) CanVerify(now time.Time) bool { |
| 5423 | now = now.UTC() |
| 5424 | hasSecret := c.Secret != "" |
| 5425 | beforeDelete := c.DeletesAt.IsZero() || now.Before(c.DeletesAt) |
| 5426 | return hasSecret && beforeDelete |
| 5427 | } |
| 5428 | |
| 5429 | // ComputeMaxIdleConns calculates the effective maxIdleConns value. If |
| 5430 | // configuredIdle is "auto", it returns maxOpen/3 with a minimum of 1. If |