Download credit/errors.go from Leon4gr45/openmeter: direct link, hf CLI and curl.
- Browser
- Download file 781 Bytes
-
https://huggingface.co/spaces/Leon4gr45/openmeter/resolve/main/credit/errors.go
- Command line
-
hf download hf://spaces/Leon4gr45/openmeter/credit/errors.go
-
curl -L -o errors.go https://huggingface.co/spaces/Leon4gr45/openmeter/resolve/main/credit/errors.go
781 Bytes
| package credit | |
| import ( | |
| "net/http" | |
| "github.com/openmeterio/openmeter/pkg/framework/commonhttp" | |
| "github.com/openmeterio/openmeter/pkg/models" | |
| ) | |
| const ErrCodeGrantAmountMustBePositive models.ErrorCode = "grant_amount_must_be_positive" | |
| var ErrGrantAmountMustBePositive = models.NewValidationIssue( | |
| ErrCodeGrantAmountMustBePositive, | |
| "amount must be positive", | |
| models.WithFieldString("amount"), | |
| commonhttp.WithHTTPStatusCodeAttribute(http.StatusBadRequest), | |
| ) | |
| const ErrCodeEffectiveAtMustBeSet models.ErrorCode = "grant_effective_at_must_be_set" | |
| var ErrGrantEffectiveAtMustBeSet = models.NewValidationIssue( | |
| ErrCodeEffectiveAtMustBeSet, | |
| "effective at must be set", | |
| models.WithFieldString("effectiveAt"), | |
| commonhttp.WithHTTPStatusCodeAttribute(http.StatusBadRequest), | |
| ) | |