-
Notifications
You must be signed in to change notification settings - Fork 57
/
Copy pathgenerated.go
155 lines (133 loc) · 4.86 KB
/
generated.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
// Code generated by go generate cmd/definitions; DO NOT EDIT.
package pairs
import "github.com/beyondstorage/go-storage/v5/types"
// WithContentDisposition will apply content_disposition value to Options.
//
// ContentDisposition
func WithContentDisposition(v string) (p types.Pair) {
return types.Pair{Key: "content_disposition", Value: v}
}
// WithContentMd5 will apply content_md5 value to Options.
//
// ContentMd5
func WithContentMd5(v string) (p types.Pair) {
return types.Pair{Key: "content_md5", Value: v}
}
// WithContentType will apply content_type value to Options.
//
// ContentType
func WithContentType(v string) (p types.Pair) {
return types.Pair{Key: "content_type", Value: v}
}
// WithContinuationToken will apply continuation_token value to Options.
//
// ContinuationToken specify the continuation token for list
func WithContinuationToken(v string) (p types.Pair) {
return types.Pair{Key: "continuation_token", Value: v}
}
// WithCredential will apply credential value to Options.
//
// Credential specify how to provide credential for service or storage
func WithCredential(v string) (p types.Pair) {
return types.Pair{Key: "credential", Value: v}
}
// WithDefaultContentType will apply default_content_type value to Options.
//
// DefaultContentType default value for content_type
func WithDefaultContentType(v string) (p types.Pair) {
return types.Pair{Key: "default_content_type", Value: v}
}
// WithDefaultIoCallback will apply default_io_callback value to Options.
//
// DefaultIoCallback default value for io_callback
func WithDefaultIoCallback(v func([]byte)) (p types.Pair) {
return types.Pair{Key: "default_io_callback", Value: v}
}
// WithEnableLoosePair will apply enable_loose_pair value to Options.
//
// EnableLoosePair Enable feature loose_pair
func WithEnableLoosePair() (p types.Pair) {
return types.Pair{Key: "enable_loose_pair", Value: true}
}
// WithEnableVirtualDir will apply enable_virtual_dir value to Options.
//
// EnableVirtualDir Enable feature virtual_dir
func WithEnableVirtualDir() (p types.Pair) {
return types.Pair{Key: "enable_virtual_dir", Value: true}
}
// WithEnableVirtualLink will apply enable_virtual_link value to Options.
//
// EnableVirtualLink Enable feature virtual_link
func WithEnableVirtualLink() (p types.Pair) {
return types.Pair{Key: "enable_virtual_link", Value: true}
}
// WithEnableVirtualObjectMetadata will apply enable_virtual_object_metadata value to Options.
//
// EnableVirtualObjectMetadata Enable feature virtual_object_metadata
func WithEnableVirtualObjectMetadata() (p types.Pair) {
return types.Pair{Key: "enable_virtual_object_metadata", Value: true}
}
// WithEndpoint will apply endpoint value to Options.
//
// Endpoint specify how to provide endpoint for service or storage
func WithEndpoint(v string) (p types.Pair) {
return types.Pair{Key: "endpoint", Value: v}
}
// WithIoCallback will apply io_callback value to Options.
//
// IoCallback specify what todo every time we read data from source
func WithIoCallback(v func([]byte)) (p types.Pair) {
return types.Pair{Key: "io_callback", Value: v}
}
// WithListMode will apply list_mode value to Options.
//
// ListMode
func WithListMode(v types.ListMode) (p types.Pair) {
return types.Pair{Key: "list_mode", Value: v}
}
// WithLocation will apply location value to Options.
//
// Location specify the location for service or storage
func WithLocation(v string) (p types.Pair) {
return types.Pair{Key: "location", Value: v}
}
// WithMultipartID will apply multipart_id value to Options.
//
// MultipartID
func WithMultipartID(v string) (p types.Pair) {
return types.Pair{Key: "multipart_id", Value: v}
}
// WithName will apply name value to Options.
//
// Name specify the storage name
func WithName(v string) (p types.Pair) {
return types.Pair{Key: "name", Value: v}
}
// WithObjectMode will apply object_mode value to Options.
//
// ObjectMode ObjectMode hint
func WithObjectMode(v types.ObjectMode) (p types.Pair) {
return types.Pair{Key: "object_mode", Value: v}
}
// WithOffset will apply offset value to Options.
//
// Offset specify offset for this request, storage will seek to this offset before read
func WithOffset(v int64) (p types.Pair) {
return types.Pair{Key: "offset", Value: v}
}
// WithSize will apply size value to Options.
//
// Size specify size for this request, storage will only read limited content data
func WithSize(v int64) (p types.Pair) {
return types.Pair{Key: "size", Value: v}
}
// WithWorkDir will apply work_dir value to Options.
//
// WorkDir specify the work dir for service or storage, every operation will be relative to this dir.
// work_dir SHOULD be an absolute path.
// work_dir will be default to / if not set.
// work_dir SHOULD be Unix style for object storage services.
// For fs storage service on windows platform, the behavior is defined separately.
func WithWorkDir(v string) (p types.Pair) {
return types.Pair{Key: "work_dir", Value: v}
}