forked from hishamkaram/geoserver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvars.go
34 lines (31 loc) · 943 Bytes
/
vars.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package geoserver
import (
"errors"
)
const (
statusOk = 200
statusCreated = 201
statusNotAllowed = 405
statusForbidden = 403
statusInternalError = 500
statusNotFound = 404
statusUnauthorized = 401
jsonType = "application/json"
zipType = "application/zip"
appXMLType = "application/xml"
xmlType = "text/xml"
sldType = "application/vnd.ogc.sld+xml"
contentTypeHeader = "Content-Type"
acceptHeader = "Accept"
getMethod = "GET"
putMethod = "PUT"
postMethod = "POST"
deleteMethod = "DELETE"
)
var statusErrorMapping = map[int]error{
statusNotAllowed: errors.New("Method Not Allowed"),
statusNotFound: errors.New("Not Found"),
statusUnauthorized: errors.New("Unauthorized"),
statusInternalError: errors.New("Internal Server Error"),
statusForbidden: errors.New("Forbidden"),
}