github.com/keybase/client/go@v0.0.0-20241007131713-f10651d043c8/protocol/keybase1/block.go (about) 1 // Auto-generated to Go types and interfaces using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler) 2 // Input file: avdl/keybase1/block.avdl 3 4 package keybase1 5 6 import ( 7 "fmt" 8 "github.com/keybase/go-framed-msgpack-rpc/rpc" 9 context "golang.org/x/net/context" 10 "time" 11 ) 12 13 type BlockStatus int 14 15 const ( 16 BlockStatus_UNKNOWN BlockStatus = 0 17 BlockStatus_LIVE BlockStatus = 1 18 BlockStatus_ARCHIVED BlockStatus = 2 19 ) 20 21 func (o BlockStatus) DeepCopy() BlockStatus { return o } 22 23 var BlockStatusMap = map[string]BlockStatus{ 24 "UNKNOWN": 0, 25 "LIVE": 1, 26 "ARCHIVED": 2, 27 } 28 29 var BlockStatusRevMap = map[BlockStatus]string{ 30 0: "UNKNOWN", 31 1: "LIVE", 32 2: "ARCHIVED", 33 } 34 35 func (e BlockStatus) String() string { 36 if v, ok := BlockStatusRevMap[e]; ok { 37 return v 38 } 39 return fmt.Sprintf("%v", int(e)) 40 } 41 42 type GetBlockRes struct { 43 BlockKey string `codec:"blockKey" json:"blockKey"` 44 Buf []byte `codec:"buf" json:"buf"` 45 Size int `codec:"size" json:"size"` 46 Status BlockStatus `codec:"status" json:"status"` 47 } 48 49 func (o GetBlockRes) DeepCopy() GetBlockRes { 50 return GetBlockRes{ 51 BlockKey: o.BlockKey, 52 Buf: (func(x []byte) []byte { 53 if x == nil { 54 return nil 55 } 56 return append([]byte{}, x...) 57 })(o.Buf), 58 Size: o.Size, 59 Status: o.Status.DeepCopy(), 60 } 61 } 62 63 type GetBlockSizesRes struct { 64 Sizes []int `codec:"sizes" json:"sizes"` 65 Statuses []BlockStatus `codec:"statuses" json:"statuses"` 66 } 67 68 func (o GetBlockSizesRes) DeepCopy() GetBlockSizesRes { 69 return GetBlockSizesRes{ 70 Sizes: (func(x []int) []int { 71 if x == nil { 72 return nil 73 } 74 ret := make([]int, len(x)) 75 for i, v := range x { 76 vCopy := v 77 ret[i] = vCopy 78 } 79 return ret 80 })(o.Sizes), 81 Statuses: (func(x []BlockStatus) []BlockStatus { 82 if x == nil { 83 return nil 84 } 85 ret := make([]BlockStatus, len(x)) 86 for i, v := range x { 87 vCopy := v.DeepCopy() 88 ret[i] = vCopy 89 } 90 return ret 91 })(o.Statuses), 92 } 93 } 94 95 type BlockRefNonce [8]byte 96 97 func (o BlockRefNonce) DeepCopy() BlockRefNonce { 98 var ret BlockRefNonce 99 copy(ret[:], o[:]) 100 return ret 101 } 102 103 type BlockReference struct { 104 Bid BlockIdCombo `codec:"bid" json:"bid"` 105 Nonce BlockRefNonce `codec:"nonce" json:"nonce"` 106 ChargedTo UserOrTeamID `codec:"chargedTo" json:"chargedTo"` 107 } 108 109 func (o BlockReference) DeepCopy() BlockReference { 110 return BlockReference{ 111 Bid: o.Bid.DeepCopy(), 112 Nonce: o.Nonce.DeepCopy(), 113 ChargedTo: o.ChargedTo.DeepCopy(), 114 } 115 } 116 117 type BlockReferenceCount struct { 118 Ref BlockReference `codec:"ref" json:"ref"` 119 LiveCount int `codec:"liveCount" json:"liveCount"` 120 } 121 122 func (o BlockReferenceCount) DeepCopy() BlockReferenceCount { 123 return BlockReferenceCount{ 124 Ref: o.Ref.DeepCopy(), 125 LiveCount: o.LiveCount, 126 } 127 } 128 129 type DowngradeReferenceRes struct { 130 Completed []BlockReferenceCount `codec:"completed" json:"completed"` 131 Failed BlockReference `codec:"failed" json:"failed"` 132 } 133 134 func (o DowngradeReferenceRes) DeepCopy() DowngradeReferenceRes { 135 return DowngradeReferenceRes{ 136 Completed: (func(x []BlockReferenceCount) []BlockReferenceCount { 137 if x == nil { 138 return nil 139 } 140 ret := make([]BlockReferenceCount, len(x)) 141 for i, v := range x { 142 vCopy := v.DeepCopy() 143 ret[i] = vCopy 144 } 145 return ret 146 })(o.Completed), 147 Failed: o.Failed.DeepCopy(), 148 } 149 } 150 151 type BlockIdCount struct { 152 Id BlockIdCombo `codec:"id" json:"id"` 153 LiveCount int `codec:"liveCount" json:"liveCount"` 154 } 155 156 func (o BlockIdCount) DeepCopy() BlockIdCount { 157 return BlockIdCount{ 158 Id: o.Id.DeepCopy(), 159 LiveCount: o.LiveCount, 160 } 161 } 162 163 type ReferenceCountRes struct { 164 Counts []BlockIdCount `codec:"counts" json:"counts"` 165 } 166 167 func (o ReferenceCountRes) DeepCopy() ReferenceCountRes { 168 return ReferenceCountRes{ 169 Counts: (func(x []BlockIdCount) []BlockIdCount { 170 if x == nil { 171 return nil 172 } 173 ret := make([]BlockIdCount, len(x)) 174 for i, v := range x { 175 vCopy := v.DeepCopy() 176 ret[i] = vCopy 177 } 178 return ret 179 })(o.Counts), 180 } 181 } 182 183 type BlockPingResponse struct { 184 } 185 186 func (o BlockPingResponse) DeepCopy() BlockPingResponse { 187 return BlockPingResponse{} 188 } 189 190 type UsageStatRecord struct { 191 Write int64 `codec:"write" json:"write"` 192 Archive int64 `codec:"archive" json:"archive"` 193 Read int64 `codec:"read" json:"read"` 194 MdWrite int64 `codec:"mdWrite" json:"mdWrite"` 195 GitWrite int64 `codec:"gitWrite" json:"gitWrite"` 196 GitArchive int64 `codec:"gitArchive" json:"gitArchive"` 197 } 198 199 func (o UsageStatRecord) DeepCopy() UsageStatRecord { 200 return UsageStatRecord{ 201 Write: o.Write, 202 Archive: o.Archive, 203 Read: o.Read, 204 MdWrite: o.MdWrite, 205 GitWrite: o.GitWrite, 206 GitArchive: o.GitArchive, 207 } 208 } 209 210 type UsageStat struct { 211 Bytes UsageStatRecord `codec:"bytes" json:"bytes"` 212 Blocks UsageStatRecord `codec:"blocks" json:"blocks"` 213 Mtime Time `codec:"mtime" json:"mtime"` 214 } 215 216 func (o UsageStat) DeepCopy() UsageStat { 217 return UsageStat{ 218 Bytes: o.Bytes.DeepCopy(), 219 Blocks: o.Blocks.DeepCopy(), 220 Mtime: o.Mtime.DeepCopy(), 221 } 222 } 223 224 type FolderUsageStat struct { 225 FolderID string `codec:"folderID" json:"folderID"` 226 Stats UsageStat `codec:"stats" json:"stats"` 227 } 228 229 func (o FolderUsageStat) DeepCopy() FolderUsageStat { 230 return FolderUsageStat{ 231 FolderID: o.FolderID, 232 Stats: o.Stats.DeepCopy(), 233 } 234 } 235 236 type BlockQuotaInfo struct { 237 Folders []FolderUsageStat `codec:"folders" json:"folders"` 238 Total UsageStat `codec:"total" json:"total"` 239 Limit int64 `codec:"limit" json:"limit"` 240 GitLimit int64 `codec:"gitLimit" json:"gitLimit"` 241 } 242 243 func (o BlockQuotaInfo) DeepCopy() BlockQuotaInfo { 244 return BlockQuotaInfo{ 245 Folders: (func(x []FolderUsageStat) []FolderUsageStat { 246 if x == nil { 247 return nil 248 } 249 ret := make([]FolderUsageStat, len(x)) 250 for i, v := range x { 251 vCopy := v.DeepCopy() 252 ret[i] = vCopy 253 } 254 return ret 255 })(o.Folders), 256 Total: o.Total.DeepCopy(), 257 Limit: o.Limit, 258 GitLimit: o.GitLimit, 259 } 260 } 261 262 type GetSessionChallengeArg struct { 263 } 264 265 type AuthenticateSessionArg struct { 266 Signature string `codec:"signature" json:"signature"` 267 } 268 269 type PutBlockArg struct { 270 Bid BlockIdCombo `codec:"bid" json:"bid"` 271 Folder string `codec:"folder" json:"folder"` 272 BlockKey string `codec:"blockKey" json:"blockKey"` 273 Buf []byte `codec:"buf" json:"buf"` 274 } 275 276 type PutBlockAgainArg struct { 277 Folder string `codec:"folder" json:"folder"` 278 Ref BlockReference `codec:"ref" json:"ref"` 279 BlockKey string `codec:"blockKey" json:"blockKey"` 280 Buf []byte `codec:"buf" json:"buf"` 281 } 282 283 type GetBlockArg struct { 284 Bid BlockIdCombo `codec:"bid" json:"bid"` 285 Folder string `codec:"folder" json:"folder"` 286 SizeOnly bool `codec:"sizeOnly" json:"sizeOnly"` 287 } 288 289 type GetBlockSizesArg struct { 290 Bids []BlockIdCombo `codec:"bids" json:"bids"` 291 Folder string `codec:"folder" json:"folder"` 292 } 293 294 type AddReferenceArg struct { 295 Folder string `codec:"folder" json:"folder"` 296 Ref BlockReference `codec:"ref" json:"ref"` 297 } 298 299 type DelReferenceArg struct { 300 Folder string `codec:"folder" json:"folder"` 301 Ref BlockReference `codec:"ref" json:"ref"` 302 } 303 304 type ArchiveReferenceArg struct { 305 Folder string `codec:"folder" json:"folder"` 306 Refs []BlockReference `codec:"refs" json:"refs"` 307 } 308 309 type DelReferenceWithCountArg struct { 310 Folder string `codec:"folder" json:"folder"` 311 Refs []BlockReference `codec:"refs" json:"refs"` 312 } 313 314 type ArchiveReferenceWithCountArg struct { 315 Folder string `codec:"folder" json:"folder"` 316 Refs []BlockReference `codec:"refs" json:"refs"` 317 } 318 319 type GetReferenceCountArg struct { 320 Folder string `codec:"folder" json:"folder"` 321 Ids []BlockIdCombo `codec:"ids" json:"ids"` 322 Status BlockStatus `codec:"status" json:"status"` 323 } 324 325 type GetUserQuotaInfoArg struct { 326 } 327 328 type GetTeamQuotaInfoArg struct { 329 Tid TeamID `codec:"tid" json:"tid"` 330 } 331 332 type GetUserQuotaInfo2Arg struct { 333 IncludeFolders bool `codec:"includeFolders" json:"includeFolders"` 334 } 335 336 type GetTeamQuotaInfo2Arg struct { 337 Tid TeamID `codec:"tid" json:"tid"` 338 IncludeFolders bool `codec:"includeFolders" json:"includeFolders"` 339 } 340 341 type BlockPingArg struct { 342 } 343 344 type BlockInterface interface { 345 GetSessionChallenge(context.Context) (ChallengeInfo, error) 346 AuthenticateSession(context.Context, string) error 347 PutBlock(context.Context, PutBlockArg) error 348 PutBlockAgain(context.Context, PutBlockAgainArg) error 349 GetBlock(context.Context, GetBlockArg) (GetBlockRes, error) 350 GetBlockSizes(context.Context, GetBlockSizesArg) (GetBlockSizesRes, error) 351 AddReference(context.Context, AddReferenceArg) error 352 DelReference(context.Context, DelReferenceArg) error 353 ArchiveReference(context.Context, ArchiveReferenceArg) ([]BlockReference, error) 354 DelReferenceWithCount(context.Context, DelReferenceWithCountArg) (DowngradeReferenceRes, error) 355 ArchiveReferenceWithCount(context.Context, ArchiveReferenceWithCountArg) (DowngradeReferenceRes, error) 356 GetReferenceCount(context.Context, GetReferenceCountArg) (ReferenceCountRes, error) 357 GetUserQuotaInfo(context.Context) ([]byte, error) 358 GetTeamQuotaInfo(context.Context, TeamID) ([]byte, error) 359 GetUserQuotaInfo2(context.Context, bool) (BlockQuotaInfo, error) 360 GetTeamQuotaInfo2(context.Context, GetTeamQuotaInfo2Arg) (BlockQuotaInfo, error) 361 BlockPing(context.Context) (BlockPingResponse, error) 362 } 363 364 func BlockProtocol(i BlockInterface) rpc.Protocol { 365 return rpc.Protocol{ 366 Name: "keybase.1.block", 367 Methods: map[string]rpc.ServeHandlerDescription{ 368 "getSessionChallenge": { 369 MakeArg: func() interface{} { 370 var ret [1]GetSessionChallengeArg 371 return &ret 372 }, 373 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 374 ret, err = i.GetSessionChallenge(ctx) 375 return 376 }, 377 }, 378 "authenticateSession": { 379 MakeArg: func() interface{} { 380 var ret [1]AuthenticateSessionArg 381 return &ret 382 }, 383 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 384 typedArgs, ok := args.(*[1]AuthenticateSessionArg) 385 if !ok { 386 err = rpc.NewTypeError((*[1]AuthenticateSessionArg)(nil), args) 387 return 388 } 389 err = i.AuthenticateSession(ctx, typedArgs[0].Signature) 390 return 391 }, 392 }, 393 "putBlock": { 394 MakeArg: func() interface{} { 395 var ret [1]PutBlockArg 396 return &ret 397 }, 398 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 399 typedArgs, ok := args.(*[1]PutBlockArg) 400 if !ok { 401 err = rpc.NewTypeError((*[1]PutBlockArg)(nil), args) 402 return 403 } 404 err = i.PutBlock(ctx, typedArgs[0]) 405 return 406 }, 407 }, 408 "putBlockAgain": { 409 MakeArg: func() interface{} { 410 var ret [1]PutBlockAgainArg 411 return &ret 412 }, 413 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 414 typedArgs, ok := args.(*[1]PutBlockAgainArg) 415 if !ok { 416 err = rpc.NewTypeError((*[1]PutBlockAgainArg)(nil), args) 417 return 418 } 419 err = i.PutBlockAgain(ctx, typedArgs[0]) 420 return 421 }, 422 }, 423 "getBlock": { 424 MakeArg: func() interface{} { 425 var ret [1]GetBlockArg 426 return &ret 427 }, 428 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 429 typedArgs, ok := args.(*[1]GetBlockArg) 430 if !ok { 431 err = rpc.NewTypeError((*[1]GetBlockArg)(nil), args) 432 return 433 } 434 ret, err = i.GetBlock(ctx, typedArgs[0]) 435 return 436 }, 437 }, 438 "getBlockSizes": { 439 MakeArg: func() interface{} { 440 var ret [1]GetBlockSizesArg 441 return &ret 442 }, 443 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 444 typedArgs, ok := args.(*[1]GetBlockSizesArg) 445 if !ok { 446 err = rpc.NewTypeError((*[1]GetBlockSizesArg)(nil), args) 447 return 448 } 449 ret, err = i.GetBlockSizes(ctx, typedArgs[0]) 450 return 451 }, 452 }, 453 "addReference": { 454 MakeArg: func() interface{} { 455 var ret [1]AddReferenceArg 456 return &ret 457 }, 458 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 459 typedArgs, ok := args.(*[1]AddReferenceArg) 460 if !ok { 461 err = rpc.NewTypeError((*[1]AddReferenceArg)(nil), args) 462 return 463 } 464 err = i.AddReference(ctx, typedArgs[0]) 465 return 466 }, 467 }, 468 "delReference": { 469 MakeArg: func() interface{} { 470 var ret [1]DelReferenceArg 471 return &ret 472 }, 473 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 474 typedArgs, ok := args.(*[1]DelReferenceArg) 475 if !ok { 476 err = rpc.NewTypeError((*[1]DelReferenceArg)(nil), args) 477 return 478 } 479 err = i.DelReference(ctx, typedArgs[0]) 480 return 481 }, 482 }, 483 "archiveReference": { 484 MakeArg: func() interface{} { 485 var ret [1]ArchiveReferenceArg 486 return &ret 487 }, 488 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 489 typedArgs, ok := args.(*[1]ArchiveReferenceArg) 490 if !ok { 491 err = rpc.NewTypeError((*[1]ArchiveReferenceArg)(nil), args) 492 return 493 } 494 ret, err = i.ArchiveReference(ctx, typedArgs[0]) 495 return 496 }, 497 }, 498 "delReferenceWithCount": { 499 MakeArg: func() interface{} { 500 var ret [1]DelReferenceWithCountArg 501 return &ret 502 }, 503 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 504 typedArgs, ok := args.(*[1]DelReferenceWithCountArg) 505 if !ok { 506 err = rpc.NewTypeError((*[1]DelReferenceWithCountArg)(nil), args) 507 return 508 } 509 ret, err = i.DelReferenceWithCount(ctx, typedArgs[0]) 510 return 511 }, 512 }, 513 "archiveReferenceWithCount": { 514 MakeArg: func() interface{} { 515 var ret [1]ArchiveReferenceWithCountArg 516 return &ret 517 }, 518 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 519 typedArgs, ok := args.(*[1]ArchiveReferenceWithCountArg) 520 if !ok { 521 err = rpc.NewTypeError((*[1]ArchiveReferenceWithCountArg)(nil), args) 522 return 523 } 524 ret, err = i.ArchiveReferenceWithCount(ctx, typedArgs[0]) 525 return 526 }, 527 }, 528 "getReferenceCount": { 529 MakeArg: func() interface{} { 530 var ret [1]GetReferenceCountArg 531 return &ret 532 }, 533 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 534 typedArgs, ok := args.(*[1]GetReferenceCountArg) 535 if !ok { 536 err = rpc.NewTypeError((*[1]GetReferenceCountArg)(nil), args) 537 return 538 } 539 ret, err = i.GetReferenceCount(ctx, typedArgs[0]) 540 return 541 }, 542 }, 543 "getUserQuotaInfo": { 544 MakeArg: func() interface{} { 545 var ret [1]GetUserQuotaInfoArg 546 return &ret 547 }, 548 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 549 ret, err = i.GetUserQuotaInfo(ctx) 550 return 551 }, 552 }, 553 "getTeamQuotaInfo": { 554 MakeArg: func() interface{} { 555 var ret [1]GetTeamQuotaInfoArg 556 return &ret 557 }, 558 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 559 typedArgs, ok := args.(*[1]GetTeamQuotaInfoArg) 560 if !ok { 561 err = rpc.NewTypeError((*[1]GetTeamQuotaInfoArg)(nil), args) 562 return 563 } 564 ret, err = i.GetTeamQuotaInfo(ctx, typedArgs[0].Tid) 565 return 566 }, 567 }, 568 "getUserQuotaInfo2": { 569 MakeArg: func() interface{} { 570 var ret [1]GetUserQuotaInfo2Arg 571 return &ret 572 }, 573 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 574 typedArgs, ok := args.(*[1]GetUserQuotaInfo2Arg) 575 if !ok { 576 err = rpc.NewTypeError((*[1]GetUserQuotaInfo2Arg)(nil), args) 577 return 578 } 579 ret, err = i.GetUserQuotaInfo2(ctx, typedArgs[0].IncludeFolders) 580 return 581 }, 582 }, 583 "getTeamQuotaInfo2": { 584 MakeArg: func() interface{} { 585 var ret [1]GetTeamQuotaInfo2Arg 586 return &ret 587 }, 588 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 589 typedArgs, ok := args.(*[1]GetTeamQuotaInfo2Arg) 590 if !ok { 591 err = rpc.NewTypeError((*[1]GetTeamQuotaInfo2Arg)(nil), args) 592 return 593 } 594 ret, err = i.GetTeamQuotaInfo2(ctx, typedArgs[0]) 595 return 596 }, 597 }, 598 "blockPing": { 599 MakeArg: func() interface{} { 600 var ret [1]BlockPingArg 601 return &ret 602 }, 603 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 604 ret, err = i.BlockPing(ctx) 605 return 606 }, 607 }, 608 }, 609 } 610 } 611 612 type BlockClient struct { 613 Cli rpc.GenericClient 614 } 615 616 func (c BlockClient) GetSessionChallenge(ctx context.Context) (res ChallengeInfo, err error) { 617 err = c.Cli.CallCompressed(ctx, "keybase.1.block.getSessionChallenge", []interface{}{GetSessionChallengeArg{}}, &res, rpc.CompressionGzip, 0*time.Millisecond) 618 return 619 } 620 621 func (c BlockClient) AuthenticateSession(ctx context.Context, signature string) (err error) { 622 __arg := AuthenticateSessionArg{Signature: signature} 623 err = c.Cli.CallCompressed(ctx, "keybase.1.block.authenticateSession", []interface{}{__arg}, nil, rpc.CompressionGzip, 0*time.Millisecond) 624 return 625 } 626 627 func (c BlockClient) PutBlock(ctx context.Context, __arg PutBlockArg) (err error) { 628 err = c.Cli.Call(ctx, "keybase.1.block.putBlock", []interface{}{__arg}, nil, 0*time.Millisecond) 629 return 630 } 631 632 func (c BlockClient) PutBlockAgain(ctx context.Context, __arg PutBlockAgainArg) (err error) { 633 err = c.Cli.Call(ctx, "keybase.1.block.putBlockAgain", []interface{}{__arg}, nil, 0*time.Millisecond) 634 return 635 } 636 637 func (c BlockClient) GetBlock(ctx context.Context, __arg GetBlockArg) (res GetBlockRes, err error) { 638 err = c.Cli.Call(ctx, "keybase.1.block.getBlock", []interface{}{__arg}, &res, 0*time.Millisecond) 639 return 640 } 641 642 func (c BlockClient) GetBlockSizes(ctx context.Context, __arg GetBlockSizesArg) (res GetBlockSizesRes, err error) { 643 err = c.Cli.CallCompressed(ctx, "keybase.1.block.getBlockSizes", []interface{}{__arg}, &res, rpc.CompressionGzip, 0*time.Millisecond) 644 return 645 } 646 647 func (c BlockClient) AddReference(ctx context.Context, __arg AddReferenceArg) (err error) { 648 err = c.Cli.CallCompressed(ctx, "keybase.1.block.addReference", []interface{}{__arg}, nil, rpc.CompressionGzip, 0*time.Millisecond) 649 return 650 } 651 652 func (c BlockClient) DelReference(ctx context.Context, __arg DelReferenceArg) (err error) { 653 err = c.Cli.CallCompressed(ctx, "keybase.1.block.delReference", []interface{}{__arg}, nil, rpc.CompressionGzip, 0*time.Millisecond) 654 return 655 } 656 657 func (c BlockClient) ArchiveReference(ctx context.Context, __arg ArchiveReferenceArg) (res []BlockReference, err error) { 658 err = c.Cli.CallCompressed(ctx, "keybase.1.block.archiveReference", []interface{}{__arg}, &res, rpc.CompressionGzip, 0*time.Millisecond) 659 return 660 } 661 662 func (c BlockClient) DelReferenceWithCount(ctx context.Context, __arg DelReferenceWithCountArg) (res DowngradeReferenceRes, err error) { 663 err = c.Cli.CallCompressed(ctx, "keybase.1.block.delReferenceWithCount", []interface{}{__arg}, &res, rpc.CompressionGzip, 0*time.Millisecond) 664 return 665 } 666 667 func (c BlockClient) ArchiveReferenceWithCount(ctx context.Context, __arg ArchiveReferenceWithCountArg) (res DowngradeReferenceRes, err error) { 668 err = c.Cli.CallCompressed(ctx, "keybase.1.block.archiveReferenceWithCount", []interface{}{__arg}, &res, rpc.CompressionGzip, 0*time.Millisecond) 669 return 670 } 671 672 func (c BlockClient) GetReferenceCount(ctx context.Context, __arg GetReferenceCountArg) (res ReferenceCountRes, err error) { 673 err = c.Cli.CallCompressed(ctx, "keybase.1.block.getReferenceCount", []interface{}{__arg}, &res, rpc.CompressionGzip, 0*time.Millisecond) 674 return 675 } 676 677 func (c BlockClient) GetUserQuotaInfo(ctx context.Context) (res []byte, err error) { 678 err = c.Cli.CallCompressed(ctx, "keybase.1.block.getUserQuotaInfo", []interface{}{GetUserQuotaInfoArg{}}, &res, rpc.CompressionGzip, 0*time.Millisecond) 679 return 680 } 681 682 func (c BlockClient) GetTeamQuotaInfo(ctx context.Context, tid TeamID) (res []byte, err error) { 683 __arg := GetTeamQuotaInfoArg{Tid: tid} 684 err = c.Cli.CallCompressed(ctx, "keybase.1.block.getTeamQuotaInfo", []interface{}{__arg}, &res, rpc.CompressionGzip, 0*time.Millisecond) 685 return 686 } 687 688 func (c BlockClient) GetUserQuotaInfo2(ctx context.Context, includeFolders bool) (res BlockQuotaInfo, err error) { 689 __arg := GetUserQuotaInfo2Arg{IncludeFolders: includeFolders} 690 err = c.Cli.CallCompressed(ctx, "keybase.1.block.getUserQuotaInfo2", []interface{}{__arg}, &res, rpc.CompressionGzip, 0*time.Millisecond) 691 return 692 } 693 694 func (c BlockClient) GetTeamQuotaInfo2(ctx context.Context, __arg GetTeamQuotaInfo2Arg) (res BlockQuotaInfo, err error) { 695 err = c.Cli.CallCompressed(ctx, "keybase.1.block.getTeamQuotaInfo2", []interface{}{__arg}, &res, rpc.CompressionGzip, 0*time.Millisecond) 696 return 697 } 698 699 func (c BlockClient) BlockPing(ctx context.Context) (res BlockPingResponse, err error) { 700 err = c.Cli.CallCompressed(ctx, "keybase.1.block.blockPing", []interface{}{BlockPingArg{}}, &res, rpc.CompressionGzip, 0*time.Millisecond) 701 return 702 }