-
Notifications
You must be signed in to change notification settings - Fork 0
/
operation.deprecated.go
821 lines (751 loc) · 32.4 KB
/
operation.deprecated.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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
package types
import (
"context"
"io"
"net/http"
"time"
)
// Appender is the interface for Append related operations.
//
// Deprecated: Moved to Storager.
type Appender interface {
// CommitAppend will commit and finish an append process.
//
// Deprecated: Moved to Storager.
CommitAppend(o *Object, pairs ...Pair) (err error)
// CommitAppendWithContext will commit and finish an append process.
//
// Deprecated: Moved to Storager.
CommitAppendWithContext(ctx context.Context, o *Object, pairs ...Pair) (err error)
// CreateAppend will create an append object.
//
// ## Behavior
//
// - CreateAppend SHOULD create an appendable object with position 0 and size 0.
// - CreateAppend SHOULD NOT return an error as the object exist.
// - Service SHOULD check and delete the object if exists.
//
// Deprecated: Moved to Storager.
CreateAppend(path string, pairs ...Pair) (o *Object, err error)
// CreateAppendWithContext will create an append object.
//
// ## Behavior
//
// - CreateAppend SHOULD create an appendable object with position 0 and size 0.
// - CreateAppend SHOULD NOT return an error as the object exist.
// - Service SHOULD check and delete the object if exists.
//
// Deprecated: Moved to Storager.
CreateAppendWithContext(ctx context.Context, path string, pairs ...Pair) (o *Object, err error)
// WriteAppend will append content to an append object.
//
// Deprecated: Moved to Storager.
WriteAppend(o *Object, r io.Reader, size int64, pairs ...Pair) (n int64, err error)
// WriteAppendWithContext will append content to an append object.
//
// Deprecated: Moved to Storager.
WriteAppendWithContext(ctx context.Context, o *Object, r io.Reader, size int64, pairs ...Pair) (n int64, err error)
mustEmbedUnimplementedAppender()
}
// UnimplementedAppender must be embedded to have forward compatible implementations.
//
// Appender is the interface for Append related operations.
//
// Deprecated: Moved to Storager.
type UnimplementedAppender struct {
}
func (s UnimplementedAppender) mustEmbedUnimplementedAppender() {
}
func (s UnimplementedAppender) String() string {
return "UnimplementedAppender"
}
func (s UnimplementedAppender) CommitAppend(o *Object, pairs ...Pair) (err error) {
err = NewOperationNotImplementedError("commit_append")
return
}
func (s UnimplementedAppender) CommitAppendWithContext(ctx context.Context, o *Object, pairs ...Pair) (err error) {
err = NewOperationNotImplementedError("commit_append")
return
}
func (s UnimplementedAppender) CreateAppend(path string, pairs ...Pair) (o *Object, err error) {
err = NewOperationNotImplementedError("create_append")
return
}
func (s UnimplementedAppender) CreateAppendWithContext(ctx context.Context, path string, pairs ...Pair) (o *Object, err error) {
err = NewOperationNotImplementedError("create_append")
return
}
func (s UnimplementedAppender) WriteAppend(o *Object, r io.Reader, size int64, pairs ...Pair) (n int64, err error) {
err = NewOperationNotImplementedError("write_append")
return
}
func (s UnimplementedAppender) WriteAppendWithContext(ctx context.Context, o *Object, r io.Reader, size int64, pairs ...Pair) (n int64, err error) {
err = NewOperationNotImplementedError("write_append")
return
}
// Blocker is the interface for Block related operations.
//
// Deprecated: Moved to Storager.
type Blocker interface {
// CombineBlock will combine blocks into an object.
//
// Deprecated: Moved to Storager.
CombineBlock(o *Object, bids []string, pairs ...Pair) (err error)
// CombineBlockWithContext will combine blocks into an object.
//
// Deprecated: Moved to Storager.
CombineBlockWithContext(ctx context.Context, o *Object, bids []string, pairs ...Pair) (err error)
// CreateBlock will create a new block object.
//
// ## Behavior
// - CreateBlock SHOULD NOT return an error as the object exist.
// - Service that has native support for `overwrite` doesn't NEED to check the object exists or not.
// - Service that doesn't have native support for `overwrite` SHOULD check and delete the object if
// exists.
//
// Deprecated: Moved to Storager.
CreateBlock(path string, pairs ...Pair) (o *Object, err error)
// CreateBlockWithContext will create a new block object.
//
// ## Behavior
// - CreateBlock SHOULD NOT return an error as the object exist.
// - Service that has native support for `overwrite` doesn't NEED to check the object exists or not.
// - Service that doesn't have native support for `overwrite` SHOULD check and delete the object if
// exists.
//
// Deprecated: Moved to Storager.
CreateBlockWithContext(ctx context.Context, path string, pairs ...Pair) (o *Object, err error)
// ListBlock will list blocks belong to this object.
//
// Deprecated: Moved to Storager.
ListBlock(o *Object, pairs ...Pair) (bi *BlockIterator, err error)
// ListBlockWithContext will list blocks belong to this object.
//
// Deprecated: Moved to Storager.
ListBlockWithContext(ctx context.Context, o *Object, pairs ...Pair) (bi *BlockIterator, err error)
// WriteBlock will write content to a block.
//
// Deprecated: Moved to Storager.
WriteBlock(o *Object, r io.Reader, size int64, bid string, pairs ...Pair) (n int64, err error)
// WriteBlockWithContext will write content to a block.
//
// Deprecated: Moved to Storager.
WriteBlockWithContext(ctx context.Context, o *Object, r io.Reader, size int64, bid string, pairs ...Pair) (n int64, err error)
mustEmbedUnimplementedBlocker()
}
// UnimplementedBlocker must be embedded to have forward compatible implementations.
//
// Blocker is the interface for Block related operations.
//
// Deprecated: Moved to Storager.
type UnimplementedBlocker struct {
}
func (s UnimplementedBlocker) mustEmbedUnimplementedBlocker() {
}
func (s UnimplementedBlocker) String() string {
return "UnimplementedBlocker"
}
func (s UnimplementedBlocker) CombineBlock(o *Object, bids []string, pairs ...Pair) (err error) {
err = NewOperationNotImplementedError("combine_block")
return
}
func (s UnimplementedBlocker) CombineBlockWithContext(ctx context.Context, o *Object, bids []string, pairs ...Pair) (err error) {
err = NewOperationNotImplementedError("combine_block")
return
}
func (s UnimplementedBlocker) CreateBlock(path string, pairs ...Pair) (o *Object, err error) {
err = NewOperationNotImplementedError("create_block")
return
}
func (s UnimplementedBlocker) CreateBlockWithContext(ctx context.Context, path string, pairs ...Pair) (o *Object, err error) {
err = NewOperationNotImplementedError("create_block")
return
}
func (s UnimplementedBlocker) ListBlock(o *Object, pairs ...Pair) (bi *BlockIterator, err error) {
err = NewOperationNotImplementedError("list_block")
return
}
func (s UnimplementedBlocker) ListBlockWithContext(ctx context.Context, o *Object, pairs ...Pair) (bi *BlockIterator, err error) {
err = NewOperationNotImplementedError("list_block")
return
}
func (s UnimplementedBlocker) WriteBlock(o *Object, r io.Reader, size int64, bid string, pairs ...Pair) (n int64, err error) {
err = NewOperationNotImplementedError("write_block")
return
}
func (s UnimplementedBlocker) WriteBlockWithContext(ctx context.Context, o *Object, r io.Reader, size int64, bid string, pairs ...Pair) (n int64, err error) {
err = NewOperationNotImplementedError("write_block")
return
}
// Copier is the interface for Copy.
//
// Deprecated: Moved to Storager.
type Copier interface {
// Copy will copy an Object or multiple object in the service.
//
// ## Behavior
//
// - Copy only copy one and only one object.
// - Service DON'T NEED to support copy a non-empty directory or copy files recursively.
// - User NEED to implement copy a non-empty directory and copy recursively by themself.
// - Copy a file to a directory SHOULD return `ErrObjectModeInvalid`.
// - Copy SHOULD NOT return an error as dst object exists.
// - Service that has native support for `overwrite` doesn't NEED to check the dst object exists or
// not.
// - Service that doesn't have native support for `overwrite` SHOULD check and delete the dst object
// if exists.
// - A successful copy opration should be complete, which means the dst object's content and metadata
// should be the same as src object.
//
// Deprecated: Moved to Storager.
Copy(src string, dst string, pairs ...Pair) (err error)
// CopyWithContext will copy an Object or multiple object in the service.
//
// ## Behavior
//
// - Copy only copy one and only one object.
// - Service DON'T NEED to support copy a non-empty directory or copy files recursively.
// - User NEED to implement copy a non-empty directory and copy recursively by themself.
// - Copy a file to a directory SHOULD return `ErrObjectModeInvalid`.
// - Copy SHOULD NOT return an error as dst object exists.
// - Service that has native support for `overwrite` doesn't NEED to check the dst object exists or
// not.
// - Service that doesn't have native support for `overwrite` SHOULD check and delete the dst object
// if exists.
// - A successful copy opration should be complete, which means the dst object's content and metadata
// should be the same as src object.
//
// Deprecated: Moved to Storager.
CopyWithContext(ctx context.Context, src string, dst string, pairs ...Pair) (err error)
mustEmbedUnimplementedCopier()
}
// UnimplementedCopier must be embedded to have forward compatible implementations.
//
// Copier is the interface for Copy.
//
// Deprecated: Moved to Storager.
type UnimplementedCopier struct {
}
func (s UnimplementedCopier) mustEmbedUnimplementedCopier() {
}
func (s UnimplementedCopier) String() string {
return "UnimplementedCopier"
}
func (s UnimplementedCopier) Copy(src string, dst string, pairs ...Pair) (err error) {
err = NewOperationNotImplementedError("copy")
return
}
func (s UnimplementedCopier) CopyWithContext(ctx context.Context, src string, dst string, pairs ...Pair) (err error) {
err = NewOperationNotImplementedError("copy")
return
}
// Direr is the interface for Directory.
//
// Deprecated: Moved to Storager.
type Direr interface {
// CreateDir will create a new dir object.
//
// Deprecated: Moved to Storager.
CreateDir(path string, pairs ...Pair) (o *Object, err error)
// CreateDirWithContext will create a new dir object.
//
// Deprecated: Moved to Storager.
CreateDirWithContext(ctx context.Context, path string, pairs ...Pair) (o *Object, err error)
mustEmbedUnimplementedDirer()
}
// UnimplementedDirer must be embedded to have forward compatible implementations.
//
// Direr is the interface for Directory.
//
// Deprecated: Moved to Storager.
type UnimplementedDirer struct {
}
func (s UnimplementedDirer) mustEmbedUnimplementedDirer() {
}
func (s UnimplementedDirer) String() string {
return "UnimplementedDirer"
}
func (s UnimplementedDirer) CreateDir(path string, pairs ...Pair) (o *Object, err error) {
err = NewOperationNotImplementedError("create_dir")
return
}
func (s UnimplementedDirer) CreateDirWithContext(ctx context.Context, path string, pairs ...Pair) (o *Object, err error) {
err = NewOperationNotImplementedError("create_dir")
return
}
// Fetcher is the interface for Fetch.
//
// Deprecated: Moved to Storager.
type Fetcher interface {
// Fetch will fetch from a given url to path.
//
// ## Behavior
//
// - Fetch SHOULD NOT return an error as the object exists.
// - A successful fetch operation should be complete, which means the object's content and metadata
// should be the same as requiring from the url.
//
// Deprecated: Moved to Storager.
Fetch(path string, url string, pairs ...Pair) (err error)
// FetchWithContext will fetch from a given url to path.
//
// ## Behavior
//
// - Fetch SHOULD NOT return an error as the object exists.
// - A successful fetch operation should be complete, which means the object's content and metadata
// should be the same as requiring from the url.
//
// Deprecated: Moved to Storager.
FetchWithContext(ctx context.Context, path string, url string, pairs ...Pair) (err error)
mustEmbedUnimplementedFetcher()
}
// UnimplementedFetcher must be embedded to have forward compatible implementations.
//
// Fetcher is the interface for Fetch.
//
// Deprecated: Moved to Storager.
type UnimplementedFetcher struct {
}
func (s UnimplementedFetcher) mustEmbedUnimplementedFetcher() {
}
func (s UnimplementedFetcher) String() string {
return "UnimplementedFetcher"
}
func (s UnimplementedFetcher) Fetch(path string, url string, pairs ...Pair) (err error) {
err = NewOperationNotImplementedError("fetch")
return
}
func (s UnimplementedFetcher) FetchWithContext(ctx context.Context, path string, url string, pairs ...Pair) (err error) {
err = NewOperationNotImplementedError("fetch")
return
}
// Linker is the interface for link.
//
// Deprecated: Moved to Storager.
type Linker interface {
// CreateLink Will create a link object.
//
// # Behavior
//
// - `path` and `target` COULD be relative or absolute path.
// - If `target` not exists, CreateLink will still create a link object to path.
// - If `path` exists:
// - If `path` is a symlink object, CreateLink will remove the symlink object and create a new link object
// to path.
// - If `path` is not a symlink object, CreateLink will return an ErrObjectModeInvalid error when
// the service does not support overwrite.
// - A link object COULD be returned in `Stat` or `List`.
// - CreateLink COULD implement virtual_link feature when service without native support.
// - Users SHOULD enable this feature by themselves.
//
// Deprecated: Moved to Storager.
CreateLink(path string, target string, pairs ...Pair) (o *Object, err error)
// CreateLinkWithContext Will create a link object.
//
// # Behavior
//
// - `path` and `target` COULD be relative or absolute path.
// - If `target` not exists, CreateLink will still create a link object to path.
// - If `path` exists:
// - If `path` is a symlink object, CreateLink will remove the symlink object and create a new link object
// to path.
// - If `path` is not a symlink object, CreateLink will return an ErrObjectModeInvalid error when
// the service does not support overwrite.
// - A link object COULD be returned in `Stat` or `List`.
// - CreateLink COULD implement virtual_link feature when service without native support.
// - Users SHOULD enable this feature by themselves.
//
// Deprecated: Moved to Storager.
CreateLinkWithContext(ctx context.Context, path string, target string, pairs ...Pair) (o *Object, err error)
mustEmbedUnimplementedLinker()
}
// UnimplementedLinker must be embedded to have forward compatible implementations.
//
// Linker is the interface for link.
//
// Deprecated: Moved to Storager.
type UnimplementedLinker struct {
}
func (s UnimplementedLinker) mustEmbedUnimplementedLinker() {
}
func (s UnimplementedLinker) String() string {
return "UnimplementedLinker"
}
func (s UnimplementedLinker) CreateLink(path string, target string, pairs ...Pair) (o *Object, err error) {
err = NewOperationNotImplementedError("create_link")
return
}
func (s UnimplementedLinker) CreateLinkWithContext(ctx context.Context, path string, target string, pairs ...Pair) (o *Object, err error) {
err = NewOperationNotImplementedError("create_link")
return
}
// Mover is the interface for Move.
//
// Deprecated: Moved to Storager.
type Mover interface {
// Move will move an object in the service.
//
// ## Behavior
//
// - Move only move one and only one object.
// - Service DON'T NEED to support move a non-empty directory.
// - User NEED to implement move a non-empty directory by themself.
// - Move a file to a directory SHOULD return `ErrObjectModeInvalid`.
// - Move SHOULD NOT return an error as dst object exists.
// - Service that has native support for `overwrite` doesn't NEED to check the dst object exists or
// not.
// - Service that doesn't have native support for `overwrite` SHOULD check and delete the dst object
// if exists.
// - A successful move operation SHOULD be complete, which means the dst object's content and metadata
// should be the same as src object.
//
// Deprecated: Moved to Storager.
Move(src string, dst string, pairs ...Pair) (err error)
// MoveWithContext will move an object in the service.
//
// ## Behavior
//
// - Move only move one and only one object.
// - Service DON'T NEED to support move a non-empty directory.
// - User NEED to implement move a non-empty directory by themself.
// - Move a file to a directory SHOULD return `ErrObjectModeInvalid`.
// - Move SHOULD NOT return an error as dst object exists.
// - Service that has native support for `overwrite` doesn't NEED to check the dst object exists or
// not.
// - Service that doesn't have native support for `overwrite` SHOULD check and delete the dst object
// if exists.
// - A successful move operation SHOULD be complete, which means the dst object's content and metadata
// should be the same as src object.
//
// Deprecated: Moved to Storager.
MoveWithContext(ctx context.Context, src string, dst string, pairs ...Pair) (err error)
mustEmbedUnimplementedMover()
}
// UnimplementedMover must be embedded to have forward compatible implementations.
//
// Mover is the interface for Move.
//
// Deprecated: Moved to Storager.
type UnimplementedMover struct {
}
func (s UnimplementedMover) mustEmbedUnimplementedMover() {
}
func (s UnimplementedMover) String() string {
return "UnimplementedMover"
}
func (s UnimplementedMover) Move(src string, dst string, pairs ...Pair) (err error) {
err = NewOperationNotImplementedError("move")
return
}
func (s UnimplementedMover) MoveWithContext(ctx context.Context, src string, dst string, pairs ...Pair) (err error) {
err = NewOperationNotImplementedError("move")
return
}
// MultipartHTTPSigner is the interface for Multiparter related operations which support authentication.
//
// Deprecated: Moved to Storager.
type MultipartHTTPSigner interface {
// QuerySignHTTPCompleteMultipart will complete a multipart upload and construct an Object by
// using query parameters to authenticate requests.
//
// Deprecated: Moved to Storager.
QuerySignHTTPCompleteMultipart(o *Object, parts []*Part, expire time.Duration, pairs ...Pair) (req *http.Request, err error)
// QuerySignHTTPCompleteMultipartWithContext will complete a multipart upload and construct
// an Object by using query parameters to authenticate requests.
//
// Deprecated: Moved to Storager.
QuerySignHTTPCompleteMultipartWithContext(ctx context.Context, o *Object, parts []*Part, expire time.Duration, pairs ...Pair) (req *http.Request, err error)
// QuerySignHTTPCreateMultipart will create a new multipart by using query parameters to authenticate
// requests.
//
// Deprecated: Moved to Storager.
QuerySignHTTPCreateMultipart(path string, expire time.Duration, pairs ...Pair) (req *http.Request, err error)
// QuerySignHTTPCreateMultipartWithContext will create a new multipart by using query parameters
// to authenticate requests.
//
// Deprecated: Moved to Storager.
QuerySignHTTPCreateMultipartWithContext(ctx context.Context, path string, expire time.Duration, pairs ...Pair) (req *http.Request, err error)
// QuerySignHTTPListMultipart will list parts belong to this multipart by using query parameters
// to authenticate requests.
//
// Deprecated: Moved to Storager.
QuerySignHTTPListMultipart(o *Object, expire time.Duration, pairs ...Pair) (req *http.Request, err error)
// QuerySignHTTPListMultipartWithContext will list parts belong to this multipart by using query
// parameters to authenticate requests.
//
// Deprecated: Moved to Storager.
QuerySignHTTPListMultipartWithContext(ctx context.Context, o *Object, expire time.Duration, pairs ...Pair) (req *http.Request, err error)
// QuerySignHTTPWriteMultipart will write content to a multipart by using query parameters to authenticate
// requests.
//
// Deprecated: Moved to Storager.
QuerySignHTTPWriteMultipart(o *Object, size int64, index int, expire time.Duration, pairs ...Pair) (req *http.Request, err error)
// QuerySignHTTPWriteMultipartWithContext will write content to a multipart by using query parameters
// to authenticate requests.
//
// Deprecated: Moved to Storager.
QuerySignHTTPWriteMultipartWithContext(ctx context.Context, o *Object, size int64, index int, expire time.Duration, pairs ...Pair) (req *http.Request, err error)
mustEmbedUnimplementedMultipartHTTPSigner()
}
// UnimplementedMultipartHTTPSigner must be embedded to have forward compatible implementations.
//
// MultipartHTTPSigner is the interface for Multiparter related operations which support authentication.
//
// Deprecated: Moved to Storager.
type UnimplementedMultipartHTTPSigner struct {
}
func (s UnimplementedMultipartHTTPSigner) mustEmbedUnimplementedMultipartHTTPSigner() {
}
func (s UnimplementedMultipartHTTPSigner) String() string {
return "UnimplementedMultipartHTTPSigner"
}
func (s UnimplementedMultipartHTTPSigner) QuerySignHTTPCompleteMultipart(o *Object, parts []*Part, expire time.Duration, pairs ...Pair) (req *http.Request, err error) {
err = NewOperationNotImplementedError("query_sign_http_complete_multipart")
return
}
func (s UnimplementedMultipartHTTPSigner) QuerySignHTTPCompleteMultipartWithContext(ctx context.Context, o *Object, parts []*Part, expire time.Duration, pairs ...Pair) (req *http.Request, err error) {
err = NewOperationNotImplementedError("query_sign_http_complete_multipart")
return
}
func (s UnimplementedMultipartHTTPSigner) QuerySignHTTPCreateMultipart(path string, expire time.Duration, pairs ...Pair) (req *http.Request, err error) {
err = NewOperationNotImplementedError("query_sign_http_create_multipart")
return
}
func (s UnimplementedMultipartHTTPSigner) QuerySignHTTPCreateMultipartWithContext(ctx context.Context, path string, expire time.Duration, pairs ...Pair) (req *http.Request, err error) {
err = NewOperationNotImplementedError("query_sign_http_create_multipart")
return
}
func (s UnimplementedMultipartHTTPSigner) QuerySignHTTPListMultipart(o *Object, expire time.Duration, pairs ...Pair) (req *http.Request, err error) {
err = NewOperationNotImplementedError("query_sign_http_list_multipart")
return
}
func (s UnimplementedMultipartHTTPSigner) QuerySignHTTPListMultipartWithContext(ctx context.Context, o *Object, expire time.Duration, pairs ...Pair) (req *http.Request, err error) {
err = NewOperationNotImplementedError("query_sign_http_list_multipart")
return
}
func (s UnimplementedMultipartHTTPSigner) QuerySignHTTPWriteMultipart(o *Object, size int64, index int, expire time.Duration, pairs ...Pair) (req *http.Request, err error) {
err = NewOperationNotImplementedError("query_sign_http_write_multipart")
return
}
func (s UnimplementedMultipartHTTPSigner) QuerySignHTTPWriteMultipartWithContext(ctx context.Context, o *Object, size int64, index int, expire time.Duration, pairs ...Pair) (req *http.Request, err error) {
err = NewOperationNotImplementedError("query_sign_http_write_multipart")
return
}
// Multiparter is the interface for Multipart related operations.
//
// Deprecated: Moved to Storager.
type Multiparter interface {
// CompleteMultipart will complete a multipart upload and construct an Object.
//
// Deprecated: Moved to Storager.
CompleteMultipart(o *Object, parts []*Part, pairs ...Pair) (err error)
// CompleteMultipartWithContext will complete a multipart upload and construct an Object.
//
// Deprecated: Moved to Storager.
CompleteMultipartWithContext(ctx context.Context, o *Object, parts []*Part, pairs ...Pair) (err error)
// CreateMultipart will create a new multipart.
//
// ## Behavior
//
// - CreateMultipart SHOULD NOT return an error as the object exists.
//
// Deprecated: Moved to Storager.
CreateMultipart(path string, pairs ...Pair) (o *Object, err error)
// CreateMultipartWithContext will create a new multipart.
//
// ## Behavior
//
// - CreateMultipart SHOULD NOT return an error as the object exists.
//
// Deprecated: Moved to Storager.
CreateMultipartWithContext(ctx context.Context, path string, pairs ...Pair) (o *Object, err error)
// ListMultipart will list parts belong to this multipart.
//
// Deprecated: Moved to Storager.
ListMultipart(o *Object, pairs ...Pair) (pi *PartIterator, err error)
// ListMultipartWithContext will list parts belong to this multipart.
//
// Deprecated: Moved to Storager.
ListMultipartWithContext(ctx context.Context, o *Object, pairs ...Pair) (pi *PartIterator, err error)
// WriteMultipart will write content to a multipart.
//
// Deprecated: Moved to Storager.
WriteMultipart(o *Object, r io.Reader, size int64, index int, pairs ...Pair) (n int64, part *Part, err error)
// WriteMultipartWithContext will write content to a multipart.
//
// Deprecated: Moved to Storager.
WriteMultipartWithContext(ctx context.Context, o *Object, r io.Reader, size int64, index int, pairs ...Pair) (n int64, part *Part, err error)
mustEmbedUnimplementedMultiparter()
}
// UnimplementedMultiparter must be embedded to have forward compatible implementations.
//
// Multiparter is the interface for Multipart related operations.
//
// Deprecated: Moved to Storager.
type UnimplementedMultiparter struct {
}
func (s UnimplementedMultiparter) mustEmbedUnimplementedMultiparter() {
}
func (s UnimplementedMultiparter) String() string {
return "UnimplementedMultiparter"
}
func (s UnimplementedMultiparter) CompleteMultipart(o *Object, parts []*Part, pairs ...Pair) (err error) {
err = NewOperationNotImplementedError("complete_multipart")
return
}
func (s UnimplementedMultiparter) CompleteMultipartWithContext(ctx context.Context, o *Object, parts []*Part, pairs ...Pair) (err error) {
err = NewOperationNotImplementedError("complete_multipart")
return
}
func (s UnimplementedMultiparter) CreateMultipart(path string, pairs ...Pair) (o *Object, err error) {
err = NewOperationNotImplementedError("create_multipart")
return
}
func (s UnimplementedMultiparter) CreateMultipartWithContext(ctx context.Context, path string, pairs ...Pair) (o *Object, err error) {
err = NewOperationNotImplementedError("create_multipart")
return
}
func (s UnimplementedMultiparter) ListMultipart(o *Object, pairs ...Pair) (pi *PartIterator, err error) {
err = NewOperationNotImplementedError("list_multipart")
return
}
func (s UnimplementedMultiparter) ListMultipartWithContext(ctx context.Context, o *Object, pairs ...Pair) (pi *PartIterator, err error) {
err = NewOperationNotImplementedError("list_multipart")
return
}
func (s UnimplementedMultiparter) WriteMultipart(o *Object, r io.Reader, size int64, index int, pairs ...Pair) (n int64, part *Part, err error) {
err = NewOperationNotImplementedError("write_multipart")
return
}
func (s UnimplementedMultiparter) WriteMultipartWithContext(ctx context.Context, o *Object, r io.Reader, size int64, index int, pairs ...Pair) (n int64, part *Part, err error) {
err = NewOperationNotImplementedError("write_multipart")
return
}
// Pager is the interface for Page related operations which support random write.
//
// Deprecated: Moved to Storager.
type Pager interface {
// CreatePage will create a new page object.
//
// ## Behavior
//
// - CreatePage SHOULD NOT return an error as the object exists.
//
// Deprecated: Moved to Storager.
CreatePage(path string, pairs ...Pair) (o *Object, err error)
// CreatePageWithContext will create a new page object.
//
// ## Behavior
//
// - CreatePage SHOULD NOT return an error as the object exists.
//
// Deprecated: Moved to Storager.
CreatePageWithContext(ctx context.Context, path string, pairs ...Pair) (o *Object, err error)
// WritePage will write content to specific offset.
//
// Deprecated: Moved to Storager.
WritePage(o *Object, r io.Reader, size int64, offset int64, pairs ...Pair) (n int64, err error)
// WritePageWithContext will write content to specific offset.
//
// Deprecated: Moved to Storager.
WritePageWithContext(ctx context.Context, o *Object, r io.Reader, size int64, offset int64, pairs ...Pair) (n int64, err error)
mustEmbedUnimplementedPager()
}
// UnimplementedPager must be embedded to have forward compatible implementations.
//
// Pager is the interface for Page related operations which support random write.
//
// Deprecated: Moved to Storager.
type UnimplementedPager struct {
}
func (s UnimplementedPager) mustEmbedUnimplementedPager() {
}
func (s UnimplementedPager) String() string {
return "UnimplementedPager"
}
func (s UnimplementedPager) CreatePage(path string, pairs ...Pair) (o *Object, err error) {
err = NewOperationNotImplementedError("create_page")
return
}
func (s UnimplementedPager) CreatePageWithContext(ctx context.Context, path string, pairs ...Pair) (o *Object, err error) {
err = NewOperationNotImplementedError("create_page")
return
}
func (s UnimplementedPager) WritePage(o *Object, r io.Reader, size int64, offset int64, pairs ...Pair) (n int64, err error) {
err = NewOperationNotImplementedError("write_page")
return
}
func (s UnimplementedPager) WritePageWithContext(ctx context.Context, o *Object, r io.Reader, size int64, offset int64, pairs ...Pair) (n int64, err error) {
err = NewOperationNotImplementedError("write_page")
return
}
// StorageHTTPSigner is the interface for Storager related operations which support authentication.
//
// Deprecated: Moved to Storager.
type StorageHTTPSigner interface {
// QuerySignHTTPDelete will delete an object from service by using query parameters to authenticate
// requests.
//
// Deprecated: Moved to Storager.
QuerySignHTTPDelete(path string, expire time.Duration, pairs ...Pair) (req *http.Request, err error)
// QuerySignHTTPDeleteWithContext will delete an object from service by using query parameters
// to authenticate requests.
//
// Deprecated: Moved to Storager.
QuerySignHTTPDeleteWithContext(ctx context.Context, path string, expire time.Duration, pairs ...Pair) (req *http.Request, err error)
// QuerySignHTTPRead will read data from the file by using query parameters to authenticate requests.
//
// Deprecated: Moved to Storager.
QuerySignHTTPRead(path string, expire time.Duration, pairs ...Pair) (req *http.Request, err error)
// QuerySignHTTPReadWithContext will read data from the file by using query parameters to authenticate
// requests.
//
// Deprecated: Moved to Storager.
QuerySignHTTPReadWithContext(ctx context.Context, path string, expire time.Duration, pairs ...Pair) (req *http.Request, err error)
// QuerySignHTTPWrite will write data into a file by using query parameters to authenticate requests.
//
// Deprecated: Moved to Storager.
QuerySignHTTPWrite(path string, size int64, expire time.Duration, pairs ...Pair) (req *http.Request, err error)
// QuerySignHTTPWriteWithContext will write data into a file by using query parameters to authenticate
// requests.
//
// Deprecated: Moved to Storager.
QuerySignHTTPWriteWithContext(ctx context.Context, path string, size int64, expire time.Duration, pairs ...Pair) (req *http.Request, err error)
mustEmbedUnimplementedStorageHTTPSigner()
}
// UnimplementedStorageHTTPSigner must be embedded to have forward compatible implementations.
//
// StorageHTTPSigner is the interface for Storager related operations which support authentication.
//
// Deprecated: Moved to Storager.
type UnimplementedStorageHTTPSigner struct {
}
func (s UnimplementedStorageHTTPSigner) mustEmbedUnimplementedStorageHTTPSigner() {
}
func (s UnimplementedStorageHTTPSigner) String() string {
return "UnimplementedStorageHTTPSigner"
}
func (s UnimplementedStorageHTTPSigner) QuerySignHTTPDelete(path string, expire time.Duration, pairs ...Pair) (req *http.Request, err error) {
err = NewOperationNotImplementedError("query_sign_http_delete")
return
}
func (s UnimplementedStorageHTTPSigner) QuerySignHTTPDeleteWithContext(ctx context.Context, path string, expire time.Duration, pairs ...Pair) (req *http.Request, err error) {
err = NewOperationNotImplementedError("query_sign_http_delete")
return
}
func (s UnimplementedStorageHTTPSigner) QuerySignHTTPRead(path string, expire time.Duration, pairs ...Pair) (req *http.Request, err error) {
err = NewOperationNotImplementedError("query_sign_http_read")
return
}
func (s UnimplementedStorageHTTPSigner) QuerySignHTTPReadWithContext(ctx context.Context, path string, expire time.Duration, pairs ...Pair) (req *http.Request, err error) {
err = NewOperationNotImplementedError("query_sign_http_read")
return
}
func (s UnimplementedStorageHTTPSigner) QuerySignHTTPWrite(path string, size int64, expire time.Duration, pairs ...Pair) (req *http.Request, err error) {
err = NewOperationNotImplementedError("query_sign_http_write")
return
}
func (s UnimplementedStorageHTTPSigner) QuerySignHTTPWriteWithContext(ctx context.Context, path string, size int64, expire time.Duration, pairs ...Pair) (req *http.Request, err error) {
err = NewOperationNotImplementedError("query_sign_http_write")
return
}