/
constants.go
52 lines (47 loc) · 1.81 KB
/
constants.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package kivik
const (
// KivikVersion is the version of the Kivik library.
KivikVersion = "1.0.0-beta"
// KivikVendor is the vendor string reported by this library.
KivikVendor = "Kivik"
)
// SessionCookieName is the name of the CouchDB session cookie.
const SessionCookieName = "AuthSession"
// UserPrefix is the mandatory CouchDB user prefix.
// See http://docs.couchdb.org/en/2.0.0/intro/security.html#org-couchdb-user
const UserPrefix = "org.couchdb.user:"
// HTTP methods supported by CouchDB. This is almost an exact copy of the
// methods in the standard http package, with the addition of MethodCopy, and
// a few methods left out which are not used by CouchDB.
const (
MethodGet = "GET"
MethodHead = "HEAD"
MethodPost = "POST"
MethodPut = "PUT"
MethodDelete = "DELETE"
MethodCopy = "COPY"
)
// HTTP response codes permitted by the CouchDB API.
// See http://docs.couchdb.org/en/1.6.1/api/basics.html#http-status-codes
const (
StatusOK = 200
StatusCreated = 201
StatusAccepted = 202
StatusFound = 302
StatusNotModified = 304
StatusBadRequest = 400
StatusUnauthorized = 401
StatusForbidden = 403
StatusNotFound = 404
StatusResourceNotAllowed = 405
StatusRequestTimeout = 408
StatusConflict = 409
StatusPreconditionFailed = 412
StatusBadContentType = 415
StatusRequestedRangeNotSatisfiable = 416
StatusExpectationFailed = 417
StatusInternalServerError = 500
// StatusNotImplemented is not returned by CouchDB proper. It is used by
// Kivik for optional features which are not implemented by some drivers.
StatusNotImplemented = 501
)