/
constants.go
60 lines (51 loc) · 1.86 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
53
54
55
56
57
58
59
60
/*
Copyright (c) 2022 - Present. Blend Labs, Inc. All rights reserved
Use of this source code is governed by a MIT license that can be found in the LICENSE file.
*/
package r2
import "github.com/blend/go-sdk/webutil"
const (
// TestURL can be used in tests for the URL passed to r2.New(...)
//
// The URL itself sets `https` as the scheme, `test.invalid` as the host,
// `/test` as the path, and `query=value` as the querystring.
//
// Note: .invalid is a top level special domain that will _never_ be assigned
// to a real registrant, it is always reserved for testing.
// See: https://www.iana.org/domains/reserved
TestURL = webutil.TestURL
)
const (
// MethodGet is a method.
MethodGet = webutil.MethodGet
// MethodPost is a method.
MethodPost = webutil.MethodPost
// MethodPut is a method.
MethodPut = webutil.MethodPut
// MethodPatch is a method.
MethodPatch = webutil.MethodPatch
// MethodDelete is a method.
MethodDelete = webutil.MethodDelete
// MethodOptions is a method.
MethodOptions = webutil.MethodOptions
)
var (
// HeaderConnection is a http header.
HeaderConnection = webutil.HeaderConnection
// HeaderContentType is a http header.
HeaderContentType = webutil.HeaderContentType
)
const (
// ConnectionKeepAlive is a connection header value.
ConnectionKeepAlive = webutil.ConnectionKeepAlive
)
const (
// ContentTypeApplicationJSON is a content type header value.
ContentTypeApplicationJSON = webutil.ContentTypeApplicationJSON
// ContentTypeApplicationXML is a content type header value.
ContentTypeApplicationXML = webutil.ContentTypeApplicationXML
// ContentTypeApplicationFormEncoded is a content type header value.
ContentTypeApplicationFormEncoded = webutil.ContentTypeApplicationFormEncoded
// ContentTypeApplicationOctetStream is a content type header value.
ContentTypeApplicationOctetStream = webutil.ContentTypeApplicationOctetStream
)