-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
block.go
702 lines (631 loc) · 20.5 KB
/
block.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
// Auto-generated to Go types and interfaces using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: avdl/keybase1/block.avdl
package keybase1
import (
"fmt"
"github.com/keybase/go-framed-msgpack-rpc/rpc"
context "golang.org/x/net/context"
"time"
)
type BlockStatus int
const (
BlockStatus_UNKNOWN BlockStatus = 0
BlockStatus_LIVE BlockStatus = 1
BlockStatus_ARCHIVED BlockStatus = 2
)
func (o BlockStatus) DeepCopy() BlockStatus { return o }
var BlockStatusMap = map[string]BlockStatus{
"UNKNOWN": 0,
"LIVE": 1,
"ARCHIVED": 2,
}
var BlockStatusRevMap = map[BlockStatus]string{
0: "UNKNOWN",
1: "LIVE",
2: "ARCHIVED",
}
func (e BlockStatus) String() string {
if v, ok := BlockStatusRevMap[e]; ok {
return v
}
return fmt.Sprintf("%v", int(e))
}
type GetBlockRes struct {
BlockKey string `codec:"blockKey" json:"blockKey"`
Buf []byte `codec:"buf" json:"buf"`
Size int `codec:"size" json:"size"`
Status BlockStatus `codec:"status" json:"status"`
}
func (o GetBlockRes) DeepCopy() GetBlockRes {
return GetBlockRes{
BlockKey: o.BlockKey,
Buf: (func(x []byte) []byte {
if x == nil {
return nil
}
return append([]byte{}, x...)
})(o.Buf),
Size: o.Size,
Status: o.Status.DeepCopy(),
}
}
type GetBlockSizesRes struct {
Sizes []int `codec:"sizes" json:"sizes"`
Statuses []BlockStatus `codec:"statuses" json:"statuses"`
}
func (o GetBlockSizesRes) DeepCopy() GetBlockSizesRes {
return GetBlockSizesRes{
Sizes: (func(x []int) []int {
if x == nil {
return nil
}
ret := make([]int, len(x))
for i, v := range x {
vCopy := v
ret[i] = vCopy
}
return ret
})(o.Sizes),
Statuses: (func(x []BlockStatus) []BlockStatus {
if x == nil {
return nil
}
ret := make([]BlockStatus, len(x))
for i, v := range x {
vCopy := v.DeepCopy()
ret[i] = vCopy
}
return ret
})(o.Statuses),
}
}
type BlockRefNonce [8]byte
func (o BlockRefNonce) DeepCopy() BlockRefNonce {
var ret BlockRefNonce
copy(ret[:], o[:])
return ret
}
type BlockReference struct {
Bid BlockIdCombo `codec:"bid" json:"bid"`
Nonce BlockRefNonce `codec:"nonce" json:"nonce"`
ChargedTo UserOrTeamID `codec:"chargedTo" json:"chargedTo"`
}
func (o BlockReference) DeepCopy() BlockReference {
return BlockReference{
Bid: o.Bid.DeepCopy(),
Nonce: o.Nonce.DeepCopy(),
ChargedTo: o.ChargedTo.DeepCopy(),
}
}
type BlockReferenceCount struct {
Ref BlockReference `codec:"ref" json:"ref"`
LiveCount int `codec:"liveCount" json:"liveCount"`
}
func (o BlockReferenceCount) DeepCopy() BlockReferenceCount {
return BlockReferenceCount{
Ref: o.Ref.DeepCopy(),
LiveCount: o.LiveCount,
}
}
type DowngradeReferenceRes struct {
Completed []BlockReferenceCount `codec:"completed" json:"completed"`
Failed BlockReference `codec:"failed" json:"failed"`
}
func (o DowngradeReferenceRes) DeepCopy() DowngradeReferenceRes {
return DowngradeReferenceRes{
Completed: (func(x []BlockReferenceCount) []BlockReferenceCount {
if x == nil {
return nil
}
ret := make([]BlockReferenceCount, len(x))
for i, v := range x {
vCopy := v.DeepCopy()
ret[i] = vCopy
}
return ret
})(o.Completed),
Failed: o.Failed.DeepCopy(),
}
}
type BlockIdCount struct {
Id BlockIdCombo `codec:"id" json:"id"`
LiveCount int `codec:"liveCount" json:"liveCount"`
}
func (o BlockIdCount) DeepCopy() BlockIdCount {
return BlockIdCount{
Id: o.Id.DeepCopy(),
LiveCount: o.LiveCount,
}
}
type ReferenceCountRes struct {
Counts []BlockIdCount `codec:"counts" json:"counts"`
}
func (o ReferenceCountRes) DeepCopy() ReferenceCountRes {
return ReferenceCountRes{
Counts: (func(x []BlockIdCount) []BlockIdCount {
if x == nil {
return nil
}
ret := make([]BlockIdCount, len(x))
for i, v := range x {
vCopy := v.DeepCopy()
ret[i] = vCopy
}
return ret
})(o.Counts),
}
}
type BlockPingResponse struct {
}
func (o BlockPingResponse) DeepCopy() BlockPingResponse {
return BlockPingResponse{}
}
type UsageStatRecord struct {
Write int64 `codec:"write" json:"write"`
Archive int64 `codec:"archive" json:"archive"`
Read int64 `codec:"read" json:"read"`
MdWrite int64 `codec:"mdWrite" json:"mdWrite"`
GitWrite int64 `codec:"gitWrite" json:"gitWrite"`
GitArchive int64 `codec:"gitArchive" json:"gitArchive"`
}
func (o UsageStatRecord) DeepCopy() UsageStatRecord {
return UsageStatRecord{
Write: o.Write,
Archive: o.Archive,
Read: o.Read,
MdWrite: o.MdWrite,
GitWrite: o.GitWrite,
GitArchive: o.GitArchive,
}
}
type UsageStat struct {
Bytes UsageStatRecord `codec:"bytes" json:"bytes"`
Blocks UsageStatRecord `codec:"blocks" json:"blocks"`
Mtime Time `codec:"mtime" json:"mtime"`
}
func (o UsageStat) DeepCopy() UsageStat {
return UsageStat{
Bytes: o.Bytes.DeepCopy(),
Blocks: o.Blocks.DeepCopy(),
Mtime: o.Mtime.DeepCopy(),
}
}
type FolderUsageStat struct {
FolderID string `codec:"folderID" json:"folderID"`
Stats UsageStat `codec:"stats" json:"stats"`
}
func (o FolderUsageStat) DeepCopy() FolderUsageStat {
return FolderUsageStat{
FolderID: o.FolderID,
Stats: o.Stats.DeepCopy(),
}
}
type BlockQuotaInfo struct {
Folders []FolderUsageStat `codec:"folders" json:"folders"`
Total UsageStat `codec:"total" json:"total"`
Limit int64 `codec:"limit" json:"limit"`
GitLimit int64 `codec:"gitLimit" json:"gitLimit"`
}
func (o BlockQuotaInfo) DeepCopy() BlockQuotaInfo {
return BlockQuotaInfo{
Folders: (func(x []FolderUsageStat) []FolderUsageStat {
if x == nil {
return nil
}
ret := make([]FolderUsageStat, len(x))
for i, v := range x {
vCopy := v.DeepCopy()
ret[i] = vCopy
}
return ret
})(o.Folders),
Total: o.Total.DeepCopy(),
Limit: o.Limit,
GitLimit: o.GitLimit,
}
}
type GetSessionChallengeArg struct {
}
type AuthenticateSessionArg struct {
Signature string `codec:"signature" json:"signature"`
}
type PutBlockArg struct {
Bid BlockIdCombo `codec:"bid" json:"bid"`
Folder string `codec:"folder" json:"folder"`
BlockKey string `codec:"blockKey" json:"blockKey"`
Buf []byte `codec:"buf" json:"buf"`
}
type PutBlockAgainArg struct {
Folder string `codec:"folder" json:"folder"`
Ref BlockReference `codec:"ref" json:"ref"`
BlockKey string `codec:"blockKey" json:"blockKey"`
Buf []byte `codec:"buf" json:"buf"`
}
type GetBlockArg struct {
Bid BlockIdCombo `codec:"bid" json:"bid"`
Folder string `codec:"folder" json:"folder"`
SizeOnly bool `codec:"sizeOnly" json:"sizeOnly"`
}
type GetBlockSizesArg struct {
Bids []BlockIdCombo `codec:"bids" json:"bids"`
Folder string `codec:"folder" json:"folder"`
}
type AddReferenceArg struct {
Folder string `codec:"folder" json:"folder"`
Ref BlockReference `codec:"ref" json:"ref"`
}
type DelReferenceArg struct {
Folder string `codec:"folder" json:"folder"`
Ref BlockReference `codec:"ref" json:"ref"`
}
type ArchiveReferenceArg struct {
Folder string `codec:"folder" json:"folder"`
Refs []BlockReference `codec:"refs" json:"refs"`
}
type DelReferenceWithCountArg struct {
Folder string `codec:"folder" json:"folder"`
Refs []BlockReference `codec:"refs" json:"refs"`
}
type ArchiveReferenceWithCountArg struct {
Folder string `codec:"folder" json:"folder"`
Refs []BlockReference `codec:"refs" json:"refs"`
}
type GetReferenceCountArg struct {
Folder string `codec:"folder" json:"folder"`
Ids []BlockIdCombo `codec:"ids" json:"ids"`
Status BlockStatus `codec:"status" json:"status"`
}
type GetUserQuotaInfoArg struct {
}
type GetTeamQuotaInfoArg struct {
Tid TeamID `codec:"tid" json:"tid"`
}
type GetUserQuotaInfo2Arg struct {
IncludeFolders bool `codec:"includeFolders" json:"includeFolders"`
}
type GetTeamQuotaInfo2Arg struct {
Tid TeamID `codec:"tid" json:"tid"`
IncludeFolders bool `codec:"includeFolders" json:"includeFolders"`
}
type BlockPingArg struct {
}
type BlockInterface interface {
GetSessionChallenge(context.Context) (ChallengeInfo, error)
AuthenticateSession(context.Context, string) error
PutBlock(context.Context, PutBlockArg) error
PutBlockAgain(context.Context, PutBlockAgainArg) error
GetBlock(context.Context, GetBlockArg) (GetBlockRes, error)
GetBlockSizes(context.Context, GetBlockSizesArg) (GetBlockSizesRes, error)
AddReference(context.Context, AddReferenceArg) error
DelReference(context.Context, DelReferenceArg) error
ArchiveReference(context.Context, ArchiveReferenceArg) ([]BlockReference, error)
DelReferenceWithCount(context.Context, DelReferenceWithCountArg) (DowngradeReferenceRes, error)
ArchiveReferenceWithCount(context.Context, ArchiveReferenceWithCountArg) (DowngradeReferenceRes, error)
GetReferenceCount(context.Context, GetReferenceCountArg) (ReferenceCountRes, error)
GetUserQuotaInfo(context.Context) ([]byte, error)
GetTeamQuotaInfo(context.Context, TeamID) ([]byte, error)
GetUserQuotaInfo2(context.Context, bool) (BlockQuotaInfo, error)
GetTeamQuotaInfo2(context.Context, GetTeamQuotaInfo2Arg) (BlockQuotaInfo, error)
BlockPing(context.Context) (BlockPingResponse, error)
}
func BlockProtocol(i BlockInterface) rpc.Protocol {
return rpc.Protocol{
Name: "keybase.1.block",
Methods: map[string]rpc.ServeHandlerDescription{
"getSessionChallenge": {
MakeArg: func() interface{} {
var ret [1]GetSessionChallengeArg
return &ret
},
Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
ret, err = i.GetSessionChallenge(ctx)
return
},
},
"authenticateSession": {
MakeArg: func() interface{} {
var ret [1]AuthenticateSessionArg
return &ret
},
Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
typedArgs, ok := args.(*[1]AuthenticateSessionArg)
if !ok {
err = rpc.NewTypeError((*[1]AuthenticateSessionArg)(nil), args)
return
}
err = i.AuthenticateSession(ctx, typedArgs[0].Signature)
return
},
},
"putBlock": {
MakeArg: func() interface{} {
var ret [1]PutBlockArg
return &ret
},
Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
typedArgs, ok := args.(*[1]PutBlockArg)
if !ok {
err = rpc.NewTypeError((*[1]PutBlockArg)(nil), args)
return
}
err = i.PutBlock(ctx, typedArgs[0])
return
},
},
"putBlockAgain": {
MakeArg: func() interface{} {
var ret [1]PutBlockAgainArg
return &ret
},
Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
typedArgs, ok := args.(*[1]PutBlockAgainArg)
if !ok {
err = rpc.NewTypeError((*[1]PutBlockAgainArg)(nil), args)
return
}
err = i.PutBlockAgain(ctx, typedArgs[0])
return
},
},
"getBlock": {
MakeArg: func() interface{} {
var ret [1]GetBlockArg
return &ret
},
Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
typedArgs, ok := args.(*[1]GetBlockArg)
if !ok {
err = rpc.NewTypeError((*[1]GetBlockArg)(nil), args)
return
}
ret, err = i.GetBlock(ctx, typedArgs[0])
return
},
},
"getBlockSizes": {
MakeArg: func() interface{} {
var ret [1]GetBlockSizesArg
return &ret
},
Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
typedArgs, ok := args.(*[1]GetBlockSizesArg)
if !ok {
err = rpc.NewTypeError((*[1]GetBlockSizesArg)(nil), args)
return
}
ret, err = i.GetBlockSizes(ctx, typedArgs[0])
return
},
},
"addReference": {
MakeArg: func() interface{} {
var ret [1]AddReferenceArg
return &ret
},
Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
typedArgs, ok := args.(*[1]AddReferenceArg)
if !ok {
err = rpc.NewTypeError((*[1]AddReferenceArg)(nil), args)
return
}
err = i.AddReference(ctx, typedArgs[0])
return
},
},
"delReference": {
MakeArg: func() interface{} {
var ret [1]DelReferenceArg
return &ret
},
Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
typedArgs, ok := args.(*[1]DelReferenceArg)
if !ok {
err = rpc.NewTypeError((*[1]DelReferenceArg)(nil), args)
return
}
err = i.DelReference(ctx, typedArgs[0])
return
},
},
"archiveReference": {
MakeArg: func() interface{} {
var ret [1]ArchiveReferenceArg
return &ret
},
Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
typedArgs, ok := args.(*[1]ArchiveReferenceArg)
if !ok {
err = rpc.NewTypeError((*[1]ArchiveReferenceArg)(nil), args)
return
}
ret, err = i.ArchiveReference(ctx, typedArgs[0])
return
},
},
"delReferenceWithCount": {
MakeArg: func() interface{} {
var ret [1]DelReferenceWithCountArg
return &ret
},
Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
typedArgs, ok := args.(*[1]DelReferenceWithCountArg)
if !ok {
err = rpc.NewTypeError((*[1]DelReferenceWithCountArg)(nil), args)
return
}
ret, err = i.DelReferenceWithCount(ctx, typedArgs[0])
return
},
},
"archiveReferenceWithCount": {
MakeArg: func() interface{} {
var ret [1]ArchiveReferenceWithCountArg
return &ret
},
Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
typedArgs, ok := args.(*[1]ArchiveReferenceWithCountArg)
if !ok {
err = rpc.NewTypeError((*[1]ArchiveReferenceWithCountArg)(nil), args)
return
}
ret, err = i.ArchiveReferenceWithCount(ctx, typedArgs[0])
return
},
},
"getReferenceCount": {
MakeArg: func() interface{} {
var ret [1]GetReferenceCountArg
return &ret
},
Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
typedArgs, ok := args.(*[1]GetReferenceCountArg)
if !ok {
err = rpc.NewTypeError((*[1]GetReferenceCountArg)(nil), args)
return
}
ret, err = i.GetReferenceCount(ctx, typedArgs[0])
return
},
},
"getUserQuotaInfo": {
MakeArg: func() interface{} {
var ret [1]GetUserQuotaInfoArg
return &ret
},
Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
ret, err = i.GetUserQuotaInfo(ctx)
return
},
},
"getTeamQuotaInfo": {
MakeArg: func() interface{} {
var ret [1]GetTeamQuotaInfoArg
return &ret
},
Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
typedArgs, ok := args.(*[1]GetTeamQuotaInfoArg)
if !ok {
err = rpc.NewTypeError((*[1]GetTeamQuotaInfoArg)(nil), args)
return
}
ret, err = i.GetTeamQuotaInfo(ctx, typedArgs[0].Tid)
return
},
},
"getUserQuotaInfo2": {
MakeArg: func() interface{} {
var ret [1]GetUserQuotaInfo2Arg
return &ret
},
Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
typedArgs, ok := args.(*[1]GetUserQuotaInfo2Arg)
if !ok {
err = rpc.NewTypeError((*[1]GetUserQuotaInfo2Arg)(nil), args)
return
}
ret, err = i.GetUserQuotaInfo2(ctx, typedArgs[0].IncludeFolders)
return
},
},
"getTeamQuotaInfo2": {
MakeArg: func() interface{} {
var ret [1]GetTeamQuotaInfo2Arg
return &ret
},
Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
typedArgs, ok := args.(*[1]GetTeamQuotaInfo2Arg)
if !ok {
err = rpc.NewTypeError((*[1]GetTeamQuotaInfo2Arg)(nil), args)
return
}
ret, err = i.GetTeamQuotaInfo2(ctx, typedArgs[0])
return
},
},
"blockPing": {
MakeArg: func() interface{} {
var ret [1]BlockPingArg
return &ret
},
Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
ret, err = i.BlockPing(ctx)
return
},
},
},
}
}
type BlockClient struct {
Cli rpc.GenericClient
}
func (c BlockClient) GetSessionChallenge(ctx context.Context) (res ChallengeInfo, err error) {
err = c.Cli.CallCompressed(ctx, "keybase.1.block.getSessionChallenge", []interface{}{GetSessionChallengeArg{}}, &res, rpc.CompressionGzip, 0*time.Millisecond)
return
}
func (c BlockClient) AuthenticateSession(ctx context.Context, signature string) (err error) {
__arg := AuthenticateSessionArg{Signature: signature}
err = c.Cli.CallCompressed(ctx, "keybase.1.block.authenticateSession", []interface{}{__arg}, nil, rpc.CompressionGzip, 0*time.Millisecond)
return
}
func (c BlockClient) PutBlock(ctx context.Context, __arg PutBlockArg) (err error) {
err = c.Cli.Call(ctx, "keybase.1.block.putBlock", []interface{}{__arg}, nil, 0*time.Millisecond)
return
}
func (c BlockClient) PutBlockAgain(ctx context.Context, __arg PutBlockAgainArg) (err error) {
err = c.Cli.Call(ctx, "keybase.1.block.putBlockAgain", []interface{}{__arg}, nil, 0*time.Millisecond)
return
}
func (c BlockClient) GetBlock(ctx context.Context, __arg GetBlockArg) (res GetBlockRes, err error) {
err = c.Cli.Call(ctx, "keybase.1.block.getBlock", []interface{}{__arg}, &res, 0*time.Millisecond)
return
}
func (c BlockClient) GetBlockSizes(ctx context.Context, __arg GetBlockSizesArg) (res GetBlockSizesRes, err error) {
err = c.Cli.CallCompressed(ctx, "keybase.1.block.getBlockSizes", []interface{}{__arg}, &res, rpc.CompressionGzip, 0*time.Millisecond)
return
}
func (c BlockClient) AddReference(ctx context.Context, __arg AddReferenceArg) (err error) {
err = c.Cli.CallCompressed(ctx, "keybase.1.block.addReference", []interface{}{__arg}, nil, rpc.CompressionGzip, 0*time.Millisecond)
return
}
func (c BlockClient) DelReference(ctx context.Context, __arg DelReferenceArg) (err error) {
err = c.Cli.CallCompressed(ctx, "keybase.1.block.delReference", []interface{}{__arg}, nil, rpc.CompressionGzip, 0*time.Millisecond)
return
}
func (c BlockClient) ArchiveReference(ctx context.Context, __arg ArchiveReferenceArg) (res []BlockReference, err error) {
err = c.Cli.CallCompressed(ctx, "keybase.1.block.archiveReference", []interface{}{__arg}, &res, rpc.CompressionGzip, 0*time.Millisecond)
return
}
func (c BlockClient) DelReferenceWithCount(ctx context.Context, __arg DelReferenceWithCountArg) (res DowngradeReferenceRes, err error) {
err = c.Cli.CallCompressed(ctx, "keybase.1.block.delReferenceWithCount", []interface{}{__arg}, &res, rpc.CompressionGzip, 0*time.Millisecond)
return
}
func (c BlockClient) ArchiveReferenceWithCount(ctx context.Context, __arg ArchiveReferenceWithCountArg) (res DowngradeReferenceRes, err error) {
err = c.Cli.CallCompressed(ctx, "keybase.1.block.archiveReferenceWithCount", []interface{}{__arg}, &res, rpc.CompressionGzip, 0*time.Millisecond)
return
}
func (c BlockClient) GetReferenceCount(ctx context.Context, __arg GetReferenceCountArg) (res ReferenceCountRes, err error) {
err = c.Cli.CallCompressed(ctx, "keybase.1.block.getReferenceCount", []interface{}{__arg}, &res, rpc.CompressionGzip, 0*time.Millisecond)
return
}
func (c BlockClient) GetUserQuotaInfo(ctx context.Context) (res []byte, err error) {
err = c.Cli.CallCompressed(ctx, "keybase.1.block.getUserQuotaInfo", []interface{}{GetUserQuotaInfoArg{}}, &res, rpc.CompressionGzip, 0*time.Millisecond)
return
}
func (c BlockClient) GetTeamQuotaInfo(ctx context.Context, tid TeamID) (res []byte, err error) {
__arg := GetTeamQuotaInfoArg{Tid: tid}
err = c.Cli.CallCompressed(ctx, "keybase.1.block.getTeamQuotaInfo", []interface{}{__arg}, &res, rpc.CompressionGzip, 0*time.Millisecond)
return
}
func (c BlockClient) GetUserQuotaInfo2(ctx context.Context, includeFolders bool) (res BlockQuotaInfo, err error) {
__arg := GetUserQuotaInfo2Arg{IncludeFolders: includeFolders}
err = c.Cli.CallCompressed(ctx, "keybase.1.block.getUserQuotaInfo2", []interface{}{__arg}, &res, rpc.CompressionGzip, 0*time.Millisecond)
return
}
func (c BlockClient) GetTeamQuotaInfo2(ctx context.Context, __arg GetTeamQuotaInfo2Arg) (res BlockQuotaInfo, err error) {
err = c.Cli.CallCompressed(ctx, "keybase.1.block.getTeamQuotaInfo2", []interface{}{__arg}, &res, rpc.CompressionGzip, 0*time.Millisecond)
return
}
func (c BlockClient) BlockPing(ctx context.Context) (res BlockPingResponse, err error) {
err = c.Cli.CallCompressed(ctx, "keybase.1.block.blockPing", []interface{}{BlockPingArg{}}, &res, rpc.CompressionGzip, 0*time.Millisecond)
return
}