wip: grib
This commit is contained in:
parent
5240968c33
commit
b9c1a98895
12 changed files with 414 additions and 5 deletions
|
|
@ -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")
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue