wip: grib

This commit is contained in:
Anatoly Antonov 2025-06-22 22:36:10 +03:00
parent 5240968c33
commit b9c1a98895
12 changed files with 414 additions and 5 deletions

View file

@ -1,6 +1,7 @@
package errcodes
import (
"net/http"
"strings"
)
@ -10,8 +11,6 @@ type ErrorCode struct {
Details string
}
var errorCodeCounter int32
func New(statusCode int, message string, details ...string) *ErrorCode {
return &ErrorCode{
StatusCode: statusCode,
@ -23,3 +22,8 @@ func New(statusCode int, message string, details ...string) *ErrorCode {
func (e *ErrorCode) Error() string {
return e.Message
}
var (
ErrNoDataset = New(http.StatusNotFound, "no grib dataset found")
ErrOutOfBounds = New(http.StatusBadRequest, "requested time is out of bounds")
)