| 10 | ) |
| 11 | |
| 12 | type User struct { |
| 13 | Id string `json:"id"` |
| 14 | Name string `json:"name"` |
| 15 | CreatedAt int64 `json:"createdAt"` |
| 16 | UpdatedAt int64 `json:"updatedAt"` |
| 17 | Tags []string `json:"tags"` |
| 18 | KeyIds []string `json:"keyIds"` |
| 19 | Revoked bool `json:"revoked"` |
| 20 | RevokedReason string `json:"revokedReason"` |
| 21 | CostLimitInUsd float64 `json:"costLimitInUsd"` |
| 22 | CostLimitInUsdOverTime float64 `json:"costLimitInUsdOverTime"` |
| 23 | CostLimitInUsdUnit key.TimeUnit `json:"costLimitInUsdUnit"` |
| 24 | RateLimitOverTime int `json:"rateLimitOverTime"` |
| 25 | RateLimitUnit key.TimeUnit `json:"rateLimitUnit"` |
| 26 | Ttl string `json:"ttl"` |
| 27 | AllowedPaths []key.PathConfig `json:"allowedPaths"` |
| 28 | AllowedModels []string `json:"allowedModels"` |
| 29 | UserId string `json:"userId"` |
| 30 | } |
| 31 | |
| 32 | func (u *User) Validate() error { |
| 33 | invalid := []string{} |
nothing calls this directly
no outgoing calls
no test coverage detected