github.com/keybase/client/go@v0.0.0-20240424154521-52f30ea26cb1/protocol/keybase1/simple_fs.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/simple_fs.avdl 3 4 package keybase1 5 6 import ( 7 "errors" 8 "fmt" 9 "github.com/keybase/go-framed-msgpack-rpc/rpc" 10 context "golang.org/x/net/context" 11 "time" 12 ) 13 14 type OpID [16]byte 15 16 func (o OpID) DeepCopy() OpID { 17 var ret OpID 18 copy(ret[:], o[:]) 19 return ret 20 } 21 22 type KBFSRevision int64 23 24 func (o KBFSRevision) DeepCopy() KBFSRevision { 25 return o 26 } 27 28 type KBFSArchivedType int 29 30 const ( 31 KBFSArchivedType_REVISION KBFSArchivedType = 0 32 KBFSArchivedType_TIME KBFSArchivedType = 1 33 KBFSArchivedType_TIME_STRING KBFSArchivedType = 2 34 KBFSArchivedType_REL_TIME_STRING KBFSArchivedType = 3 35 ) 36 37 func (o KBFSArchivedType) DeepCopy() KBFSArchivedType { return o } 38 39 var KBFSArchivedTypeMap = map[string]KBFSArchivedType{ 40 "REVISION": 0, 41 "TIME": 1, 42 "TIME_STRING": 2, 43 "REL_TIME_STRING": 3, 44 } 45 46 var KBFSArchivedTypeRevMap = map[KBFSArchivedType]string{ 47 0: "REVISION", 48 1: "TIME", 49 2: "TIME_STRING", 50 3: "REL_TIME_STRING", 51 } 52 53 func (e KBFSArchivedType) String() string { 54 if v, ok := KBFSArchivedTypeRevMap[e]; ok { 55 return v 56 } 57 return fmt.Sprintf("%v", int(e)) 58 } 59 60 type KBFSArchivedParam struct { 61 KBFSArchivedType__ KBFSArchivedType `codec:"KBFSArchivedType" json:"KBFSArchivedType"` 62 Revision__ *KBFSRevision `codec:"revision,omitempty" json:"revision,omitempty"` 63 Time__ *Time `codec:"time,omitempty" json:"time,omitempty"` 64 TimeString__ *string `codec:"timeString,omitempty" json:"timeString,omitempty"` 65 RelTimeString__ *string `codec:"relTimeString,omitempty" json:"relTimeString,omitempty"` 66 } 67 68 func (o *KBFSArchivedParam) KBFSArchivedType() (ret KBFSArchivedType, err error) { 69 switch o.KBFSArchivedType__ { 70 case KBFSArchivedType_REVISION: 71 if o.Revision__ == nil { 72 err = errors.New("unexpected nil value for Revision__") 73 return ret, err 74 } 75 case KBFSArchivedType_TIME: 76 if o.Time__ == nil { 77 err = errors.New("unexpected nil value for Time__") 78 return ret, err 79 } 80 case KBFSArchivedType_TIME_STRING: 81 if o.TimeString__ == nil { 82 err = errors.New("unexpected nil value for TimeString__") 83 return ret, err 84 } 85 case KBFSArchivedType_REL_TIME_STRING: 86 if o.RelTimeString__ == nil { 87 err = errors.New("unexpected nil value for RelTimeString__") 88 return ret, err 89 } 90 } 91 return o.KBFSArchivedType__, nil 92 } 93 94 func (o KBFSArchivedParam) Revision() (res KBFSRevision) { 95 if o.KBFSArchivedType__ != KBFSArchivedType_REVISION { 96 panic("wrong case accessed") 97 } 98 if o.Revision__ == nil { 99 return 100 } 101 return *o.Revision__ 102 } 103 104 func (o KBFSArchivedParam) Time() (res Time) { 105 if o.KBFSArchivedType__ != KBFSArchivedType_TIME { 106 panic("wrong case accessed") 107 } 108 if o.Time__ == nil { 109 return 110 } 111 return *o.Time__ 112 } 113 114 func (o KBFSArchivedParam) TimeString() (res string) { 115 if o.KBFSArchivedType__ != KBFSArchivedType_TIME_STRING { 116 panic("wrong case accessed") 117 } 118 if o.TimeString__ == nil { 119 return 120 } 121 return *o.TimeString__ 122 } 123 124 func (o KBFSArchivedParam) RelTimeString() (res string) { 125 if o.KBFSArchivedType__ != KBFSArchivedType_REL_TIME_STRING { 126 panic("wrong case accessed") 127 } 128 if o.RelTimeString__ == nil { 129 return 130 } 131 return *o.RelTimeString__ 132 } 133 134 func NewKBFSArchivedParamWithRevision(v KBFSRevision) KBFSArchivedParam { 135 return KBFSArchivedParam{ 136 KBFSArchivedType__: KBFSArchivedType_REVISION, 137 Revision__: &v, 138 } 139 } 140 141 func NewKBFSArchivedParamWithTime(v Time) KBFSArchivedParam { 142 return KBFSArchivedParam{ 143 KBFSArchivedType__: KBFSArchivedType_TIME, 144 Time__: &v, 145 } 146 } 147 148 func NewKBFSArchivedParamWithTimeString(v string) KBFSArchivedParam { 149 return KBFSArchivedParam{ 150 KBFSArchivedType__: KBFSArchivedType_TIME_STRING, 151 TimeString__: &v, 152 } 153 } 154 155 func NewKBFSArchivedParamWithRelTimeString(v string) KBFSArchivedParam { 156 return KBFSArchivedParam{ 157 KBFSArchivedType__: KBFSArchivedType_REL_TIME_STRING, 158 RelTimeString__: &v, 159 } 160 } 161 162 func (o KBFSArchivedParam) DeepCopy() KBFSArchivedParam { 163 return KBFSArchivedParam{ 164 KBFSArchivedType__: o.KBFSArchivedType__.DeepCopy(), 165 Revision__: (func(x *KBFSRevision) *KBFSRevision { 166 if x == nil { 167 return nil 168 } 169 tmp := (*x).DeepCopy() 170 return &tmp 171 })(o.Revision__), 172 Time__: (func(x *Time) *Time { 173 if x == nil { 174 return nil 175 } 176 tmp := (*x).DeepCopy() 177 return &tmp 178 })(o.Time__), 179 TimeString__: (func(x *string) *string { 180 if x == nil { 181 return nil 182 } 183 tmp := (*x) 184 return &tmp 185 })(o.TimeString__), 186 RelTimeString__: (func(x *string) *string { 187 if x == nil { 188 return nil 189 } 190 tmp := (*x) 191 return &tmp 192 })(o.RelTimeString__), 193 } 194 } 195 196 type KBFSArchivedPath struct { 197 Path string `codec:"path" json:"path"` 198 ArchivedParam KBFSArchivedParam `codec:"archivedParam" json:"archivedParam"` 199 IdentifyBehavior *TLFIdentifyBehavior `codec:"identifyBehavior,omitempty" json:"identifyBehavior,omitempty"` 200 } 201 202 func (o KBFSArchivedPath) DeepCopy() KBFSArchivedPath { 203 return KBFSArchivedPath{ 204 Path: o.Path, 205 ArchivedParam: o.ArchivedParam.DeepCopy(), 206 IdentifyBehavior: (func(x *TLFIdentifyBehavior) *TLFIdentifyBehavior { 207 if x == nil { 208 return nil 209 } 210 tmp := (*x).DeepCopy() 211 return &tmp 212 })(o.IdentifyBehavior), 213 } 214 } 215 216 type KBFSPath struct { 217 Path string `codec:"path" json:"path"` 218 IdentifyBehavior *TLFIdentifyBehavior `codec:"identifyBehavior,omitempty" json:"identifyBehavior,omitempty"` 219 } 220 221 func (o KBFSPath) DeepCopy() KBFSPath { 222 return KBFSPath{ 223 Path: o.Path, 224 IdentifyBehavior: (func(x *TLFIdentifyBehavior) *TLFIdentifyBehavior { 225 if x == nil { 226 return nil 227 } 228 tmp := (*x).DeepCopy() 229 return &tmp 230 })(o.IdentifyBehavior), 231 } 232 } 233 234 type PathType int 235 236 const ( 237 PathType_LOCAL PathType = 0 238 PathType_KBFS PathType = 1 239 PathType_KBFS_ARCHIVED PathType = 2 240 ) 241 242 func (o PathType) DeepCopy() PathType { return o } 243 244 var PathTypeMap = map[string]PathType{ 245 "LOCAL": 0, 246 "KBFS": 1, 247 "KBFS_ARCHIVED": 2, 248 } 249 250 var PathTypeRevMap = map[PathType]string{ 251 0: "LOCAL", 252 1: "KBFS", 253 2: "KBFS_ARCHIVED", 254 } 255 256 func (e PathType) String() string { 257 if v, ok := PathTypeRevMap[e]; ok { 258 return v 259 } 260 return fmt.Sprintf("%v", int(e)) 261 } 262 263 type Path struct { 264 PathType__ PathType `codec:"PathType" json:"PathType"` 265 Local__ *string `codec:"local,omitempty" json:"local,omitempty"` 266 Kbfs__ *KBFSPath `codec:"kbfs,omitempty" json:"kbfs,omitempty"` 267 KbfsArchived__ *KBFSArchivedPath `codec:"kbfsArchived,omitempty" json:"kbfsArchived,omitempty"` 268 } 269 270 func (o *Path) PathType() (ret PathType, err error) { 271 switch o.PathType__ { 272 case PathType_LOCAL: 273 if o.Local__ == nil { 274 err = errors.New("unexpected nil value for Local__") 275 return ret, err 276 } 277 case PathType_KBFS: 278 if o.Kbfs__ == nil { 279 err = errors.New("unexpected nil value for Kbfs__") 280 return ret, err 281 } 282 case PathType_KBFS_ARCHIVED: 283 if o.KbfsArchived__ == nil { 284 err = errors.New("unexpected nil value for KbfsArchived__") 285 return ret, err 286 } 287 } 288 return o.PathType__, nil 289 } 290 291 func (o Path) Local() (res string) { 292 if o.PathType__ != PathType_LOCAL { 293 panic("wrong case accessed") 294 } 295 if o.Local__ == nil { 296 return 297 } 298 return *o.Local__ 299 } 300 301 func (o Path) Kbfs() (res KBFSPath) { 302 if o.PathType__ != PathType_KBFS { 303 panic("wrong case accessed") 304 } 305 if o.Kbfs__ == nil { 306 return 307 } 308 return *o.Kbfs__ 309 } 310 311 func (o Path) KbfsArchived() (res KBFSArchivedPath) { 312 if o.PathType__ != PathType_KBFS_ARCHIVED { 313 panic("wrong case accessed") 314 } 315 if o.KbfsArchived__ == nil { 316 return 317 } 318 return *o.KbfsArchived__ 319 } 320 321 func NewPathWithLocal(v string) Path { 322 return Path{ 323 PathType__: PathType_LOCAL, 324 Local__: &v, 325 } 326 } 327 328 func NewPathWithKbfs(v KBFSPath) Path { 329 return Path{ 330 PathType__: PathType_KBFS, 331 Kbfs__: &v, 332 } 333 } 334 335 func NewPathWithKbfsArchived(v KBFSArchivedPath) Path { 336 return Path{ 337 PathType__: PathType_KBFS_ARCHIVED, 338 KbfsArchived__: &v, 339 } 340 } 341 342 func (o Path) DeepCopy() Path { 343 return Path{ 344 PathType__: o.PathType__.DeepCopy(), 345 Local__: (func(x *string) *string { 346 if x == nil { 347 return nil 348 } 349 tmp := (*x) 350 return &tmp 351 })(o.Local__), 352 Kbfs__: (func(x *KBFSPath) *KBFSPath { 353 if x == nil { 354 return nil 355 } 356 tmp := (*x).DeepCopy() 357 return &tmp 358 })(o.Kbfs__), 359 KbfsArchived__: (func(x *KBFSArchivedPath) *KBFSArchivedPath { 360 if x == nil { 361 return nil 362 } 363 tmp := (*x).DeepCopy() 364 return &tmp 365 })(o.KbfsArchived__), 366 } 367 } 368 369 type DirentType int 370 371 const ( 372 DirentType_FILE DirentType = 0 373 DirentType_DIR DirentType = 1 374 DirentType_SYM DirentType = 2 375 DirentType_EXEC DirentType = 3 376 ) 377 378 func (o DirentType) DeepCopy() DirentType { return o } 379 380 var DirentTypeMap = map[string]DirentType{ 381 "FILE": 0, 382 "DIR": 1, 383 "SYM": 2, 384 "EXEC": 3, 385 } 386 387 var DirentTypeRevMap = map[DirentType]string{ 388 0: "FILE", 389 1: "DIR", 390 2: "SYM", 391 3: "EXEC", 392 } 393 394 func (e DirentType) String() string { 395 if v, ok := DirentTypeRevMap[e]; ok { 396 return v 397 } 398 return fmt.Sprintf("%v", int(e)) 399 } 400 401 type PrefetchStatus int 402 403 const ( 404 PrefetchStatus_NOT_STARTED PrefetchStatus = 0 405 PrefetchStatus_IN_PROGRESS PrefetchStatus = 1 406 PrefetchStatus_COMPLETE PrefetchStatus = 2 407 ) 408 409 func (o PrefetchStatus) DeepCopy() PrefetchStatus { return o } 410 411 var PrefetchStatusMap = map[string]PrefetchStatus{ 412 "NOT_STARTED": 0, 413 "IN_PROGRESS": 1, 414 "COMPLETE": 2, 415 } 416 417 var PrefetchStatusRevMap = map[PrefetchStatus]string{ 418 0: "NOT_STARTED", 419 1: "IN_PROGRESS", 420 2: "COMPLETE", 421 } 422 423 func (e PrefetchStatus) String() string { 424 if v, ok := PrefetchStatusRevMap[e]; ok { 425 return v 426 } 427 return fmt.Sprintf("%v", int(e)) 428 } 429 430 type PrefetchProgress struct { 431 Start Time `codec:"start" json:"start"` 432 EndEstimate Time `codec:"endEstimate" json:"endEstimate"` 433 BytesTotal int64 `codec:"bytesTotal" json:"bytesTotal"` 434 BytesFetched int64 `codec:"bytesFetched" json:"bytesFetched"` 435 } 436 437 func (o PrefetchProgress) DeepCopy() PrefetchProgress { 438 return PrefetchProgress{ 439 Start: o.Start.DeepCopy(), 440 EndEstimate: o.EndEstimate.DeepCopy(), 441 BytesTotal: o.BytesTotal, 442 BytesFetched: o.BytesFetched, 443 } 444 } 445 446 type Dirent struct { 447 Time Time `codec:"time" json:"time"` 448 Size int `codec:"size" json:"size"` 449 Name string `codec:"name" json:"name"` 450 DirentType DirentType `codec:"direntType" json:"direntType"` 451 LastWriterUnverified User `codec:"lastWriterUnverified" json:"lastWriterUnverified"` 452 Writable bool `codec:"writable" json:"writable"` 453 PrefetchStatus PrefetchStatus `codec:"prefetchStatus" json:"prefetchStatus"` 454 PrefetchProgress PrefetchProgress `codec:"prefetchProgress" json:"prefetchProgress"` 455 SymlinkTarget string `codec:"symlinkTarget" json:"symlinkTarget"` 456 } 457 458 func (o Dirent) DeepCopy() Dirent { 459 return Dirent{ 460 Time: o.Time.DeepCopy(), 461 Size: o.Size, 462 Name: o.Name, 463 DirentType: o.DirentType.DeepCopy(), 464 LastWriterUnverified: o.LastWriterUnverified.DeepCopy(), 465 Writable: o.Writable, 466 PrefetchStatus: o.PrefetchStatus.DeepCopy(), 467 PrefetchProgress: o.PrefetchProgress.DeepCopy(), 468 SymlinkTarget: o.SymlinkTarget, 469 } 470 } 471 472 type DirentWithRevision struct { 473 Entry Dirent `codec:"entry" json:"entry"` 474 Revision KBFSRevision `codec:"revision" json:"revision"` 475 } 476 477 func (o DirentWithRevision) DeepCopy() DirentWithRevision { 478 return DirentWithRevision{ 479 Entry: o.Entry.DeepCopy(), 480 Revision: o.Revision.DeepCopy(), 481 } 482 } 483 484 type RevisionSpanType int 485 486 const ( 487 RevisionSpanType_DEFAULT RevisionSpanType = 0 488 RevisionSpanType_LAST_FIVE RevisionSpanType = 1 489 ) 490 491 func (o RevisionSpanType) DeepCopy() RevisionSpanType { return o } 492 493 var RevisionSpanTypeMap = map[string]RevisionSpanType{ 494 "DEFAULT": 0, 495 "LAST_FIVE": 1, 496 } 497 498 var RevisionSpanTypeRevMap = map[RevisionSpanType]string{ 499 0: "DEFAULT", 500 1: "LAST_FIVE", 501 } 502 503 func (e RevisionSpanType) String() string { 504 if v, ok := RevisionSpanTypeRevMap[e]; ok { 505 return v 506 } 507 return fmt.Sprintf("%v", int(e)) 508 } 509 510 type ErrorNum int 511 512 func (o ErrorNum) DeepCopy() ErrorNum { 513 return o 514 } 515 516 type OpenFlags int 517 518 const ( 519 OpenFlags_READ OpenFlags = 0 520 OpenFlags_REPLACE OpenFlags = 1 521 OpenFlags_EXISTING OpenFlags = 2 522 OpenFlags_WRITE OpenFlags = 4 523 OpenFlags_APPEND OpenFlags = 8 524 OpenFlags_DIRECTORY OpenFlags = 16 525 ) 526 527 func (o OpenFlags) DeepCopy() OpenFlags { return o } 528 529 var OpenFlagsMap = map[string]OpenFlags{ 530 "READ": 0, 531 "REPLACE": 1, 532 "EXISTING": 2, 533 "WRITE": 4, 534 "APPEND": 8, 535 "DIRECTORY": 16, 536 } 537 538 var OpenFlagsRevMap = map[OpenFlags]string{ 539 0: "READ", 540 1: "REPLACE", 541 2: "EXISTING", 542 4: "WRITE", 543 8: "APPEND", 544 16: "DIRECTORY", 545 } 546 547 func (e OpenFlags) String() string { 548 if v, ok := OpenFlagsRevMap[e]; ok { 549 return v 550 } 551 return fmt.Sprintf("%v", int(e)) 552 } 553 554 type Progress int 555 556 func (o Progress) DeepCopy() Progress { 557 return o 558 } 559 560 type SimpleFSListResult struct { 561 Entries []Dirent `codec:"entries" json:"entries"` 562 Progress Progress `codec:"progress" json:"progress"` 563 } 564 565 func (o SimpleFSListResult) DeepCopy() SimpleFSListResult { 566 return SimpleFSListResult{ 567 Entries: (func(x []Dirent) []Dirent { 568 if x == nil { 569 return nil 570 } 571 ret := make([]Dirent, len(x)) 572 for i, v := range x { 573 vCopy := v.DeepCopy() 574 ret[i] = vCopy 575 } 576 return ret 577 })(o.Entries), 578 Progress: o.Progress.DeepCopy(), 579 } 580 } 581 582 type FileContent struct { 583 Data []byte `codec:"data" json:"data"` 584 Progress Progress `codec:"progress" json:"progress"` 585 } 586 587 func (o FileContent) DeepCopy() FileContent { 588 return FileContent{ 589 Data: (func(x []byte) []byte { 590 if x == nil { 591 return nil 592 } 593 return append([]byte{}, x...) 594 })(o.Data), 595 Progress: o.Progress.DeepCopy(), 596 } 597 } 598 599 type AsyncOps int 600 601 const ( 602 AsyncOps_LIST AsyncOps = 0 603 AsyncOps_LIST_RECURSIVE AsyncOps = 1 604 AsyncOps_READ AsyncOps = 2 605 AsyncOps_WRITE AsyncOps = 3 606 AsyncOps_COPY AsyncOps = 4 607 AsyncOps_MOVE AsyncOps = 5 608 AsyncOps_REMOVE AsyncOps = 6 609 AsyncOps_LIST_RECURSIVE_TO_DEPTH AsyncOps = 7 610 AsyncOps_GET_REVISIONS AsyncOps = 8 611 ) 612 613 func (o AsyncOps) DeepCopy() AsyncOps { return o } 614 615 var AsyncOpsMap = map[string]AsyncOps{ 616 "LIST": 0, 617 "LIST_RECURSIVE": 1, 618 "READ": 2, 619 "WRITE": 3, 620 "COPY": 4, 621 "MOVE": 5, 622 "REMOVE": 6, 623 "LIST_RECURSIVE_TO_DEPTH": 7, 624 "GET_REVISIONS": 8, 625 } 626 627 var AsyncOpsRevMap = map[AsyncOps]string{ 628 0: "LIST", 629 1: "LIST_RECURSIVE", 630 2: "READ", 631 3: "WRITE", 632 4: "COPY", 633 5: "MOVE", 634 6: "REMOVE", 635 7: "LIST_RECURSIVE_TO_DEPTH", 636 8: "GET_REVISIONS", 637 } 638 639 func (e AsyncOps) String() string { 640 if v, ok := AsyncOpsRevMap[e]; ok { 641 return v 642 } 643 return fmt.Sprintf("%v", int(e)) 644 } 645 646 type ListFilter int 647 648 const ( 649 ListFilter_NO_FILTER ListFilter = 0 650 ListFilter_FILTER_ALL_HIDDEN ListFilter = 1 651 ListFilter_FILTER_SYSTEM_HIDDEN ListFilter = 2 652 ) 653 654 func (o ListFilter) DeepCopy() ListFilter { return o } 655 656 var ListFilterMap = map[string]ListFilter{ 657 "NO_FILTER": 0, 658 "FILTER_ALL_HIDDEN": 1, 659 "FILTER_SYSTEM_HIDDEN": 2, 660 } 661 662 var ListFilterRevMap = map[ListFilter]string{ 663 0: "NO_FILTER", 664 1: "FILTER_ALL_HIDDEN", 665 2: "FILTER_SYSTEM_HIDDEN", 666 } 667 668 func (e ListFilter) String() string { 669 if v, ok := ListFilterRevMap[e]; ok { 670 return v 671 } 672 return fmt.Sprintf("%v", int(e)) 673 } 674 675 type ListArgs struct { 676 OpID OpID `codec:"opID" json:"opID"` 677 Path Path `codec:"path" json:"path"` 678 Filter ListFilter `codec:"filter" json:"filter"` 679 } 680 681 func (o ListArgs) DeepCopy() ListArgs { 682 return ListArgs{ 683 OpID: o.OpID.DeepCopy(), 684 Path: o.Path.DeepCopy(), 685 Filter: o.Filter.DeepCopy(), 686 } 687 } 688 689 type ListToDepthArgs struct { 690 OpID OpID `codec:"opID" json:"opID"` 691 Path Path `codec:"path" json:"path"` 692 Filter ListFilter `codec:"filter" json:"filter"` 693 Depth int `codec:"depth" json:"depth"` 694 } 695 696 func (o ListToDepthArgs) DeepCopy() ListToDepthArgs { 697 return ListToDepthArgs{ 698 OpID: o.OpID.DeepCopy(), 699 Path: o.Path.DeepCopy(), 700 Filter: o.Filter.DeepCopy(), 701 Depth: o.Depth, 702 } 703 } 704 705 type RemoveArgs struct { 706 OpID OpID `codec:"opID" json:"opID"` 707 Path Path `codec:"path" json:"path"` 708 Recursive bool `codec:"recursive" json:"recursive"` 709 } 710 711 func (o RemoveArgs) DeepCopy() RemoveArgs { 712 return RemoveArgs{ 713 OpID: o.OpID.DeepCopy(), 714 Path: o.Path.DeepCopy(), 715 Recursive: o.Recursive, 716 } 717 } 718 719 type ReadArgs struct { 720 OpID OpID `codec:"opID" json:"opID"` 721 Path Path `codec:"path" json:"path"` 722 Offset int64 `codec:"offset" json:"offset"` 723 Size int `codec:"size" json:"size"` 724 } 725 726 func (o ReadArgs) DeepCopy() ReadArgs { 727 return ReadArgs{ 728 OpID: o.OpID.DeepCopy(), 729 Path: o.Path.DeepCopy(), 730 Offset: o.Offset, 731 Size: o.Size, 732 } 733 } 734 735 type WriteArgs struct { 736 OpID OpID `codec:"opID" json:"opID"` 737 Path Path `codec:"path" json:"path"` 738 Offset int64 `codec:"offset" json:"offset"` 739 } 740 741 func (o WriteArgs) DeepCopy() WriteArgs { 742 return WriteArgs{ 743 OpID: o.OpID.DeepCopy(), 744 Path: o.Path.DeepCopy(), 745 Offset: o.Offset, 746 } 747 } 748 749 type CopyArgs struct { 750 OpID OpID `codec:"opID" json:"opID"` 751 Src Path `codec:"src" json:"src"` 752 Dest Path `codec:"dest" json:"dest"` 753 OverwriteExistingFiles bool `codec:"overwriteExistingFiles" json:"overwriteExistingFiles"` 754 } 755 756 func (o CopyArgs) DeepCopy() CopyArgs { 757 return CopyArgs{ 758 OpID: o.OpID.DeepCopy(), 759 Src: o.Src.DeepCopy(), 760 Dest: o.Dest.DeepCopy(), 761 OverwriteExistingFiles: o.OverwriteExistingFiles, 762 } 763 } 764 765 type MoveArgs struct { 766 OpID OpID `codec:"opID" json:"opID"` 767 Src Path `codec:"src" json:"src"` 768 Dest Path `codec:"dest" json:"dest"` 769 OverwriteExistingFiles bool `codec:"overwriteExistingFiles" json:"overwriteExistingFiles"` 770 } 771 772 func (o MoveArgs) DeepCopy() MoveArgs { 773 return MoveArgs{ 774 OpID: o.OpID.DeepCopy(), 775 Src: o.Src.DeepCopy(), 776 Dest: o.Dest.DeepCopy(), 777 OverwriteExistingFiles: o.OverwriteExistingFiles, 778 } 779 } 780 781 type GetRevisionsArgs struct { 782 OpID OpID `codec:"opID" json:"opID"` 783 Path Path `codec:"path" json:"path"` 784 SpanType RevisionSpanType `codec:"spanType" json:"spanType"` 785 } 786 787 func (o GetRevisionsArgs) DeepCopy() GetRevisionsArgs { 788 return GetRevisionsArgs{ 789 OpID: o.OpID.DeepCopy(), 790 Path: o.Path.DeepCopy(), 791 SpanType: o.SpanType.DeepCopy(), 792 } 793 } 794 795 type OpDescription struct { 796 AsyncOp__ AsyncOps `codec:"asyncOp" json:"asyncOp"` 797 List__ *ListArgs `codec:"list,omitempty" json:"list,omitempty"` 798 ListRecursive__ *ListArgs `codec:"listRecursive,omitempty" json:"listRecursive,omitempty"` 799 ListRecursiveToDepth__ *ListToDepthArgs `codec:"listRecursiveToDepth,omitempty" json:"listRecursiveToDepth,omitempty"` 800 Read__ *ReadArgs `codec:"read,omitempty" json:"read,omitempty"` 801 Write__ *WriteArgs `codec:"write,omitempty" json:"write,omitempty"` 802 Copy__ *CopyArgs `codec:"copy,omitempty" json:"copy,omitempty"` 803 Move__ *MoveArgs `codec:"move,omitempty" json:"move,omitempty"` 804 Remove__ *RemoveArgs `codec:"remove,omitempty" json:"remove,omitempty"` 805 GetRevisions__ *GetRevisionsArgs `codec:"getRevisions,omitempty" json:"getRevisions,omitempty"` 806 } 807 808 func (o *OpDescription) AsyncOp() (ret AsyncOps, err error) { 809 switch o.AsyncOp__ { 810 case AsyncOps_LIST: 811 if o.List__ == nil { 812 err = errors.New("unexpected nil value for List__") 813 return ret, err 814 } 815 case AsyncOps_LIST_RECURSIVE: 816 if o.ListRecursive__ == nil { 817 err = errors.New("unexpected nil value for ListRecursive__") 818 return ret, err 819 } 820 case AsyncOps_LIST_RECURSIVE_TO_DEPTH: 821 if o.ListRecursiveToDepth__ == nil { 822 err = errors.New("unexpected nil value for ListRecursiveToDepth__") 823 return ret, err 824 } 825 case AsyncOps_READ: 826 if o.Read__ == nil { 827 err = errors.New("unexpected nil value for Read__") 828 return ret, err 829 } 830 case AsyncOps_WRITE: 831 if o.Write__ == nil { 832 err = errors.New("unexpected nil value for Write__") 833 return ret, err 834 } 835 case AsyncOps_COPY: 836 if o.Copy__ == nil { 837 err = errors.New("unexpected nil value for Copy__") 838 return ret, err 839 } 840 case AsyncOps_MOVE: 841 if o.Move__ == nil { 842 err = errors.New("unexpected nil value for Move__") 843 return ret, err 844 } 845 case AsyncOps_REMOVE: 846 if o.Remove__ == nil { 847 err = errors.New("unexpected nil value for Remove__") 848 return ret, err 849 } 850 case AsyncOps_GET_REVISIONS: 851 if o.GetRevisions__ == nil { 852 err = errors.New("unexpected nil value for GetRevisions__") 853 return ret, err 854 } 855 } 856 return o.AsyncOp__, nil 857 } 858 859 func (o OpDescription) List() (res ListArgs) { 860 if o.AsyncOp__ != AsyncOps_LIST { 861 panic("wrong case accessed") 862 } 863 if o.List__ == nil { 864 return 865 } 866 return *o.List__ 867 } 868 869 func (o OpDescription) ListRecursive() (res ListArgs) { 870 if o.AsyncOp__ != AsyncOps_LIST_RECURSIVE { 871 panic("wrong case accessed") 872 } 873 if o.ListRecursive__ == nil { 874 return 875 } 876 return *o.ListRecursive__ 877 } 878 879 func (o OpDescription) ListRecursiveToDepth() (res ListToDepthArgs) { 880 if o.AsyncOp__ != AsyncOps_LIST_RECURSIVE_TO_DEPTH { 881 panic("wrong case accessed") 882 } 883 if o.ListRecursiveToDepth__ == nil { 884 return 885 } 886 return *o.ListRecursiveToDepth__ 887 } 888 889 func (o OpDescription) Read() (res ReadArgs) { 890 if o.AsyncOp__ != AsyncOps_READ { 891 panic("wrong case accessed") 892 } 893 if o.Read__ == nil { 894 return 895 } 896 return *o.Read__ 897 } 898 899 func (o OpDescription) Write() (res WriteArgs) { 900 if o.AsyncOp__ != AsyncOps_WRITE { 901 panic("wrong case accessed") 902 } 903 if o.Write__ == nil { 904 return 905 } 906 return *o.Write__ 907 } 908 909 func (o OpDescription) Copy() (res CopyArgs) { 910 if o.AsyncOp__ != AsyncOps_COPY { 911 panic("wrong case accessed") 912 } 913 if o.Copy__ == nil { 914 return 915 } 916 return *o.Copy__ 917 } 918 919 func (o OpDescription) Move() (res MoveArgs) { 920 if o.AsyncOp__ != AsyncOps_MOVE { 921 panic("wrong case accessed") 922 } 923 if o.Move__ == nil { 924 return 925 } 926 return *o.Move__ 927 } 928 929 func (o OpDescription) Remove() (res RemoveArgs) { 930 if o.AsyncOp__ != AsyncOps_REMOVE { 931 panic("wrong case accessed") 932 } 933 if o.Remove__ == nil { 934 return 935 } 936 return *o.Remove__ 937 } 938 939 func (o OpDescription) GetRevisions() (res GetRevisionsArgs) { 940 if o.AsyncOp__ != AsyncOps_GET_REVISIONS { 941 panic("wrong case accessed") 942 } 943 if o.GetRevisions__ == nil { 944 return 945 } 946 return *o.GetRevisions__ 947 } 948 949 func NewOpDescriptionWithList(v ListArgs) OpDescription { 950 return OpDescription{ 951 AsyncOp__: AsyncOps_LIST, 952 List__: &v, 953 } 954 } 955 956 func NewOpDescriptionWithListRecursive(v ListArgs) OpDescription { 957 return OpDescription{ 958 AsyncOp__: AsyncOps_LIST_RECURSIVE, 959 ListRecursive__: &v, 960 } 961 } 962 963 func NewOpDescriptionWithListRecursiveToDepth(v ListToDepthArgs) OpDescription { 964 return OpDescription{ 965 AsyncOp__: AsyncOps_LIST_RECURSIVE_TO_DEPTH, 966 ListRecursiveToDepth__: &v, 967 } 968 } 969 970 func NewOpDescriptionWithRead(v ReadArgs) OpDescription { 971 return OpDescription{ 972 AsyncOp__: AsyncOps_READ, 973 Read__: &v, 974 } 975 } 976 977 func NewOpDescriptionWithWrite(v WriteArgs) OpDescription { 978 return OpDescription{ 979 AsyncOp__: AsyncOps_WRITE, 980 Write__: &v, 981 } 982 } 983 984 func NewOpDescriptionWithCopy(v CopyArgs) OpDescription { 985 return OpDescription{ 986 AsyncOp__: AsyncOps_COPY, 987 Copy__: &v, 988 } 989 } 990 991 func NewOpDescriptionWithMove(v MoveArgs) OpDescription { 992 return OpDescription{ 993 AsyncOp__: AsyncOps_MOVE, 994 Move__: &v, 995 } 996 } 997 998 func NewOpDescriptionWithRemove(v RemoveArgs) OpDescription { 999 return OpDescription{ 1000 AsyncOp__: AsyncOps_REMOVE, 1001 Remove__: &v, 1002 } 1003 } 1004 1005 func NewOpDescriptionWithGetRevisions(v GetRevisionsArgs) OpDescription { 1006 return OpDescription{ 1007 AsyncOp__: AsyncOps_GET_REVISIONS, 1008 GetRevisions__: &v, 1009 } 1010 } 1011 1012 func (o OpDescription) DeepCopy() OpDescription { 1013 return OpDescription{ 1014 AsyncOp__: o.AsyncOp__.DeepCopy(), 1015 List__: (func(x *ListArgs) *ListArgs { 1016 if x == nil { 1017 return nil 1018 } 1019 tmp := (*x).DeepCopy() 1020 return &tmp 1021 })(o.List__), 1022 ListRecursive__: (func(x *ListArgs) *ListArgs { 1023 if x == nil { 1024 return nil 1025 } 1026 tmp := (*x).DeepCopy() 1027 return &tmp 1028 })(o.ListRecursive__), 1029 ListRecursiveToDepth__: (func(x *ListToDepthArgs) *ListToDepthArgs { 1030 if x == nil { 1031 return nil 1032 } 1033 tmp := (*x).DeepCopy() 1034 return &tmp 1035 })(o.ListRecursiveToDepth__), 1036 Read__: (func(x *ReadArgs) *ReadArgs { 1037 if x == nil { 1038 return nil 1039 } 1040 tmp := (*x).DeepCopy() 1041 return &tmp 1042 })(o.Read__), 1043 Write__: (func(x *WriteArgs) *WriteArgs { 1044 if x == nil { 1045 return nil 1046 } 1047 tmp := (*x).DeepCopy() 1048 return &tmp 1049 })(o.Write__), 1050 Copy__: (func(x *CopyArgs) *CopyArgs { 1051 if x == nil { 1052 return nil 1053 } 1054 tmp := (*x).DeepCopy() 1055 return &tmp 1056 })(o.Copy__), 1057 Move__: (func(x *MoveArgs) *MoveArgs { 1058 if x == nil { 1059 return nil 1060 } 1061 tmp := (*x).DeepCopy() 1062 return &tmp 1063 })(o.Move__), 1064 Remove__: (func(x *RemoveArgs) *RemoveArgs { 1065 if x == nil { 1066 return nil 1067 } 1068 tmp := (*x).DeepCopy() 1069 return &tmp 1070 })(o.Remove__), 1071 GetRevisions__: (func(x *GetRevisionsArgs) *GetRevisionsArgs { 1072 if x == nil { 1073 return nil 1074 } 1075 tmp := (*x).DeepCopy() 1076 return &tmp 1077 })(o.GetRevisions__), 1078 } 1079 } 1080 1081 type GetRevisionsResult struct { 1082 Revisions []DirentWithRevision `codec:"revisions" json:"revisions"` 1083 Progress Progress `codec:"progress" json:"progress"` 1084 } 1085 1086 func (o GetRevisionsResult) DeepCopy() GetRevisionsResult { 1087 return GetRevisionsResult{ 1088 Revisions: (func(x []DirentWithRevision) []DirentWithRevision { 1089 if x == nil { 1090 return nil 1091 } 1092 ret := make([]DirentWithRevision, len(x)) 1093 for i, v := range x { 1094 vCopy := v.DeepCopy() 1095 ret[i] = vCopy 1096 } 1097 return ret 1098 })(o.Revisions), 1099 Progress: o.Progress.DeepCopy(), 1100 } 1101 } 1102 1103 type OpProgress struct { 1104 Start Time `codec:"start" json:"start"` 1105 EndEstimate Time `codec:"endEstimate" json:"endEstimate"` 1106 OpType AsyncOps `codec:"opType" json:"opType"` 1107 BytesTotal int64 `codec:"bytesTotal" json:"bytesTotal"` 1108 BytesRead int64 `codec:"bytesRead" json:"bytesRead"` 1109 BytesWritten int64 `codec:"bytesWritten" json:"bytesWritten"` 1110 FilesTotal int64 `codec:"filesTotal" json:"filesTotal"` 1111 FilesRead int64 `codec:"filesRead" json:"filesRead"` 1112 FilesWritten int64 `codec:"filesWritten" json:"filesWritten"` 1113 } 1114 1115 func (o OpProgress) DeepCopy() OpProgress { 1116 return OpProgress{ 1117 Start: o.Start.DeepCopy(), 1118 EndEstimate: o.EndEstimate.DeepCopy(), 1119 OpType: o.OpType.DeepCopy(), 1120 BytesTotal: o.BytesTotal, 1121 BytesRead: o.BytesRead, 1122 BytesWritten: o.BytesWritten, 1123 FilesTotal: o.FilesTotal, 1124 FilesRead: o.FilesRead, 1125 FilesWritten: o.FilesWritten, 1126 } 1127 } 1128 1129 type SimpleFSQuotaUsage struct { 1130 UsageBytes int64 `codec:"usageBytes" json:"usageBytes"` 1131 ArchiveBytes int64 `codec:"archiveBytes" json:"archiveBytes"` 1132 LimitBytes int64 `codec:"limitBytes" json:"limitBytes"` 1133 GitUsageBytes int64 `codec:"gitUsageBytes" json:"gitUsageBytes"` 1134 GitArchiveBytes int64 `codec:"gitArchiveBytes" json:"gitArchiveBytes"` 1135 GitLimitBytes int64 `codec:"gitLimitBytes" json:"gitLimitBytes"` 1136 } 1137 1138 func (o SimpleFSQuotaUsage) DeepCopy() SimpleFSQuotaUsage { 1139 return SimpleFSQuotaUsage{ 1140 UsageBytes: o.UsageBytes, 1141 ArchiveBytes: o.ArchiveBytes, 1142 LimitBytes: o.LimitBytes, 1143 GitUsageBytes: o.GitUsageBytes, 1144 GitArchiveBytes: o.GitArchiveBytes, 1145 GitLimitBytes: o.GitLimitBytes, 1146 } 1147 } 1148 1149 type FolderSyncMode int 1150 1151 const ( 1152 FolderSyncMode_DISABLED FolderSyncMode = 0 1153 FolderSyncMode_ENABLED FolderSyncMode = 1 1154 FolderSyncMode_PARTIAL FolderSyncMode = 2 1155 ) 1156 1157 func (o FolderSyncMode) DeepCopy() FolderSyncMode { return o } 1158 1159 var FolderSyncModeMap = map[string]FolderSyncMode{ 1160 "DISABLED": 0, 1161 "ENABLED": 1, 1162 "PARTIAL": 2, 1163 } 1164 1165 var FolderSyncModeRevMap = map[FolderSyncMode]string{ 1166 0: "DISABLED", 1167 1: "ENABLED", 1168 2: "PARTIAL", 1169 } 1170 1171 func (e FolderSyncMode) String() string { 1172 if v, ok := FolderSyncModeRevMap[e]; ok { 1173 return v 1174 } 1175 return fmt.Sprintf("%v", int(e)) 1176 } 1177 1178 type FolderSyncConfig struct { 1179 Mode FolderSyncMode `codec:"mode" json:"mode"` 1180 Paths []string `codec:"paths" json:"paths"` 1181 } 1182 1183 func (o FolderSyncConfig) DeepCopy() FolderSyncConfig { 1184 return FolderSyncConfig{ 1185 Mode: o.Mode.DeepCopy(), 1186 Paths: (func(x []string) []string { 1187 if x == nil { 1188 return nil 1189 } 1190 ret := make([]string, len(x)) 1191 for i, v := range x { 1192 vCopy := v 1193 ret[i] = vCopy 1194 } 1195 return ret 1196 })(o.Paths), 1197 } 1198 } 1199 1200 type FolderSyncConfigAndStatus struct { 1201 Config FolderSyncConfig `codec:"config" json:"config"` 1202 Status FolderSyncStatus `codec:"status" json:"status"` 1203 } 1204 1205 func (o FolderSyncConfigAndStatus) DeepCopy() FolderSyncConfigAndStatus { 1206 return FolderSyncConfigAndStatus{ 1207 Config: o.Config.DeepCopy(), 1208 Status: o.Status.DeepCopy(), 1209 } 1210 } 1211 1212 type FolderSyncConfigAndStatusWithFolder struct { 1213 Folder Folder `codec:"folder" json:"folder"` 1214 Config FolderSyncConfig `codec:"config" json:"config"` 1215 Status FolderSyncStatus `codec:"status" json:"status"` 1216 } 1217 1218 func (o FolderSyncConfigAndStatusWithFolder) DeepCopy() FolderSyncConfigAndStatusWithFolder { 1219 return FolderSyncConfigAndStatusWithFolder{ 1220 Folder: o.Folder.DeepCopy(), 1221 Config: o.Config.DeepCopy(), 1222 Status: o.Status.DeepCopy(), 1223 } 1224 } 1225 1226 type SyncConfigAndStatusRes struct { 1227 Folders []FolderSyncConfigAndStatusWithFolder `codec:"folders" json:"folders"` 1228 OverallStatus FolderSyncStatus `codec:"overallStatus" json:"overallStatus"` 1229 } 1230 1231 func (o SyncConfigAndStatusRes) DeepCopy() SyncConfigAndStatusRes { 1232 return SyncConfigAndStatusRes{ 1233 Folders: (func(x []FolderSyncConfigAndStatusWithFolder) []FolderSyncConfigAndStatusWithFolder { 1234 if x == nil { 1235 return nil 1236 } 1237 ret := make([]FolderSyncConfigAndStatusWithFolder, len(x)) 1238 for i, v := range x { 1239 vCopy := v.DeepCopy() 1240 ret[i] = vCopy 1241 } 1242 return ret 1243 })(o.Folders), 1244 OverallStatus: o.OverallStatus.DeepCopy(), 1245 } 1246 } 1247 1248 type FolderWithFavFlags struct { 1249 Folder Folder `codec:"folder" json:"folder"` 1250 IsFavorite bool `codec:"isFavorite" json:"isFavorite"` 1251 IsIgnored bool `codec:"isIgnored" json:"isIgnored"` 1252 IsNew bool `codec:"isNew" json:"isNew"` 1253 } 1254 1255 func (o FolderWithFavFlags) DeepCopy() FolderWithFavFlags { 1256 return FolderWithFavFlags{ 1257 Folder: o.Folder.DeepCopy(), 1258 IsFavorite: o.IsFavorite, 1259 IsIgnored: o.IsIgnored, 1260 IsNew: o.IsNew, 1261 } 1262 } 1263 1264 type KbfsOnlineStatus int 1265 1266 const ( 1267 KbfsOnlineStatus_OFFLINE KbfsOnlineStatus = 0 1268 KbfsOnlineStatus_TRYING KbfsOnlineStatus = 1 1269 KbfsOnlineStatus_ONLINE KbfsOnlineStatus = 2 1270 ) 1271 1272 func (o KbfsOnlineStatus) DeepCopy() KbfsOnlineStatus { return o } 1273 1274 var KbfsOnlineStatusMap = map[string]KbfsOnlineStatus{ 1275 "OFFLINE": 0, 1276 "TRYING": 1, 1277 "ONLINE": 2, 1278 } 1279 1280 var KbfsOnlineStatusRevMap = map[KbfsOnlineStatus]string{ 1281 0: "OFFLINE", 1282 1: "TRYING", 1283 2: "ONLINE", 1284 } 1285 1286 func (e KbfsOnlineStatus) String() string { 1287 if v, ok := KbfsOnlineStatusRevMap[e]; ok { 1288 return v 1289 } 1290 return fmt.Sprintf("%v", int(e)) 1291 } 1292 1293 type FSSettings struct { 1294 SpaceAvailableNotificationThreshold int64 `codec:"spaceAvailableNotificationThreshold" json:"spaceAvailableNotificationThreshold"` 1295 SfmiBannerDismissed bool `codec:"sfmiBannerDismissed" json:"sfmiBannerDismissed"` 1296 SyncOnCellular bool `codec:"syncOnCellular" json:"syncOnCellular"` 1297 } 1298 1299 func (o FSSettings) DeepCopy() FSSettings { 1300 return FSSettings{ 1301 SpaceAvailableNotificationThreshold: o.SpaceAvailableNotificationThreshold, 1302 SfmiBannerDismissed: o.SfmiBannerDismissed, 1303 SyncOnCellular: o.SyncOnCellular, 1304 } 1305 } 1306 1307 type SimpleFSStats struct { 1308 ProcessStats ProcessRuntimeStats `codec:"processStats" json:"processStats"` 1309 BlockCacheDbStats []string `codec:"blockCacheDbStats" json:"blockCacheDbStats"` 1310 SyncCacheDbStats []string `codec:"syncCacheDbStats" json:"syncCacheDbStats"` 1311 RuntimeDbStats []DbStats `codec:"runtimeDbStats" json:"runtimeDbStats"` 1312 } 1313 1314 func (o SimpleFSStats) DeepCopy() SimpleFSStats { 1315 return SimpleFSStats{ 1316 ProcessStats: o.ProcessStats.DeepCopy(), 1317 BlockCacheDbStats: (func(x []string) []string { 1318 if x == nil { 1319 return nil 1320 } 1321 ret := make([]string, len(x)) 1322 for i, v := range x { 1323 vCopy := v 1324 ret[i] = vCopy 1325 } 1326 return ret 1327 })(o.BlockCacheDbStats), 1328 SyncCacheDbStats: (func(x []string) []string { 1329 if x == nil { 1330 return nil 1331 } 1332 ret := make([]string, len(x)) 1333 for i, v := range x { 1334 vCopy := v 1335 ret[i] = vCopy 1336 } 1337 return ret 1338 })(o.SyncCacheDbStats), 1339 RuntimeDbStats: (func(x []DbStats) []DbStats { 1340 if x == nil { 1341 return nil 1342 } 1343 ret := make([]DbStats, len(x)) 1344 for i, v := range x { 1345 vCopy := v.DeepCopy() 1346 ret[i] = vCopy 1347 } 1348 return ret 1349 })(o.RuntimeDbStats), 1350 } 1351 } 1352 1353 type SubscriptionTopic int 1354 1355 const ( 1356 SubscriptionTopic_FAVORITES SubscriptionTopic = 0 1357 SubscriptionTopic_JOURNAL_STATUS SubscriptionTopic = 1 1358 SubscriptionTopic_ONLINE_STATUS SubscriptionTopic = 2 1359 SubscriptionTopic_DOWNLOAD_STATUS SubscriptionTopic = 3 1360 SubscriptionTopic_FILES_TAB_BADGE SubscriptionTopic = 4 1361 SubscriptionTopic_OVERALL_SYNC_STATUS SubscriptionTopic = 5 1362 SubscriptionTopic_SETTINGS SubscriptionTopic = 6 1363 SubscriptionTopic_UPLOAD_STATUS SubscriptionTopic = 7 1364 ) 1365 1366 func (o SubscriptionTopic) DeepCopy() SubscriptionTopic { return o } 1367 1368 var SubscriptionTopicMap = map[string]SubscriptionTopic{ 1369 "FAVORITES": 0, 1370 "JOURNAL_STATUS": 1, 1371 "ONLINE_STATUS": 2, 1372 "DOWNLOAD_STATUS": 3, 1373 "FILES_TAB_BADGE": 4, 1374 "OVERALL_SYNC_STATUS": 5, 1375 "SETTINGS": 6, 1376 "UPLOAD_STATUS": 7, 1377 } 1378 1379 var SubscriptionTopicRevMap = map[SubscriptionTopic]string{ 1380 0: "FAVORITES", 1381 1: "JOURNAL_STATUS", 1382 2: "ONLINE_STATUS", 1383 3: "DOWNLOAD_STATUS", 1384 4: "FILES_TAB_BADGE", 1385 5: "OVERALL_SYNC_STATUS", 1386 6: "SETTINGS", 1387 7: "UPLOAD_STATUS", 1388 } 1389 1390 func (e SubscriptionTopic) String() string { 1391 if v, ok := SubscriptionTopicRevMap[e]; ok { 1392 return v 1393 } 1394 return fmt.Sprintf("%v", int(e)) 1395 } 1396 1397 type PathSubscriptionTopic int 1398 1399 const ( 1400 PathSubscriptionTopic_CHILDREN PathSubscriptionTopic = 0 1401 PathSubscriptionTopic_STAT PathSubscriptionTopic = 1 1402 ) 1403 1404 func (o PathSubscriptionTopic) DeepCopy() PathSubscriptionTopic { return o } 1405 1406 var PathSubscriptionTopicMap = map[string]PathSubscriptionTopic{ 1407 "CHILDREN": 0, 1408 "STAT": 1, 1409 } 1410 1411 var PathSubscriptionTopicRevMap = map[PathSubscriptionTopic]string{ 1412 0: "CHILDREN", 1413 1: "STAT", 1414 } 1415 1416 func (e PathSubscriptionTopic) String() string { 1417 if v, ok := PathSubscriptionTopicRevMap[e]; ok { 1418 return v 1419 } 1420 return fmt.Sprintf("%v", int(e)) 1421 } 1422 1423 type DownloadInfo struct { 1424 DownloadID string `codec:"downloadID" json:"downloadID"` 1425 Path KBFSPath `codec:"path" json:"path"` 1426 Filename string `codec:"filename" json:"filename"` 1427 StartTime Time `codec:"startTime" json:"startTime"` 1428 IsRegularDownload bool `codec:"isRegularDownload" json:"isRegularDownload"` 1429 } 1430 1431 func (o DownloadInfo) DeepCopy() DownloadInfo { 1432 return DownloadInfo{ 1433 DownloadID: o.DownloadID, 1434 Path: o.Path.DeepCopy(), 1435 Filename: o.Filename, 1436 StartTime: o.StartTime.DeepCopy(), 1437 IsRegularDownload: o.IsRegularDownload, 1438 } 1439 } 1440 1441 type DownloadState struct { 1442 DownloadID string `codec:"downloadID" json:"downloadID"` 1443 Progress float64 `codec:"progress" json:"progress"` 1444 EndEstimate Time `codec:"endEstimate" json:"endEstimate"` 1445 LocalPath string `codec:"localPath" json:"localPath"` 1446 Error string `codec:"error" json:"error"` 1447 Done bool `codec:"done" json:"done"` 1448 Canceled bool `codec:"canceled" json:"canceled"` 1449 } 1450 1451 func (o DownloadState) DeepCopy() DownloadState { 1452 return DownloadState{ 1453 DownloadID: o.DownloadID, 1454 Progress: o.Progress, 1455 EndEstimate: o.EndEstimate.DeepCopy(), 1456 LocalPath: o.LocalPath, 1457 Error: o.Error, 1458 Done: o.Done, 1459 Canceled: o.Canceled, 1460 } 1461 } 1462 1463 type DownloadStatus struct { 1464 RegularDownloadIDs []string `codec:"regularDownloadIDs" json:"regularDownloadIDs"` 1465 States []DownloadState `codec:"states" json:"states"` 1466 } 1467 1468 func (o DownloadStatus) DeepCopy() DownloadStatus { 1469 return DownloadStatus{ 1470 RegularDownloadIDs: (func(x []string) []string { 1471 if x == nil { 1472 return nil 1473 } 1474 ret := make([]string, len(x)) 1475 for i, v := range x { 1476 vCopy := v 1477 ret[i] = vCopy 1478 } 1479 return ret 1480 })(o.RegularDownloadIDs), 1481 States: (func(x []DownloadState) []DownloadState { 1482 if x == nil { 1483 return nil 1484 } 1485 ret := make([]DownloadState, len(x)) 1486 for i, v := range x { 1487 vCopy := v.DeepCopy() 1488 ret[i] = vCopy 1489 } 1490 return ret 1491 })(o.States), 1492 } 1493 } 1494 1495 type UploadState struct { 1496 UploadID string `codec:"uploadID" json:"uploadID"` 1497 TargetPath KBFSPath `codec:"targetPath" json:"targetPath"` 1498 Error *string `codec:"error,omitempty" json:"error,omitempty"` 1499 Canceled bool `codec:"canceled" json:"canceled"` 1500 } 1501 1502 func (o UploadState) DeepCopy() UploadState { 1503 return UploadState{ 1504 UploadID: o.UploadID, 1505 TargetPath: o.TargetPath.DeepCopy(), 1506 Error: (func(x *string) *string { 1507 if x == nil { 1508 return nil 1509 } 1510 tmp := (*x) 1511 return &tmp 1512 })(o.Error), 1513 Canceled: o.Canceled, 1514 } 1515 } 1516 1517 type FilesTabBadge int 1518 1519 const ( 1520 FilesTabBadge_NONE FilesTabBadge = 0 1521 FilesTabBadge_UPLOADING_STUCK FilesTabBadge = 1 1522 FilesTabBadge_AWAITING_UPLOAD FilesTabBadge = 2 1523 FilesTabBadge_UPLOADING FilesTabBadge = 3 1524 ) 1525 1526 func (o FilesTabBadge) DeepCopy() FilesTabBadge { return o } 1527 1528 var FilesTabBadgeMap = map[string]FilesTabBadge{ 1529 "NONE": 0, 1530 "UPLOADING_STUCK": 1, 1531 "AWAITING_UPLOAD": 2, 1532 "UPLOADING": 3, 1533 } 1534 1535 var FilesTabBadgeRevMap = map[FilesTabBadge]string{ 1536 0: "NONE", 1537 1: "UPLOADING_STUCK", 1538 2: "AWAITING_UPLOAD", 1539 3: "UPLOADING", 1540 } 1541 1542 func (e FilesTabBadge) String() string { 1543 if v, ok := FilesTabBadgeRevMap[e]; ok { 1544 return v 1545 } 1546 return fmt.Sprintf("%v", int(e)) 1547 } 1548 1549 type GUIViewType int 1550 1551 const ( 1552 GUIViewType_DEFAULT GUIViewType = 0 1553 GUIViewType_TEXT GUIViewType = 1 1554 GUIViewType_IMAGE GUIViewType = 2 1555 GUIViewType_AUDIO GUIViewType = 3 1556 GUIViewType_VIDEO GUIViewType = 4 1557 GUIViewType_PDF GUIViewType = 5 1558 ) 1559 1560 func (o GUIViewType) DeepCopy() GUIViewType { return o } 1561 1562 var GUIViewTypeMap = map[string]GUIViewType{ 1563 "DEFAULT": 0, 1564 "TEXT": 1, 1565 "IMAGE": 2, 1566 "AUDIO": 3, 1567 "VIDEO": 4, 1568 "PDF": 5, 1569 } 1570 1571 var GUIViewTypeRevMap = map[GUIViewType]string{ 1572 0: "DEFAULT", 1573 1: "TEXT", 1574 2: "IMAGE", 1575 3: "AUDIO", 1576 4: "VIDEO", 1577 5: "PDF", 1578 } 1579 1580 func (e GUIViewType) String() string { 1581 if v, ok := GUIViewTypeRevMap[e]; ok { 1582 return v 1583 } 1584 return fmt.Sprintf("%v", int(e)) 1585 } 1586 1587 type GUIFileContext struct { 1588 ViewType GUIViewType `codec:"viewType" json:"viewType"` 1589 ContentType string `codec:"contentType" json:"contentType"` 1590 Url string `codec:"url" json:"url"` 1591 } 1592 1593 func (o GUIFileContext) DeepCopy() GUIFileContext { 1594 return GUIFileContext{ 1595 ViewType: o.ViewType.DeepCopy(), 1596 ContentType: o.ContentType, 1597 Url: o.Url, 1598 } 1599 } 1600 1601 type SimpleFSSearchHit struct { 1602 Path string `codec:"path" json:"path"` 1603 } 1604 1605 func (o SimpleFSSearchHit) DeepCopy() SimpleFSSearchHit { 1606 return SimpleFSSearchHit{ 1607 Path: o.Path, 1608 } 1609 } 1610 1611 type SimpleFSSearchResults struct { 1612 Hits []SimpleFSSearchHit `codec:"hits" json:"hits"` 1613 NextResult int `codec:"nextResult" json:"nextResult"` 1614 } 1615 1616 func (o SimpleFSSearchResults) DeepCopy() SimpleFSSearchResults { 1617 return SimpleFSSearchResults{ 1618 Hits: (func(x []SimpleFSSearchHit) []SimpleFSSearchHit { 1619 if x == nil { 1620 return nil 1621 } 1622 ret := make([]SimpleFSSearchHit, len(x)) 1623 for i, v := range x { 1624 vCopy := v.DeepCopy() 1625 ret[i] = vCopy 1626 } 1627 return ret 1628 })(o.Hits), 1629 NextResult: o.NextResult, 1630 } 1631 } 1632 1633 type IndexProgressRecord struct { 1634 EndEstimate Time `codec:"endEstimate" json:"endEstimate"` 1635 BytesTotal int64 `codec:"bytesTotal" json:"bytesTotal"` 1636 BytesSoFar int64 `codec:"bytesSoFar" json:"bytesSoFar"` 1637 } 1638 1639 func (o IndexProgressRecord) DeepCopy() IndexProgressRecord { 1640 return IndexProgressRecord{ 1641 EndEstimate: o.EndEstimate.DeepCopy(), 1642 BytesTotal: o.BytesTotal, 1643 BytesSoFar: o.BytesSoFar, 1644 } 1645 } 1646 1647 type SimpleFSIndexProgress struct { 1648 OverallProgress IndexProgressRecord `codec:"overallProgress" json:"overallProgress"` 1649 CurrFolder Folder `codec:"currFolder" json:"currFolder"` 1650 CurrProgress IndexProgressRecord `codec:"currProgress" json:"currProgress"` 1651 FoldersLeft []Folder `codec:"foldersLeft" json:"foldersLeft"` 1652 } 1653 1654 func (o SimpleFSIndexProgress) DeepCopy() SimpleFSIndexProgress { 1655 return SimpleFSIndexProgress{ 1656 OverallProgress: o.OverallProgress.DeepCopy(), 1657 CurrFolder: o.CurrFolder.DeepCopy(), 1658 CurrProgress: o.CurrProgress.DeepCopy(), 1659 FoldersLeft: (func(x []Folder) []Folder { 1660 if x == nil { 1661 return nil 1662 } 1663 ret := make([]Folder, len(x)) 1664 for i, v := range x { 1665 vCopy := v.DeepCopy() 1666 ret[i] = vCopy 1667 } 1668 return ret 1669 })(o.FoldersLeft), 1670 } 1671 } 1672 1673 type SimpleFSArchiveJobDesc struct { 1674 JobID string `codec:"jobID" json:"jobID"` 1675 KbfsPathWithRevision KBFSArchivedPath `codec:"kbfsPathWithRevision" json:"kbfsPathWithRevision"` 1676 OverwriteZip bool `codec:"overwriteZip" json:"overwriteZip"` 1677 StartTime Time `codec:"startTime" json:"startTime"` 1678 StagingPath string `codec:"stagingPath" json:"stagingPath"` 1679 TargetName string `codec:"targetName" json:"targetName"` 1680 ZipFilePath string `codec:"zipFilePath" json:"zipFilePath"` 1681 } 1682 1683 func (o SimpleFSArchiveJobDesc) DeepCopy() SimpleFSArchiveJobDesc { 1684 return SimpleFSArchiveJobDesc{ 1685 JobID: o.JobID, 1686 KbfsPathWithRevision: o.KbfsPathWithRevision.DeepCopy(), 1687 OverwriteZip: o.OverwriteZip, 1688 StartTime: o.StartTime.DeepCopy(), 1689 StagingPath: o.StagingPath, 1690 TargetName: o.TargetName, 1691 ZipFilePath: o.ZipFilePath, 1692 } 1693 } 1694 1695 type SimpleFSFileArchiveState int 1696 1697 const ( 1698 SimpleFSFileArchiveState_ToDo SimpleFSFileArchiveState = 0 1699 SimpleFSFileArchiveState_InProgress SimpleFSFileArchiveState = 1 1700 SimpleFSFileArchiveState_Complete SimpleFSFileArchiveState = 2 1701 SimpleFSFileArchiveState_Skipped SimpleFSFileArchiveState = 3 1702 ) 1703 1704 func (o SimpleFSFileArchiveState) DeepCopy() SimpleFSFileArchiveState { return o } 1705 1706 var SimpleFSFileArchiveStateMap = map[string]SimpleFSFileArchiveState{ 1707 "ToDo": 0, 1708 "InProgress": 1, 1709 "Complete": 2, 1710 "Skipped": 3, 1711 } 1712 1713 var SimpleFSFileArchiveStateRevMap = map[SimpleFSFileArchiveState]string{ 1714 0: "ToDo", 1715 1: "InProgress", 1716 2: "Complete", 1717 3: "Skipped", 1718 } 1719 1720 func (e SimpleFSFileArchiveState) String() string { 1721 if v, ok := SimpleFSFileArchiveStateRevMap[e]; ok { 1722 return v 1723 } 1724 return fmt.Sprintf("%v", int(e)) 1725 } 1726 1727 type SimpleFSArchiveFile struct { 1728 State SimpleFSFileArchiveState `codec:"state" json:"state"` 1729 DirentType DirentType `codec:"direntType" json:"direntType"` 1730 Sha256SumHex string `codec:"sha256SumHex" json:"sha256SumHex"` 1731 } 1732 1733 func (o SimpleFSArchiveFile) DeepCopy() SimpleFSArchiveFile { 1734 return SimpleFSArchiveFile{ 1735 State: o.State.DeepCopy(), 1736 DirentType: o.DirentType.DeepCopy(), 1737 Sha256SumHex: o.Sha256SumHex, 1738 } 1739 } 1740 1741 type SimpleFSArchiveJobState struct { 1742 Desc SimpleFSArchiveJobDesc `codec:"desc" json:"desc"` 1743 Manifest map[string]SimpleFSArchiveFile `codec:"manifest" json:"manifest"` 1744 Phase SimpleFSArchiveJobPhase `codec:"phase" json:"phase"` 1745 BytesTotal int64 `codec:"bytesTotal" json:"bytesTotal"` 1746 BytesCopied int64 `codec:"bytesCopied" json:"bytesCopied"` 1747 BytesZipped int64 `codec:"bytesZipped" json:"bytesZipped"` 1748 } 1749 1750 func (o SimpleFSArchiveJobState) DeepCopy() SimpleFSArchiveJobState { 1751 return SimpleFSArchiveJobState{ 1752 Desc: o.Desc.DeepCopy(), 1753 Manifest: (func(x map[string]SimpleFSArchiveFile) map[string]SimpleFSArchiveFile { 1754 if x == nil { 1755 return nil 1756 } 1757 ret := make(map[string]SimpleFSArchiveFile, len(x)) 1758 for k, v := range x { 1759 kCopy := k 1760 vCopy := v.DeepCopy() 1761 ret[kCopy] = vCopy 1762 } 1763 return ret 1764 })(o.Manifest), 1765 Phase: o.Phase.DeepCopy(), 1766 BytesTotal: o.BytesTotal, 1767 BytesCopied: o.BytesCopied, 1768 BytesZipped: o.BytesZipped, 1769 } 1770 } 1771 1772 type SimpleFSArchiveJobPhase int 1773 1774 const ( 1775 SimpleFSArchiveJobPhase_Queued SimpleFSArchiveJobPhase = 0 1776 SimpleFSArchiveJobPhase_Indexing SimpleFSArchiveJobPhase = 1 1777 SimpleFSArchiveJobPhase_Indexed SimpleFSArchiveJobPhase = 2 1778 SimpleFSArchiveJobPhase_Copying SimpleFSArchiveJobPhase = 3 1779 SimpleFSArchiveJobPhase_Copied SimpleFSArchiveJobPhase = 4 1780 SimpleFSArchiveJobPhase_Zipping SimpleFSArchiveJobPhase = 5 1781 SimpleFSArchiveJobPhase_Done SimpleFSArchiveJobPhase = 6 1782 ) 1783 1784 func (o SimpleFSArchiveJobPhase) DeepCopy() SimpleFSArchiveJobPhase { return o } 1785 1786 var SimpleFSArchiveJobPhaseMap = map[string]SimpleFSArchiveJobPhase{ 1787 "Queued": 0, 1788 "Indexing": 1, 1789 "Indexed": 2, 1790 "Copying": 3, 1791 "Copied": 4, 1792 "Zipping": 5, 1793 "Done": 6, 1794 } 1795 1796 var SimpleFSArchiveJobPhaseRevMap = map[SimpleFSArchiveJobPhase]string{ 1797 0: "Queued", 1798 1: "Indexing", 1799 2: "Indexed", 1800 3: "Copying", 1801 4: "Copied", 1802 5: "Zipping", 1803 6: "Done", 1804 } 1805 1806 func (e SimpleFSArchiveJobPhase) String() string { 1807 if v, ok := SimpleFSArchiveJobPhaseRevMap[e]; ok { 1808 return v 1809 } 1810 return fmt.Sprintf("%v", int(e)) 1811 } 1812 1813 type SimpleFSArchiveState struct { 1814 Jobs map[string]SimpleFSArchiveJobState `codec:"jobs" json:"jobs"` 1815 LastUpdated Time `codec:"lastUpdated" json:"lastUpdated"` 1816 } 1817 1818 func (o SimpleFSArchiveState) DeepCopy() SimpleFSArchiveState { 1819 return SimpleFSArchiveState{ 1820 Jobs: (func(x map[string]SimpleFSArchiveJobState) map[string]SimpleFSArchiveJobState { 1821 if x == nil { 1822 return nil 1823 } 1824 ret := make(map[string]SimpleFSArchiveJobState, len(x)) 1825 for k, v := range x { 1826 kCopy := k 1827 vCopy := v.DeepCopy() 1828 ret[kCopy] = vCopy 1829 } 1830 return ret 1831 })(o.Jobs), 1832 LastUpdated: o.LastUpdated.DeepCopy(), 1833 } 1834 } 1835 1836 type SimpleFSArchiveJobErrorState struct { 1837 Error string `codec:"error" json:"error"` 1838 NextRetry Time `codec:"nextRetry" json:"nextRetry"` 1839 } 1840 1841 func (o SimpleFSArchiveJobErrorState) DeepCopy() SimpleFSArchiveJobErrorState { 1842 return SimpleFSArchiveJobErrorState{ 1843 Error: o.Error, 1844 NextRetry: o.NextRetry.DeepCopy(), 1845 } 1846 } 1847 1848 type SimpleFSArchiveJobStatus struct { 1849 Desc SimpleFSArchiveJobDesc `codec:"desc" json:"desc"` 1850 Phase SimpleFSArchiveJobPhase `codec:"phase" json:"phase"` 1851 TodoCount int `codec:"todoCount" json:"todoCount"` 1852 InProgressCount int `codec:"inProgressCount" json:"inProgressCount"` 1853 CompleteCount int `codec:"completeCount" json:"completeCount"` 1854 SkippedCount int `codec:"skippedCount" json:"skippedCount"` 1855 TotalCount int `codec:"totalCount" json:"totalCount"` 1856 BytesTotal int64 `codec:"bytesTotal" json:"bytesTotal"` 1857 BytesCopied int64 `codec:"bytesCopied" json:"bytesCopied"` 1858 BytesZipped int64 `codec:"bytesZipped" json:"bytesZipped"` 1859 Error *SimpleFSArchiveJobErrorState `codec:"error,omitempty" json:"error,omitempty"` 1860 } 1861 1862 func (o SimpleFSArchiveJobStatus) DeepCopy() SimpleFSArchiveJobStatus { 1863 return SimpleFSArchiveJobStatus{ 1864 Desc: o.Desc.DeepCopy(), 1865 Phase: o.Phase.DeepCopy(), 1866 TodoCount: o.TodoCount, 1867 InProgressCount: o.InProgressCount, 1868 CompleteCount: o.CompleteCount, 1869 SkippedCount: o.SkippedCount, 1870 TotalCount: o.TotalCount, 1871 BytesTotal: o.BytesTotal, 1872 BytesCopied: o.BytesCopied, 1873 BytesZipped: o.BytesZipped, 1874 Error: (func(x *SimpleFSArchiveJobErrorState) *SimpleFSArchiveJobErrorState { 1875 if x == nil { 1876 return nil 1877 } 1878 tmp := (*x).DeepCopy() 1879 return &tmp 1880 })(o.Error), 1881 } 1882 } 1883 1884 type SimpleFSArchiveStatus struct { 1885 Jobs []SimpleFSArchiveJobStatus `codec:"jobs" json:"jobs"` 1886 LastUpdated Time `codec:"lastUpdated" json:"lastUpdated"` 1887 } 1888 1889 func (o SimpleFSArchiveStatus) DeepCopy() SimpleFSArchiveStatus { 1890 return SimpleFSArchiveStatus{ 1891 Jobs: (func(x []SimpleFSArchiveJobStatus) []SimpleFSArchiveJobStatus { 1892 if x == nil { 1893 return nil 1894 } 1895 ret := make([]SimpleFSArchiveJobStatus, len(x)) 1896 for i, v := range x { 1897 vCopy := v.DeepCopy() 1898 ret[i] = vCopy 1899 } 1900 return ret 1901 })(o.Jobs), 1902 LastUpdated: o.LastUpdated.DeepCopy(), 1903 } 1904 } 1905 1906 type SimpleFSArchiveJobFreshness struct { 1907 CurrentTLFRevision KBFSRevision `codec:"currentTLFRevision" json:"currentTLFRevision"` 1908 } 1909 1910 func (o SimpleFSArchiveJobFreshness) DeepCopy() SimpleFSArchiveJobFreshness { 1911 return SimpleFSArchiveJobFreshness{ 1912 CurrentTLFRevision: o.CurrentTLFRevision.DeepCopy(), 1913 } 1914 } 1915 1916 type SimpleFSListArg struct { 1917 OpID OpID `codec:"opID" json:"opID"` 1918 Path Path `codec:"path" json:"path"` 1919 Filter ListFilter `codec:"filter" json:"filter"` 1920 RefreshSubscription bool `codec:"refreshSubscription" json:"refreshSubscription"` 1921 } 1922 1923 type SimpleFSListRecursiveArg struct { 1924 OpID OpID `codec:"opID" json:"opID"` 1925 Path Path `codec:"path" json:"path"` 1926 Filter ListFilter `codec:"filter" json:"filter"` 1927 RefreshSubscription bool `codec:"refreshSubscription" json:"refreshSubscription"` 1928 } 1929 1930 type SimpleFSListRecursiveToDepthArg struct { 1931 OpID OpID `codec:"opID" json:"opID"` 1932 Path Path `codec:"path" json:"path"` 1933 Filter ListFilter `codec:"filter" json:"filter"` 1934 RefreshSubscription bool `codec:"refreshSubscription" json:"refreshSubscription"` 1935 Depth int `codec:"depth" json:"depth"` 1936 } 1937 1938 type SimpleFSReadListArg struct { 1939 OpID OpID `codec:"opID" json:"opID"` 1940 } 1941 1942 type SimpleFSCopyArg struct { 1943 OpID OpID `codec:"opID" json:"opID"` 1944 Src Path `codec:"src" json:"src"` 1945 Dest Path `codec:"dest" json:"dest"` 1946 OverwriteExistingFiles bool `codec:"overwriteExistingFiles" json:"overwriteExistingFiles"` 1947 } 1948 1949 type SimpleFSSymlinkArg struct { 1950 Target string `codec:"target" json:"target"` 1951 Link Path `codec:"link" json:"link"` 1952 } 1953 1954 type SimpleFSCopyRecursiveArg struct { 1955 OpID OpID `codec:"opID" json:"opID"` 1956 Src Path `codec:"src" json:"src"` 1957 Dest Path `codec:"dest" json:"dest"` 1958 OverwriteExistingFiles bool `codec:"overwriteExistingFiles" json:"overwriteExistingFiles"` 1959 } 1960 1961 type SimpleFSMoveArg struct { 1962 OpID OpID `codec:"opID" json:"opID"` 1963 Src Path `codec:"src" json:"src"` 1964 Dest Path `codec:"dest" json:"dest"` 1965 OverwriteExistingFiles bool `codec:"overwriteExistingFiles" json:"overwriteExistingFiles"` 1966 } 1967 1968 type SimpleFSRenameArg struct { 1969 Src Path `codec:"src" json:"src"` 1970 Dest Path `codec:"dest" json:"dest"` 1971 } 1972 1973 type SimpleFSOpenArg struct { 1974 OpID OpID `codec:"opID" json:"opID"` 1975 Dest Path `codec:"dest" json:"dest"` 1976 Flags OpenFlags `codec:"flags" json:"flags"` 1977 } 1978 1979 type SimpleFSSetStatArg struct { 1980 Dest Path `codec:"dest" json:"dest"` 1981 Flag DirentType `codec:"flag" json:"flag"` 1982 } 1983 1984 type SimpleFSReadArg struct { 1985 OpID OpID `codec:"opID" json:"opID"` 1986 Offset int64 `codec:"offset" json:"offset"` 1987 Size int `codec:"size" json:"size"` 1988 } 1989 1990 type SimpleFSWriteArg struct { 1991 OpID OpID `codec:"opID" json:"opID"` 1992 Offset int64 `codec:"offset" json:"offset"` 1993 Content []byte `codec:"content" json:"content"` 1994 } 1995 1996 type SimpleFSRemoveArg struct { 1997 OpID OpID `codec:"opID" json:"opID"` 1998 Path Path `codec:"path" json:"path"` 1999 Recursive bool `codec:"recursive" json:"recursive"` 2000 } 2001 2002 type SimpleFSStatArg struct { 2003 Path Path `codec:"path" json:"path"` 2004 RefreshSubscription bool `codec:"refreshSubscription" json:"refreshSubscription"` 2005 } 2006 2007 type SimpleFSGetRevisionsArg struct { 2008 OpID OpID `codec:"opID" json:"opID"` 2009 Path Path `codec:"path" json:"path"` 2010 SpanType RevisionSpanType `codec:"spanType" json:"spanType"` 2011 } 2012 2013 type SimpleFSReadRevisionsArg struct { 2014 OpID OpID `codec:"opID" json:"opID"` 2015 } 2016 2017 type SimpleFSMakeOpidArg struct { 2018 } 2019 2020 type SimpleFSCloseArg struct { 2021 OpID OpID `codec:"opID" json:"opID"` 2022 } 2023 2024 type SimpleFSCancelArg struct { 2025 OpID OpID `codec:"opID" json:"opID"` 2026 } 2027 2028 type SimpleFSCheckArg struct { 2029 OpID OpID `codec:"opID" json:"opID"` 2030 } 2031 2032 type SimpleFSGetOpsArg struct { 2033 } 2034 2035 type SimpleFSWaitArg struct { 2036 OpID OpID `codec:"opID" json:"opID"` 2037 } 2038 2039 type SimpleFSDumpDebuggingInfoArg struct { 2040 } 2041 2042 type SimpleFSClearConflictStateArg struct { 2043 Path Path `codec:"path" json:"path"` 2044 } 2045 2046 type SimpleFSFinishResolvingConflictArg struct { 2047 Path Path `codec:"path" json:"path"` 2048 } 2049 2050 type SimpleFSForceStuckConflictArg struct { 2051 Path Path `codec:"path" json:"path"` 2052 } 2053 2054 type SimpleFSSyncStatusArg struct { 2055 Filter ListFilter `codec:"filter" json:"filter"` 2056 } 2057 2058 type SimpleFSUserEditHistoryArg struct { 2059 } 2060 2061 type SimpleFSFolderEditHistoryArg struct { 2062 Path Path `codec:"path" json:"path"` 2063 } 2064 2065 type SimpleFSListFavoritesArg struct { 2066 } 2067 2068 type SimpleFSGetUserQuotaUsageArg struct { 2069 } 2070 2071 type SimpleFSGetTeamQuotaUsageArg struct { 2072 TeamName TeamName `codec:"teamName" json:"teamName"` 2073 } 2074 2075 type SimpleFSResetArg struct { 2076 Path Path `codec:"path" json:"path"` 2077 TlfID string `codec:"tlfID" json:"tlfID"` 2078 } 2079 2080 type SimpleFSFolderSyncConfigAndStatusArg struct { 2081 Path Path `codec:"path" json:"path"` 2082 } 2083 2084 type SimpleFSSetFolderSyncConfigArg struct { 2085 Path Path `codec:"path" json:"path"` 2086 Config FolderSyncConfig `codec:"config" json:"config"` 2087 } 2088 2089 type SimpleFSSyncConfigAndStatusArg struct { 2090 IdentifyBehavior *TLFIdentifyBehavior `codec:"identifyBehavior,omitempty" json:"identifyBehavior,omitempty"` 2091 } 2092 2093 type SimpleFSGetFolderArg struct { 2094 Path KBFSPath `codec:"path" json:"path"` 2095 } 2096 2097 type SimpleFSGetOnlineStatusArg struct { 2098 ClientID string `codec:"clientID" json:"clientID"` 2099 } 2100 2101 type SimpleFSCheckReachabilityArg struct { 2102 } 2103 2104 type SimpleFSSetDebugLevelArg struct { 2105 Level string `codec:"level" json:"level"` 2106 } 2107 2108 type SimpleFSSettingsArg struct { 2109 } 2110 2111 type SimpleFSSetNotificationThresholdArg struct { 2112 Threshold int64 `codec:"threshold" json:"threshold"` 2113 } 2114 2115 type SimpleFSSetSfmiBannerDismissedArg struct { 2116 Dismissed bool `codec:"dismissed" json:"dismissed"` 2117 } 2118 2119 type SimpleFSSetSyncOnCellularArg struct { 2120 SyncOnCellular bool `codec:"syncOnCellular" json:"syncOnCellular"` 2121 } 2122 2123 type SimpleFSObfuscatePathArg struct { 2124 Path Path `codec:"path" json:"path"` 2125 } 2126 2127 type SimpleFSDeobfuscatePathArg struct { 2128 Path Path `codec:"path" json:"path"` 2129 } 2130 2131 type SimpleFSGetStatsArg struct { 2132 } 2133 2134 type SimpleFSSubscribePathArg struct { 2135 IdentifyBehavior *TLFIdentifyBehavior `codec:"identifyBehavior,omitempty" json:"identifyBehavior,omitempty"` 2136 ClientID string `codec:"clientID" json:"clientID"` 2137 SubscriptionID string `codec:"subscriptionID" json:"subscriptionID"` 2138 KbfsPath string `codec:"kbfsPath" json:"kbfsPath"` 2139 Topic PathSubscriptionTopic `codec:"topic" json:"topic"` 2140 DeduplicateIntervalSecond int `codec:"deduplicateIntervalSecond" json:"deduplicateIntervalSecond"` 2141 } 2142 2143 type SimpleFSSubscribeNonPathArg struct { 2144 IdentifyBehavior *TLFIdentifyBehavior `codec:"identifyBehavior,omitempty" json:"identifyBehavior,omitempty"` 2145 ClientID string `codec:"clientID" json:"clientID"` 2146 SubscriptionID string `codec:"subscriptionID" json:"subscriptionID"` 2147 Topic SubscriptionTopic `codec:"topic" json:"topic"` 2148 DeduplicateIntervalSecond int `codec:"deduplicateIntervalSecond" json:"deduplicateIntervalSecond"` 2149 } 2150 2151 type SimpleFSUnsubscribeArg struct { 2152 IdentifyBehavior *TLFIdentifyBehavior `codec:"identifyBehavior,omitempty" json:"identifyBehavior,omitempty"` 2153 ClientID string `codec:"clientID" json:"clientID"` 2154 SubscriptionID string `codec:"subscriptionID" json:"subscriptionID"` 2155 } 2156 2157 type SimpleFSStartDownloadArg struct { 2158 Path KBFSPath `codec:"path" json:"path"` 2159 IsRegularDownload bool `codec:"isRegularDownload" json:"isRegularDownload"` 2160 } 2161 2162 type SimpleFSGetDownloadInfoArg struct { 2163 DownloadID string `codec:"downloadID" json:"downloadID"` 2164 } 2165 2166 type SimpleFSGetDownloadStatusArg struct { 2167 } 2168 2169 type SimpleFSCancelDownloadArg struct { 2170 DownloadID string `codec:"downloadID" json:"downloadID"` 2171 } 2172 2173 type SimpleFSDismissDownloadArg struct { 2174 DownloadID string `codec:"downloadID" json:"downloadID"` 2175 } 2176 2177 type SimpleFSConfigureDownloadArg struct { 2178 CacheDirOverride string `codec:"cacheDirOverride" json:"cacheDirOverride"` 2179 DownloadDirOverride string `codec:"downloadDirOverride" json:"downloadDirOverride"` 2180 } 2181 2182 type SimpleFSMakeTempDirForUploadArg struct { 2183 } 2184 2185 type SimpleFSStartUploadArg struct { 2186 SourceLocalPath string `codec:"sourceLocalPath" json:"sourceLocalPath"` 2187 TargetParentPath KBFSPath `codec:"targetParentPath" json:"targetParentPath"` 2188 } 2189 2190 type SimpleFSGetUploadStatusArg struct { 2191 } 2192 2193 type SimpleFSCancelUploadArg struct { 2194 UploadID string `codec:"uploadID" json:"uploadID"` 2195 } 2196 2197 type SimpleFSDismissUploadArg struct { 2198 UploadID string `codec:"uploadID" json:"uploadID"` 2199 } 2200 2201 type SimpleFSGetFilesTabBadgeArg struct { 2202 } 2203 2204 type SimpleFSGetGUIFileContextArg struct { 2205 Path KBFSPath `codec:"path" json:"path"` 2206 } 2207 2208 type SimpleFSUserInArg struct { 2209 ClientID string `codec:"clientID" json:"clientID"` 2210 } 2211 2212 type SimpleFSUserOutArg struct { 2213 ClientID string `codec:"clientID" json:"clientID"` 2214 } 2215 2216 type SimpleFSSearchArg struct { 2217 Query string `codec:"query" json:"query"` 2218 NumResults int `codec:"numResults" json:"numResults"` 2219 StartingFrom int `codec:"startingFrom" json:"startingFrom"` 2220 } 2221 2222 type SimpleFSResetIndexArg struct { 2223 } 2224 2225 type SimpleFSGetIndexProgressArg struct { 2226 } 2227 2228 type SimpleFSCancelJournalUploadsArg struct { 2229 Path KBFSPath `codec:"path" json:"path"` 2230 } 2231 2232 type SimpleFSArchiveStartArg struct { 2233 KbfsPath KBFSPath `codec:"kbfsPath" json:"kbfsPath"` 2234 OutputPath string `codec:"outputPath" json:"outputPath"` 2235 OverwriteZip bool `codec:"overwriteZip" json:"overwriteZip"` 2236 } 2237 2238 type SimpleFSArchiveCancelOrDismissJobArg struct { 2239 JobID string `codec:"jobID" json:"jobID"` 2240 } 2241 2242 type SimpleFSGetArchiveStatusArg struct { 2243 } 2244 2245 type SimpleFSGetArchiveJobFreshnessArg struct { 2246 JobID string `codec:"jobID" json:"jobID"` 2247 } 2248 2249 type SimpleFSInterface interface { 2250 // Begin list of items in directory at path. 2251 // Retrieve results with readList(). 2252 // Can be a single file to get flags/status. 2253 // If `refreshSubscription` is true and the path is a KBFS path, simpleFS 2254 // will begin sending `FSPathUpdated` notifications for the for the 2255 // corresponding TLF, until another call refreshes the subscription on a 2256 // different TLF. 2257 SimpleFSList(context.Context, SimpleFSListArg) error 2258 // Begin recursive list of items in directory at path. 2259 // If `refreshSubscription` is true and the path is a KBFS path, simpleFS 2260 // will begin sending `FSPathUpdated` notifications for the for the 2261 // corresponding TLF, until another call refreshes the subscription on a 2262 // different TLF. 2263 SimpleFSListRecursive(context.Context, SimpleFSListRecursiveArg) error 2264 // Begin recursive list of items in directory at path up to a given depth 2265 SimpleFSListRecursiveToDepth(context.Context, SimpleFSListRecursiveToDepthArg) error 2266 // Get list of Paths in progress. Can indicate status of pending 2267 // to get more entries. 2268 SimpleFSReadList(context.Context, OpID) (SimpleFSListResult, error) 2269 // Begin copy of file or directory. 2270 SimpleFSCopy(context.Context, SimpleFSCopyArg) error 2271 // Make a symlink of file or directory 2272 SimpleFSSymlink(context.Context, SimpleFSSymlinkArg) error 2273 // Begin recursive copy of directory 2274 // 2275 // overwriteExistingFiles controls whether an existing file from `src` will 2276 // overwrite a file with the same name in `dest`; if `false`, an error will be 2277 // returned in that case. For directories that share a name, the copy will 2278 // continue recursively into the directory without causing an error. 2279 SimpleFSCopyRecursive(context.Context, SimpleFSCopyRecursiveArg) error 2280 // Begin move of file or directory, from/to KBFS only 2281 SimpleFSMove(context.Context, SimpleFSMoveArg) error 2282 // Rename file or directory, KBFS side only 2283 SimpleFSRename(context.Context, SimpleFSRenameArg) error 2284 // Create/open a file and leave it open 2285 // or create a directory 2286 // Files must be closed afterwards. 2287 SimpleFSOpen(context.Context, SimpleFSOpenArg) error 2288 // Set/clear file bits - only executable for now 2289 SimpleFSSetStat(context.Context, SimpleFSSetStatArg) error 2290 // Read (possibly partial) contents of open file, 2291 // up to the amount specified by size. 2292 // Repeat until zero bytes are returned or error. 2293 // If size is zero, read an arbitrary amount. 2294 SimpleFSRead(context.Context, SimpleFSReadArg) (FileContent, error) 2295 // Append content to opened file. 2296 // May be repeated until OpID is closed. 2297 SimpleFSWrite(context.Context, SimpleFSWriteArg) error 2298 // Remove file or directory from filesystem 2299 SimpleFSRemove(context.Context, SimpleFSRemoveArg) error 2300 // Get info about file 2301 SimpleFSStat(context.Context, SimpleFSStatArg) (Dirent, error) 2302 // Get revision info for a directory entry 2303 SimpleFSGetRevisions(context.Context, SimpleFSGetRevisionsArg) error 2304 // Get list of revisions in progress. Can indicate status of pending 2305 // to get more revisions. 2306 SimpleFSReadRevisions(context.Context, OpID) (GetRevisionsResult, error) 2307 // Convenience helper for generating new random value 2308 SimpleFSMakeOpid(context.Context) (OpID, error) 2309 // Close OpID, cancels any pending operation. 2310 // Must be called after list/copy/remove 2311 SimpleFSClose(context.Context, OpID) error 2312 // Cancels a running operation, like copy. 2313 SimpleFSCancel(context.Context, OpID) error 2314 // Check progress of pending operation 2315 SimpleFSCheck(context.Context, OpID) (OpProgress, error) 2316 // Get all the outstanding operations 2317 SimpleFSGetOps(context.Context) ([]OpDescription, error) 2318 // Blocking wait for the pending operation to finish 2319 SimpleFSWait(context.Context, OpID) error 2320 // Instructs KBFS to dump debugging info into its logs. 2321 SimpleFSDumpDebuggingInfo(context.Context) error 2322 SimpleFSClearConflictState(context.Context, Path) error 2323 SimpleFSFinishResolvingConflict(context.Context, Path) error 2324 // Force a TLF into a stuck conflict state (for testing). 2325 SimpleFSForceStuckConflict(context.Context, Path) error 2326 // Get sync status. 2327 SimpleFSSyncStatus(context.Context, ListFilter) (FSSyncStatus, error) 2328 // simpleFSUserEditHistory returns edit histories of TLFs that the logged-in 2329 // user can access. Each returned history is corresponds to a unique 2330 // writer-TLF pair. They are in descending order by the modification time 2331 // (as recorded by the server) of the most recent edit in each history. 2332 SimpleFSUserEditHistory(context.Context) ([]FSFolderEditHistory, error) 2333 // simpleFSFolderEditHistory returns the edit history for the TLF 2334 // described by `path`, for the most recent writers of that TLF. 2335 // The writers are in descending order by the modification time (as 2336 // recorded by the server) of their most recent edit. 2337 SimpleFSFolderEditHistory(context.Context, Path) (FSFolderEditHistory, error) 2338 // simpleFSListFavorites gets the current favorites, ignored folders, and new 2339 // folders from the KBFS cache. 2340 SimpleFSListFavorites(context.Context) (FavoritesResult, error) 2341 // simpleFSGetUserQuotaUsage returns the quota usage for the logged-in 2342 // user. Any usage includes local journal usage as well. 2343 SimpleFSGetUserQuotaUsage(context.Context) (SimpleFSQuotaUsage, error) 2344 // simpleFSGetTeamQuotaUsage returns the quota usage for the given team, if 2345 // the logged-in user has access to that team. Any usage includes 2346 // local journal usage as well. 2347 SimpleFSGetTeamQuotaUsage(context.Context, TeamName) (SimpleFSQuotaUsage, error) 2348 // simpleFSReset completely resets the KBFS folder referenced in `path`. 2349 // It should only be called after explicit user confirmation. 2350 SimpleFSReset(context.Context, SimpleFSResetArg) error 2351 SimpleFSFolderSyncConfigAndStatus(context.Context, Path) (FolderSyncConfigAndStatus, error) 2352 SimpleFSSetFolderSyncConfig(context.Context, SimpleFSSetFolderSyncConfigArg) error 2353 SimpleFSSyncConfigAndStatus(context.Context, *TLFIdentifyBehavior) (SyncConfigAndStatusRes, error) 2354 SimpleFSGetFolder(context.Context, KBFSPath) (FolderWithFavFlags, error) 2355 SimpleFSGetOnlineStatus(context.Context, string) (KbfsOnlineStatus, error) 2356 SimpleFSCheckReachability(context.Context) error 2357 SimpleFSSetDebugLevel(context.Context, string) error 2358 SimpleFSSettings(context.Context) (FSSettings, error) 2359 SimpleFSSetNotificationThreshold(context.Context, int64) error 2360 SimpleFSSetSfmiBannerDismissed(context.Context, bool) error 2361 SimpleFSSetSyncOnCellular(context.Context, bool) error 2362 SimpleFSObfuscatePath(context.Context, Path) (string, error) 2363 SimpleFSDeobfuscatePath(context.Context, Path) ([]string, error) 2364 SimpleFSGetStats(context.Context) (SimpleFSStats, error) 2365 SimpleFSSubscribePath(context.Context, SimpleFSSubscribePathArg) error 2366 SimpleFSSubscribeNonPath(context.Context, SimpleFSSubscribeNonPathArg) error 2367 SimpleFSUnsubscribe(context.Context, SimpleFSUnsubscribeArg) error 2368 SimpleFSStartDownload(context.Context, SimpleFSStartDownloadArg) (string, error) 2369 SimpleFSGetDownloadInfo(context.Context, string) (DownloadInfo, error) 2370 SimpleFSGetDownloadStatus(context.Context) (DownloadStatus, error) 2371 SimpleFSCancelDownload(context.Context, string) error 2372 SimpleFSDismissDownload(context.Context, string) error 2373 SimpleFSConfigureDownload(context.Context, SimpleFSConfigureDownloadArg) error 2374 SimpleFSMakeTempDirForUpload(context.Context) (string, error) 2375 SimpleFSStartUpload(context.Context, SimpleFSStartUploadArg) (string, error) 2376 SimpleFSGetUploadStatus(context.Context) ([]UploadState, error) 2377 SimpleFSCancelUpload(context.Context, string) error 2378 SimpleFSDismissUpload(context.Context, string) error 2379 SimpleFSGetFilesTabBadge(context.Context) (FilesTabBadge, error) 2380 SimpleFSGetGUIFileContext(context.Context, KBFSPath) (GUIFileContext, error) 2381 SimpleFSUserIn(context.Context, string) error 2382 SimpleFSUserOut(context.Context, string) error 2383 SimpleFSSearch(context.Context, SimpleFSSearchArg) (SimpleFSSearchResults, error) 2384 SimpleFSResetIndex(context.Context) error 2385 SimpleFSGetIndexProgress(context.Context) (SimpleFSIndexProgress, error) 2386 SimpleFSCancelJournalUploads(context.Context, KBFSPath) error 2387 SimpleFSArchiveStart(context.Context, SimpleFSArchiveStartArg) (SimpleFSArchiveJobDesc, error) 2388 SimpleFSArchiveCancelOrDismissJob(context.Context, string) error 2389 SimpleFSGetArchiveStatus(context.Context) (SimpleFSArchiveStatus, error) 2390 SimpleFSGetArchiveJobFreshness(context.Context, string) (SimpleFSArchiveJobFreshness, error) 2391 } 2392 2393 func SimpleFSProtocol(i SimpleFSInterface) rpc.Protocol { 2394 return rpc.Protocol{ 2395 Name: "keybase.1.SimpleFS", 2396 Methods: map[string]rpc.ServeHandlerDescription{ 2397 "simpleFSList": { 2398 MakeArg: func() interface{} { 2399 var ret [1]SimpleFSListArg 2400 return &ret 2401 }, 2402 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2403 typedArgs, ok := args.(*[1]SimpleFSListArg) 2404 if !ok { 2405 err = rpc.NewTypeError((*[1]SimpleFSListArg)(nil), args) 2406 return 2407 } 2408 err = i.SimpleFSList(ctx, typedArgs[0]) 2409 return 2410 }, 2411 }, 2412 "simpleFSListRecursive": { 2413 MakeArg: func() interface{} { 2414 var ret [1]SimpleFSListRecursiveArg 2415 return &ret 2416 }, 2417 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2418 typedArgs, ok := args.(*[1]SimpleFSListRecursiveArg) 2419 if !ok { 2420 err = rpc.NewTypeError((*[1]SimpleFSListRecursiveArg)(nil), args) 2421 return 2422 } 2423 err = i.SimpleFSListRecursive(ctx, typedArgs[0]) 2424 return 2425 }, 2426 }, 2427 "simpleFSListRecursiveToDepth": { 2428 MakeArg: func() interface{} { 2429 var ret [1]SimpleFSListRecursiveToDepthArg 2430 return &ret 2431 }, 2432 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2433 typedArgs, ok := args.(*[1]SimpleFSListRecursiveToDepthArg) 2434 if !ok { 2435 err = rpc.NewTypeError((*[1]SimpleFSListRecursiveToDepthArg)(nil), args) 2436 return 2437 } 2438 err = i.SimpleFSListRecursiveToDepth(ctx, typedArgs[0]) 2439 return 2440 }, 2441 }, 2442 "simpleFSReadList": { 2443 MakeArg: func() interface{} { 2444 var ret [1]SimpleFSReadListArg 2445 return &ret 2446 }, 2447 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2448 typedArgs, ok := args.(*[1]SimpleFSReadListArg) 2449 if !ok { 2450 err = rpc.NewTypeError((*[1]SimpleFSReadListArg)(nil), args) 2451 return 2452 } 2453 ret, err = i.SimpleFSReadList(ctx, typedArgs[0].OpID) 2454 return 2455 }, 2456 }, 2457 "simpleFSCopy": { 2458 MakeArg: func() interface{} { 2459 var ret [1]SimpleFSCopyArg 2460 return &ret 2461 }, 2462 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2463 typedArgs, ok := args.(*[1]SimpleFSCopyArg) 2464 if !ok { 2465 err = rpc.NewTypeError((*[1]SimpleFSCopyArg)(nil), args) 2466 return 2467 } 2468 err = i.SimpleFSCopy(ctx, typedArgs[0]) 2469 return 2470 }, 2471 }, 2472 "simpleFSSymlink": { 2473 MakeArg: func() interface{} { 2474 var ret [1]SimpleFSSymlinkArg 2475 return &ret 2476 }, 2477 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2478 typedArgs, ok := args.(*[1]SimpleFSSymlinkArg) 2479 if !ok { 2480 err = rpc.NewTypeError((*[1]SimpleFSSymlinkArg)(nil), args) 2481 return 2482 } 2483 err = i.SimpleFSSymlink(ctx, typedArgs[0]) 2484 return 2485 }, 2486 }, 2487 "simpleFSCopyRecursive": { 2488 MakeArg: func() interface{} { 2489 var ret [1]SimpleFSCopyRecursiveArg 2490 return &ret 2491 }, 2492 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2493 typedArgs, ok := args.(*[1]SimpleFSCopyRecursiveArg) 2494 if !ok { 2495 err = rpc.NewTypeError((*[1]SimpleFSCopyRecursiveArg)(nil), args) 2496 return 2497 } 2498 err = i.SimpleFSCopyRecursive(ctx, typedArgs[0]) 2499 return 2500 }, 2501 }, 2502 "simpleFSMove": { 2503 MakeArg: func() interface{} { 2504 var ret [1]SimpleFSMoveArg 2505 return &ret 2506 }, 2507 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2508 typedArgs, ok := args.(*[1]SimpleFSMoveArg) 2509 if !ok { 2510 err = rpc.NewTypeError((*[1]SimpleFSMoveArg)(nil), args) 2511 return 2512 } 2513 err = i.SimpleFSMove(ctx, typedArgs[0]) 2514 return 2515 }, 2516 }, 2517 "simpleFSRename": { 2518 MakeArg: func() interface{} { 2519 var ret [1]SimpleFSRenameArg 2520 return &ret 2521 }, 2522 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2523 typedArgs, ok := args.(*[1]SimpleFSRenameArg) 2524 if !ok { 2525 err = rpc.NewTypeError((*[1]SimpleFSRenameArg)(nil), args) 2526 return 2527 } 2528 err = i.SimpleFSRename(ctx, typedArgs[0]) 2529 return 2530 }, 2531 }, 2532 "simpleFSOpen": { 2533 MakeArg: func() interface{} { 2534 var ret [1]SimpleFSOpenArg 2535 return &ret 2536 }, 2537 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2538 typedArgs, ok := args.(*[1]SimpleFSOpenArg) 2539 if !ok { 2540 err = rpc.NewTypeError((*[1]SimpleFSOpenArg)(nil), args) 2541 return 2542 } 2543 err = i.SimpleFSOpen(ctx, typedArgs[0]) 2544 return 2545 }, 2546 }, 2547 "simpleFSSetStat": { 2548 MakeArg: func() interface{} { 2549 var ret [1]SimpleFSSetStatArg 2550 return &ret 2551 }, 2552 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2553 typedArgs, ok := args.(*[1]SimpleFSSetStatArg) 2554 if !ok { 2555 err = rpc.NewTypeError((*[1]SimpleFSSetStatArg)(nil), args) 2556 return 2557 } 2558 err = i.SimpleFSSetStat(ctx, typedArgs[0]) 2559 return 2560 }, 2561 }, 2562 "simpleFSRead": { 2563 MakeArg: func() interface{} { 2564 var ret [1]SimpleFSReadArg 2565 return &ret 2566 }, 2567 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2568 typedArgs, ok := args.(*[1]SimpleFSReadArg) 2569 if !ok { 2570 err = rpc.NewTypeError((*[1]SimpleFSReadArg)(nil), args) 2571 return 2572 } 2573 ret, err = i.SimpleFSRead(ctx, typedArgs[0]) 2574 return 2575 }, 2576 }, 2577 "simpleFSWrite": { 2578 MakeArg: func() interface{} { 2579 var ret [1]SimpleFSWriteArg 2580 return &ret 2581 }, 2582 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2583 typedArgs, ok := args.(*[1]SimpleFSWriteArg) 2584 if !ok { 2585 err = rpc.NewTypeError((*[1]SimpleFSWriteArg)(nil), args) 2586 return 2587 } 2588 err = i.SimpleFSWrite(ctx, typedArgs[0]) 2589 return 2590 }, 2591 }, 2592 "simpleFSRemove": { 2593 MakeArg: func() interface{} { 2594 var ret [1]SimpleFSRemoveArg 2595 return &ret 2596 }, 2597 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2598 typedArgs, ok := args.(*[1]SimpleFSRemoveArg) 2599 if !ok { 2600 err = rpc.NewTypeError((*[1]SimpleFSRemoveArg)(nil), args) 2601 return 2602 } 2603 err = i.SimpleFSRemove(ctx, typedArgs[0]) 2604 return 2605 }, 2606 }, 2607 "simpleFSStat": { 2608 MakeArg: func() interface{} { 2609 var ret [1]SimpleFSStatArg 2610 return &ret 2611 }, 2612 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2613 typedArgs, ok := args.(*[1]SimpleFSStatArg) 2614 if !ok { 2615 err = rpc.NewTypeError((*[1]SimpleFSStatArg)(nil), args) 2616 return 2617 } 2618 ret, err = i.SimpleFSStat(ctx, typedArgs[0]) 2619 return 2620 }, 2621 }, 2622 "simpleFSGetRevisions": { 2623 MakeArg: func() interface{} { 2624 var ret [1]SimpleFSGetRevisionsArg 2625 return &ret 2626 }, 2627 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2628 typedArgs, ok := args.(*[1]SimpleFSGetRevisionsArg) 2629 if !ok { 2630 err = rpc.NewTypeError((*[1]SimpleFSGetRevisionsArg)(nil), args) 2631 return 2632 } 2633 err = i.SimpleFSGetRevisions(ctx, typedArgs[0]) 2634 return 2635 }, 2636 }, 2637 "simpleFSReadRevisions": { 2638 MakeArg: func() interface{} { 2639 var ret [1]SimpleFSReadRevisionsArg 2640 return &ret 2641 }, 2642 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2643 typedArgs, ok := args.(*[1]SimpleFSReadRevisionsArg) 2644 if !ok { 2645 err = rpc.NewTypeError((*[1]SimpleFSReadRevisionsArg)(nil), args) 2646 return 2647 } 2648 ret, err = i.SimpleFSReadRevisions(ctx, typedArgs[0].OpID) 2649 return 2650 }, 2651 }, 2652 "simpleFSMakeOpid": { 2653 MakeArg: func() interface{} { 2654 var ret [1]SimpleFSMakeOpidArg 2655 return &ret 2656 }, 2657 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2658 ret, err = i.SimpleFSMakeOpid(ctx) 2659 return 2660 }, 2661 }, 2662 "simpleFSClose": { 2663 MakeArg: func() interface{} { 2664 var ret [1]SimpleFSCloseArg 2665 return &ret 2666 }, 2667 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2668 typedArgs, ok := args.(*[1]SimpleFSCloseArg) 2669 if !ok { 2670 err = rpc.NewTypeError((*[1]SimpleFSCloseArg)(nil), args) 2671 return 2672 } 2673 err = i.SimpleFSClose(ctx, typedArgs[0].OpID) 2674 return 2675 }, 2676 }, 2677 "simpleFSCancel": { 2678 MakeArg: func() interface{} { 2679 var ret [1]SimpleFSCancelArg 2680 return &ret 2681 }, 2682 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2683 typedArgs, ok := args.(*[1]SimpleFSCancelArg) 2684 if !ok { 2685 err = rpc.NewTypeError((*[1]SimpleFSCancelArg)(nil), args) 2686 return 2687 } 2688 err = i.SimpleFSCancel(ctx, typedArgs[0].OpID) 2689 return 2690 }, 2691 }, 2692 "simpleFSCheck": { 2693 MakeArg: func() interface{} { 2694 var ret [1]SimpleFSCheckArg 2695 return &ret 2696 }, 2697 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2698 typedArgs, ok := args.(*[1]SimpleFSCheckArg) 2699 if !ok { 2700 err = rpc.NewTypeError((*[1]SimpleFSCheckArg)(nil), args) 2701 return 2702 } 2703 ret, err = i.SimpleFSCheck(ctx, typedArgs[0].OpID) 2704 return 2705 }, 2706 }, 2707 "simpleFSGetOps": { 2708 MakeArg: func() interface{} { 2709 var ret [1]SimpleFSGetOpsArg 2710 return &ret 2711 }, 2712 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2713 ret, err = i.SimpleFSGetOps(ctx) 2714 return 2715 }, 2716 }, 2717 "simpleFSWait": { 2718 MakeArg: func() interface{} { 2719 var ret [1]SimpleFSWaitArg 2720 return &ret 2721 }, 2722 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2723 typedArgs, ok := args.(*[1]SimpleFSWaitArg) 2724 if !ok { 2725 err = rpc.NewTypeError((*[1]SimpleFSWaitArg)(nil), args) 2726 return 2727 } 2728 err = i.SimpleFSWait(ctx, typedArgs[0].OpID) 2729 return 2730 }, 2731 }, 2732 "simpleFSDumpDebuggingInfo": { 2733 MakeArg: func() interface{} { 2734 var ret [1]SimpleFSDumpDebuggingInfoArg 2735 return &ret 2736 }, 2737 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2738 err = i.SimpleFSDumpDebuggingInfo(ctx) 2739 return 2740 }, 2741 }, 2742 "simpleFSClearConflictState": { 2743 MakeArg: func() interface{} { 2744 var ret [1]SimpleFSClearConflictStateArg 2745 return &ret 2746 }, 2747 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2748 typedArgs, ok := args.(*[1]SimpleFSClearConflictStateArg) 2749 if !ok { 2750 err = rpc.NewTypeError((*[1]SimpleFSClearConflictStateArg)(nil), args) 2751 return 2752 } 2753 err = i.SimpleFSClearConflictState(ctx, typedArgs[0].Path) 2754 return 2755 }, 2756 }, 2757 "simpleFSFinishResolvingConflict": { 2758 MakeArg: func() interface{} { 2759 var ret [1]SimpleFSFinishResolvingConflictArg 2760 return &ret 2761 }, 2762 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2763 typedArgs, ok := args.(*[1]SimpleFSFinishResolvingConflictArg) 2764 if !ok { 2765 err = rpc.NewTypeError((*[1]SimpleFSFinishResolvingConflictArg)(nil), args) 2766 return 2767 } 2768 err = i.SimpleFSFinishResolvingConflict(ctx, typedArgs[0].Path) 2769 return 2770 }, 2771 }, 2772 "simpleFSForceStuckConflict": { 2773 MakeArg: func() interface{} { 2774 var ret [1]SimpleFSForceStuckConflictArg 2775 return &ret 2776 }, 2777 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2778 typedArgs, ok := args.(*[1]SimpleFSForceStuckConflictArg) 2779 if !ok { 2780 err = rpc.NewTypeError((*[1]SimpleFSForceStuckConflictArg)(nil), args) 2781 return 2782 } 2783 err = i.SimpleFSForceStuckConflict(ctx, typedArgs[0].Path) 2784 return 2785 }, 2786 }, 2787 "simpleFSSyncStatus": { 2788 MakeArg: func() interface{} { 2789 var ret [1]SimpleFSSyncStatusArg 2790 return &ret 2791 }, 2792 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2793 typedArgs, ok := args.(*[1]SimpleFSSyncStatusArg) 2794 if !ok { 2795 err = rpc.NewTypeError((*[1]SimpleFSSyncStatusArg)(nil), args) 2796 return 2797 } 2798 ret, err = i.SimpleFSSyncStatus(ctx, typedArgs[0].Filter) 2799 return 2800 }, 2801 }, 2802 "simpleFSUserEditHistory": { 2803 MakeArg: func() interface{} { 2804 var ret [1]SimpleFSUserEditHistoryArg 2805 return &ret 2806 }, 2807 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2808 ret, err = i.SimpleFSUserEditHistory(ctx) 2809 return 2810 }, 2811 }, 2812 "simpleFSFolderEditHistory": { 2813 MakeArg: func() interface{} { 2814 var ret [1]SimpleFSFolderEditHistoryArg 2815 return &ret 2816 }, 2817 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2818 typedArgs, ok := args.(*[1]SimpleFSFolderEditHistoryArg) 2819 if !ok { 2820 err = rpc.NewTypeError((*[1]SimpleFSFolderEditHistoryArg)(nil), args) 2821 return 2822 } 2823 ret, err = i.SimpleFSFolderEditHistory(ctx, typedArgs[0].Path) 2824 return 2825 }, 2826 }, 2827 "simpleFSListFavorites": { 2828 MakeArg: func() interface{} { 2829 var ret [1]SimpleFSListFavoritesArg 2830 return &ret 2831 }, 2832 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2833 ret, err = i.SimpleFSListFavorites(ctx) 2834 return 2835 }, 2836 }, 2837 "simpleFSGetUserQuotaUsage": { 2838 MakeArg: func() interface{} { 2839 var ret [1]SimpleFSGetUserQuotaUsageArg 2840 return &ret 2841 }, 2842 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2843 ret, err = i.SimpleFSGetUserQuotaUsage(ctx) 2844 return 2845 }, 2846 }, 2847 "simpleFSGetTeamQuotaUsage": { 2848 MakeArg: func() interface{} { 2849 var ret [1]SimpleFSGetTeamQuotaUsageArg 2850 return &ret 2851 }, 2852 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2853 typedArgs, ok := args.(*[1]SimpleFSGetTeamQuotaUsageArg) 2854 if !ok { 2855 err = rpc.NewTypeError((*[1]SimpleFSGetTeamQuotaUsageArg)(nil), args) 2856 return 2857 } 2858 ret, err = i.SimpleFSGetTeamQuotaUsage(ctx, typedArgs[0].TeamName) 2859 return 2860 }, 2861 }, 2862 "simpleFSReset": { 2863 MakeArg: func() interface{} { 2864 var ret [1]SimpleFSResetArg 2865 return &ret 2866 }, 2867 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2868 typedArgs, ok := args.(*[1]SimpleFSResetArg) 2869 if !ok { 2870 err = rpc.NewTypeError((*[1]SimpleFSResetArg)(nil), args) 2871 return 2872 } 2873 err = i.SimpleFSReset(ctx, typedArgs[0]) 2874 return 2875 }, 2876 }, 2877 "simpleFSFolderSyncConfigAndStatus": { 2878 MakeArg: func() interface{} { 2879 var ret [1]SimpleFSFolderSyncConfigAndStatusArg 2880 return &ret 2881 }, 2882 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2883 typedArgs, ok := args.(*[1]SimpleFSFolderSyncConfigAndStatusArg) 2884 if !ok { 2885 err = rpc.NewTypeError((*[1]SimpleFSFolderSyncConfigAndStatusArg)(nil), args) 2886 return 2887 } 2888 ret, err = i.SimpleFSFolderSyncConfigAndStatus(ctx, typedArgs[0].Path) 2889 return 2890 }, 2891 }, 2892 "simpleFSSetFolderSyncConfig": { 2893 MakeArg: func() interface{} { 2894 var ret [1]SimpleFSSetFolderSyncConfigArg 2895 return &ret 2896 }, 2897 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2898 typedArgs, ok := args.(*[1]SimpleFSSetFolderSyncConfigArg) 2899 if !ok { 2900 err = rpc.NewTypeError((*[1]SimpleFSSetFolderSyncConfigArg)(nil), args) 2901 return 2902 } 2903 err = i.SimpleFSSetFolderSyncConfig(ctx, typedArgs[0]) 2904 return 2905 }, 2906 }, 2907 "simpleFSSyncConfigAndStatus": { 2908 MakeArg: func() interface{} { 2909 var ret [1]SimpleFSSyncConfigAndStatusArg 2910 return &ret 2911 }, 2912 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2913 typedArgs, ok := args.(*[1]SimpleFSSyncConfigAndStatusArg) 2914 if !ok { 2915 err = rpc.NewTypeError((*[1]SimpleFSSyncConfigAndStatusArg)(nil), args) 2916 return 2917 } 2918 ret, err = i.SimpleFSSyncConfigAndStatus(ctx, typedArgs[0].IdentifyBehavior) 2919 return 2920 }, 2921 }, 2922 "simpleFSGetFolder": { 2923 MakeArg: func() interface{} { 2924 var ret [1]SimpleFSGetFolderArg 2925 return &ret 2926 }, 2927 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2928 typedArgs, ok := args.(*[1]SimpleFSGetFolderArg) 2929 if !ok { 2930 err = rpc.NewTypeError((*[1]SimpleFSGetFolderArg)(nil), args) 2931 return 2932 } 2933 ret, err = i.SimpleFSGetFolder(ctx, typedArgs[0].Path) 2934 return 2935 }, 2936 }, 2937 "simpleFSGetOnlineStatus": { 2938 MakeArg: func() interface{} { 2939 var ret [1]SimpleFSGetOnlineStatusArg 2940 return &ret 2941 }, 2942 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2943 typedArgs, ok := args.(*[1]SimpleFSGetOnlineStatusArg) 2944 if !ok { 2945 err = rpc.NewTypeError((*[1]SimpleFSGetOnlineStatusArg)(nil), args) 2946 return 2947 } 2948 ret, err = i.SimpleFSGetOnlineStatus(ctx, typedArgs[0].ClientID) 2949 return 2950 }, 2951 }, 2952 "simpleFSCheckReachability": { 2953 MakeArg: func() interface{} { 2954 var ret [1]SimpleFSCheckReachabilityArg 2955 return &ret 2956 }, 2957 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2958 err = i.SimpleFSCheckReachability(ctx) 2959 return 2960 }, 2961 }, 2962 "simpleFSSetDebugLevel": { 2963 MakeArg: func() interface{} { 2964 var ret [1]SimpleFSSetDebugLevelArg 2965 return &ret 2966 }, 2967 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2968 typedArgs, ok := args.(*[1]SimpleFSSetDebugLevelArg) 2969 if !ok { 2970 err = rpc.NewTypeError((*[1]SimpleFSSetDebugLevelArg)(nil), args) 2971 return 2972 } 2973 err = i.SimpleFSSetDebugLevel(ctx, typedArgs[0].Level) 2974 return 2975 }, 2976 }, 2977 "simpleFSSettings": { 2978 MakeArg: func() interface{} { 2979 var ret [1]SimpleFSSettingsArg 2980 return &ret 2981 }, 2982 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2983 ret, err = i.SimpleFSSettings(ctx) 2984 return 2985 }, 2986 }, 2987 "simpleFSSetNotificationThreshold": { 2988 MakeArg: func() interface{} { 2989 var ret [1]SimpleFSSetNotificationThresholdArg 2990 return &ret 2991 }, 2992 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 2993 typedArgs, ok := args.(*[1]SimpleFSSetNotificationThresholdArg) 2994 if !ok { 2995 err = rpc.NewTypeError((*[1]SimpleFSSetNotificationThresholdArg)(nil), args) 2996 return 2997 } 2998 err = i.SimpleFSSetNotificationThreshold(ctx, typedArgs[0].Threshold) 2999 return 3000 }, 3001 }, 3002 "simpleFSSetSfmiBannerDismissed": { 3003 MakeArg: func() interface{} { 3004 var ret [1]SimpleFSSetSfmiBannerDismissedArg 3005 return &ret 3006 }, 3007 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 3008 typedArgs, ok := args.(*[1]SimpleFSSetSfmiBannerDismissedArg) 3009 if !ok { 3010 err = rpc.NewTypeError((*[1]SimpleFSSetSfmiBannerDismissedArg)(nil), args) 3011 return 3012 } 3013 err = i.SimpleFSSetSfmiBannerDismissed(ctx, typedArgs[0].Dismissed) 3014 return 3015 }, 3016 }, 3017 "simpleFSSetSyncOnCellular": { 3018 MakeArg: func() interface{} { 3019 var ret [1]SimpleFSSetSyncOnCellularArg 3020 return &ret 3021 }, 3022 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 3023 typedArgs, ok := args.(*[1]SimpleFSSetSyncOnCellularArg) 3024 if !ok { 3025 err = rpc.NewTypeError((*[1]SimpleFSSetSyncOnCellularArg)(nil), args) 3026 return 3027 } 3028 err = i.SimpleFSSetSyncOnCellular(ctx, typedArgs[0].SyncOnCellular) 3029 return 3030 }, 3031 }, 3032 "simpleFSObfuscatePath": { 3033 MakeArg: func() interface{} { 3034 var ret [1]SimpleFSObfuscatePathArg 3035 return &ret 3036 }, 3037 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 3038 typedArgs, ok := args.(*[1]SimpleFSObfuscatePathArg) 3039 if !ok { 3040 err = rpc.NewTypeError((*[1]SimpleFSObfuscatePathArg)(nil), args) 3041 return 3042 } 3043 ret, err = i.SimpleFSObfuscatePath(ctx, typedArgs[0].Path) 3044 return 3045 }, 3046 }, 3047 "simpleFSDeobfuscatePath": { 3048 MakeArg: func() interface{} { 3049 var ret [1]SimpleFSDeobfuscatePathArg 3050 return &ret 3051 }, 3052 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 3053 typedArgs, ok := args.(*[1]SimpleFSDeobfuscatePathArg) 3054 if !ok { 3055 err = rpc.NewTypeError((*[1]SimpleFSDeobfuscatePathArg)(nil), args) 3056 return 3057 } 3058 ret, err = i.SimpleFSDeobfuscatePath(ctx, typedArgs[0].Path) 3059 return 3060 }, 3061 }, 3062 "simpleFSGetStats": { 3063 MakeArg: func() interface{} { 3064 var ret [1]SimpleFSGetStatsArg 3065 return &ret 3066 }, 3067 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 3068 ret, err = i.SimpleFSGetStats(ctx) 3069 return 3070 }, 3071 }, 3072 "simpleFSSubscribePath": { 3073 MakeArg: func() interface{} { 3074 var ret [1]SimpleFSSubscribePathArg 3075 return &ret 3076 }, 3077 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 3078 typedArgs, ok := args.(*[1]SimpleFSSubscribePathArg) 3079 if !ok { 3080 err = rpc.NewTypeError((*[1]SimpleFSSubscribePathArg)(nil), args) 3081 return 3082 } 3083 err = i.SimpleFSSubscribePath(ctx, typedArgs[0]) 3084 return 3085 }, 3086 }, 3087 "simpleFSSubscribeNonPath": { 3088 MakeArg: func() interface{} { 3089 var ret [1]SimpleFSSubscribeNonPathArg 3090 return &ret 3091 }, 3092 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 3093 typedArgs, ok := args.(*[1]SimpleFSSubscribeNonPathArg) 3094 if !ok { 3095 err = rpc.NewTypeError((*[1]SimpleFSSubscribeNonPathArg)(nil), args) 3096 return 3097 } 3098 err = i.SimpleFSSubscribeNonPath(ctx, typedArgs[0]) 3099 return 3100 }, 3101 }, 3102 "simpleFSUnsubscribe": { 3103 MakeArg: func() interface{} { 3104 var ret [1]SimpleFSUnsubscribeArg 3105 return &ret 3106 }, 3107 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 3108 typedArgs, ok := args.(*[1]SimpleFSUnsubscribeArg) 3109 if !ok { 3110 err = rpc.NewTypeError((*[1]SimpleFSUnsubscribeArg)(nil), args) 3111 return 3112 } 3113 err = i.SimpleFSUnsubscribe(ctx, typedArgs[0]) 3114 return 3115 }, 3116 }, 3117 "simpleFSStartDownload": { 3118 MakeArg: func() interface{} { 3119 var ret [1]SimpleFSStartDownloadArg 3120 return &ret 3121 }, 3122 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 3123 typedArgs, ok := args.(*[1]SimpleFSStartDownloadArg) 3124 if !ok { 3125 err = rpc.NewTypeError((*[1]SimpleFSStartDownloadArg)(nil), args) 3126 return 3127 } 3128 ret, err = i.SimpleFSStartDownload(ctx, typedArgs[0]) 3129 return 3130 }, 3131 }, 3132 "simpleFSGetDownloadInfo": { 3133 MakeArg: func() interface{} { 3134 var ret [1]SimpleFSGetDownloadInfoArg 3135 return &ret 3136 }, 3137 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 3138 typedArgs, ok := args.(*[1]SimpleFSGetDownloadInfoArg) 3139 if !ok { 3140 err = rpc.NewTypeError((*[1]SimpleFSGetDownloadInfoArg)(nil), args) 3141 return 3142 } 3143 ret, err = i.SimpleFSGetDownloadInfo(ctx, typedArgs[0].DownloadID) 3144 return 3145 }, 3146 }, 3147 "simpleFSGetDownloadStatus": { 3148 MakeArg: func() interface{} { 3149 var ret [1]SimpleFSGetDownloadStatusArg 3150 return &ret 3151 }, 3152 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 3153 ret, err = i.SimpleFSGetDownloadStatus(ctx) 3154 return 3155 }, 3156 }, 3157 "simpleFSCancelDownload": { 3158 MakeArg: func() interface{} { 3159 var ret [1]SimpleFSCancelDownloadArg 3160 return &ret 3161 }, 3162 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 3163 typedArgs, ok := args.(*[1]SimpleFSCancelDownloadArg) 3164 if !ok { 3165 err = rpc.NewTypeError((*[1]SimpleFSCancelDownloadArg)(nil), args) 3166 return 3167 } 3168 err = i.SimpleFSCancelDownload(ctx, typedArgs[0].DownloadID) 3169 return 3170 }, 3171 }, 3172 "simpleFSDismissDownload": { 3173 MakeArg: func() interface{} { 3174 var ret [1]SimpleFSDismissDownloadArg 3175 return &ret 3176 }, 3177 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 3178 typedArgs, ok := args.(*[1]SimpleFSDismissDownloadArg) 3179 if !ok { 3180 err = rpc.NewTypeError((*[1]SimpleFSDismissDownloadArg)(nil), args) 3181 return 3182 } 3183 err = i.SimpleFSDismissDownload(ctx, typedArgs[0].DownloadID) 3184 return 3185 }, 3186 }, 3187 "simpleFSConfigureDownload": { 3188 MakeArg: func() interface{} { 3189 var ret [1]SimpleFSConfigureDownloadArg 3190 return &ret 3191 }, 3192 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 3193 typedArgs, ok := args.(*[1]SimpleFSConfigureDownloadArg) 3194 if !ok { 3195 err = rpc.NewTypeError((*[1]SimpleFSConfigureDownloadArg)(nil), args) 3196 return 3197 } 3198 err = i.SimpleFSConfigureDownload(ctx, typedArgs[0]) 3199 return 3200 }, 3201 }, 3202 "simpleFSMakeTempDirForUpload": { 3203 MakeArg: func() interface{} { 3204 var ret [1]SimpleFSMakeTempDirForUploadArg 3205 return &ret 3206 }, 3207 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 3208 ret, err = i.SimpleFSMakeTempDirForUpload(ctx) 3209 return 3210 }, 3211 }, 3212 "simpleFSStartUpload": { 3213 MakeArg: func() interface{} { 3214 var ret [1]SimpleFSStartUploadArg 3215 return &ret 3216 }, 3217 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 3218 typedArgs, ok := args.(*[1]SimpleFSStartUploadArg) 3219 if !ok { 3220 err = rpc.NewTypeError((*[1]SimpleFSStartUploadArg)(nil), args) 3221 return 3222 } 3223 ret, err = i.SimpleFSStartUpload(ctx, typedArgs[0]) 3224 return 3225 }, 3226 }, 3227 "simpleFSGetUploadStatus": { 3228 MakeArg: func() interface{} { 3229 var ret [1]SimpleFSGetUploadStatusArg 3230 return &ret 3231 }, 3232 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 3233 ret, err = i.SimpleFSGetUploadStatus(ctx) 3234 return 3235 }, 3236 }, 3237 "simpleFSCancelUpload": { 3238 MakeArg: func() interface{} { 3239 var ret [1]SimpleFSCancelUploadArg 3240 return &ret 3241 }, 3242 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 3243 typedArgs, ok := args.(*[1]SimpleFSCancelUploadArg) 3244 if !ok { 3245 err = rpc.NewTypeError((*[1]SimpleFSCancelUploadArg)(nil), args) 3246 return 3247 } 3248 err = i.SimpleFSCancelUpload(ctx, typedArgs[0].UploadID) 3249 return 3250 }, 3251 }, 3252 "simpleFSDismissUpload": { 3253 MakeArg: func() interface{} { 3254 var ret [1]SimpleFSDismissUploadArg 3255 return &ret 3256 }, 3257 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 3258 typedArgs, ok := args.(*[1]SimpleFSDismissUploadArg) 3259 if !ok { 3260 err = rpc.NewTypeError((*[1]SimpleFSDismissUploadArg)(nil), args) 3261 return 3262 } 3263 err = i.SimpleFSDismissUpload(ctx, typedArgs[0].UploadID) 3264 return 3265 }, 3266 }, 3267 "simpleFSGetFilesTabBadge": { 3268 MakeArg: func() interface{} { 3269 var ret [1]SimpleFSGetFilesTabBadgeArg 3270 return &ret 3271 }, 3272 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 3273 ret, err = i.SimpleFSGetFilesTabBadge(ctx) 3274 return 3275 }, 3276 }, 3277 "simpleFSGetGUIFileContext": { 3278 MakeArg: func() interface{} { 3279 var ret [1]SimpleFSGetGUIFileContextArg 3280 return &ret 3281 }, 3282 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 3283 typedArgs, ok := args.(*[1]SimpleFSGetGUIFileContextArg) 3284 if !ok { 3285 err = rpc.NewTypeError((*[1]SimpleFSGetGUIFileContextArg)(nil), args) 3286 return 3287 } 3288 ret, err = i.SimpleFSGetGUIFileContext(ctx, typedArgs[0].Path) 3289 return 3290 }, 3291 }, 3292 "simpleFSUserIn": { 3293 MakeArg: func() interface{} { 3294 var ret [1]SimpleFSUserInArg 3295 return &ret 3296 }, 3297 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 3298 typedArgs, ok := args.(*[1]SimpleFSUserInArg) 3299 if !ok { 3300 err = rpc.NewTypeError((*[1]SimpleFSUserInArg)(nil), args) 3301 return 3302 } 3303 err = i.SimpleFSUserIn(ctx, typedArgs[0].ClientID) 3304 return 3305 }, 3306 }, 3307 "simpleFSUserOut": { 3308 MakeArg: func() interface{} { 3309 var ret [1]SimpleFSUserOutArg 3310 return &ret 3311 }, 3312 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 3313 typedArgs, ok := args.(*[1]SimpleFSUserOutArg) 3314 if !ok { 3315 err = rpc.NewTypeError((*[1]SimpleFSUserOutArg)(nil), args) 3316 return 3317 } 3318 err = i.SimpleFSUserOut(ctx, typedArgs[0].ClientID) 3319 return 3320 }, 3321 }, 3322 "simpleFSSearch": { 3323 MakeArg: func() interface{} { 3324 var ret [1]SimpleFSSearchArg 3325 return &ret 3326 }, 3327 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 3328 typedArgs, ok := args.(*[1]SimpleFSSearchArg) 3329 if !ok { 3330 err = rpc.NewTypeError((*[1]SimpleFSSearchArg)(nil), args) 3331 return 3332 } 3333 ret, err = i.SimpleFSSearch(ctx, typedArgs[0]) 3334 return 3335 }, 3336 }, 3337 "simpleFSResetIndex": { 3338 MakeArg: func() interface{} { 3339 var ret [1]SimpleFSResetIndexArg 3340 return &ret 3341 }, 3342 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 3343 err = i.SimpleFSResetIndex(ctx) 3344 return 3345 }, 3346 }, 3347 "simpleFSGetIndexProgress": { 3348 MakeArg: func() interface{} { 3349 var ret [1]SimpleFSGetIndexProgressArg 3350 return &ret 3351 }, 3352 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 3353 ret, err = i.SimpleFSGetIndexProgress(ctx) 3354 return 3355 }, 3356 }, 3357 "simpleFSCancelJournalUploads": { 3358 MakeArg: func() interface{} { 3359 var ret [1]SimpleFSCancelJournalUploadsArg 3360 return &ret 3361 }, 3362 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 3363 typedArgs, ok := args.(*[1]SimpleFSCancelJournalUploadsArg) 3364 if !ok { 3365 err = rpc.NewTypeError((*[1]SimpleFSCancelJournalUploadsArg)(nil), args) 3366 return 3367 } 3368 err = i.SimpleFSCancelJournalUploads(ctx, typedArgs[0].Path) 3369 return 3370 }, 3371 }, 3372 "simpleFSArchiveStart": { 3373 MakeArg: func() interface{} { 3374 var ret [1]SimpleFSArchiveStartArg 3375 return &ret 3376 }, 3377 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 3378 typedArgs, ok := args.(*[1]SimpleFSArchiveStartArg) 3379 if !ok { 3380 err = rpc.NewTypeError((*[1]SimpleFSArchiveStartArg)(nil), args) 3381 return 3382 } 3383 ret, err = i.SimpleFSArchiveStart(ctx, typedArgs[0]) 3384 return 3385 }, 3386 }, 3387 "simpleFSArchiveCancelOrDismissJob": { 3388 MakeArg: func() interface{} { 3389 var ret [1]SimpleFSArchiveCancelOrDismissJobArg 3390 return &ret 3391 }, 3392 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 3393 typedArgs, ok := args.(*[1]SimpleFSArchiveCancelOrDismissJobArg) 3394 if !ok { 3395 err = rpc.NewTypeError((*[1]SimpleFSArchiveCancelOrDismissJobArg)(nil), args) 3396 return 3397 } 3398 err = i.SimpleFSArchiveCancelOrDismissJob(ctx, typedArgs[0].JobID) 3399 return 3400 }, 3401 }, 3402 "simpleFSGetArchiveStatus": { 3403 MakeArg: func() interface{} { 3404 var ret [1]SimpleFSGetArchiveStatusArg 3405 return &ret 3406 }, 3407 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 3408 ret, err = i.SimpleFSGetArchiveStatus(ctx) 3409 return 3410 }, 3411 }, 3412 "simpleFSGetArchiveJobFreshness": { 3413 MakeArg: func() interface{} { 3414 var ret [1]SimpleFSGetArchiveJobFreshnessArg 3415 return &ret 3416 }, 3417 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 3418 typedArgs, ok := args.(*[1]SimpleFSGetArchiveJobFreshnessArg) 3419 if !ok { 3420 err = rpc.NewTypeError((*[1]SimpleFSGetArchiveJobFreshnessArg)(nil), args) 3421 return 3422 } 3423 ret, err = i.SimpleFSGetArchiveJobFreshness(ctx, typedArgs[0].JobID) 3424 return 3425 }, 3426 }, 3427 }, 3428 } 3429 } 3430 3431 type SimpleFSClient struct { 3432 Cli rpc.GenericClient 3433 } 3434 3435 // Begin list of items in directory at path. 3436 // Retrieve results with readList(). 3437 // Can be a single file to get flags/status. 3438 // If `refreshSubscription` is true and the path is a KBFS path, simpleFS 3439 // will begin sending `FSPathUpdated` notifications for the for the 3440 // corresponding TLF, until another call refreshes the subscription on a 3441 // different TLF. 3442 func (c SimpleFSClient) SimpleFSList(ctx context.Context, __arg SimpleFSListArg) (err error) { 3443 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSList", []interface{}{__arg}, nil, 0*time.Millisecond) 3444 return 3445 } 3446 3447 // Begin recursive list of items in directory at path. 3448 // If `refreshSubscription` is true and the path is a KBFS path, simpleFS 3449 // will begin sending `FSPathUpdated` notifications for the for the 3450 // corresponding TLF, until another call refreshes the subscription on a 3451 // different TLF. 3452 func (c SimpleFSClient) SimpleFSListRecursive(ctx context.Context, __arg SimpleFSListRecursiveArg) (err error) { 3453 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSListRecursive", []interface{}{__arg}, nil, 0*time.Millisecond) 3454 return 3455 } 3456 3457 // Begin recursive list of items in directory at path up to a given depth 3458 func (c SimpleFSClient) SimpleFSListRecursiveToDepth(ctx context.Context, __arg SimpleFSListRecursiveToDepthArg) (err error) { 3459 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSListRecursiveToDepth", []interface{}{__arg}, nil, 0*time.Millisecond) 3460 return 3461 } 3462 3463 // Get list of Paths in progress. Can indicate status of pending 3464 // to get more entries. 3465 func (c SimpleFSClient) SimpleFSReadList(ctx context.Context, opID OpID) (res SimpleFSListResult, err error) { 3466 __arg := SimpleFSReadListArg{OpID: opID} 3467 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSReadList", []interface{}{__arg}, &res, 0*time.Millisecond) 3468 return 3469 } 3470 3471 // Begin copy of file or directory. 3472 func (c SimpleFSClient) SimpleFSCopy(ctx context.Context, __arg SimpleFSCopyArg) (err error) { 3473 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSCopy", []interface{}{__arg}, nil, 0*time.Millisecond) 3474 return 3475 } 3476 3477 // Make a symlink of file or directory 3478 func (c SimpleFSClient) SimpleFSSymlink(ctx context.Context, __arg SimpleFSSymlinkArg) (err error) { 3479 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSSymlink", []interface{}{__arg}, nil, 0*time.Millisecond) 3480 return 3481 } 3482 3483 // Begin recursive copy of directory 3484 // 3485 // overwriteExistingFiles controls whether an existing file from `src` will 3486 // overwrite a file with the same name in `dest`; if `false`, an error will be 3487 // returned in that case. For directories that share a name, the copy will 3488 // continue recursively into the directory without causing an error. 3489 func (c SimpleFSClient) SimpleFSCopyRecursive(ctx context.Context, __arg SimpleFSCopyRecursiveArg) (err error) { 3490 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSCopyRecursive", []interface{}{__arg}, nil, 0*time.Millisecond) 3491 return 3492 } 3493 3494 // Begin move of file or directory, from/to KBFS only 3495 func (c SimpleFSClient) SimpleFSMove(ctx context.Context, __arg SimpleFSMoveArg) (err error) { 3496 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSMove", []interface{}{__arg}, nil, 0*time.Millisecond) 3497 return 3498 } 3499 3500 // Rename file or directory, KBFS side only 3501 func (c SimpleFSClient) SimpleFSRename(ctx context.Context, __arg SimpleFSRenameArg) (err error) { 3502 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSRename", []interface{}{__arg}, nil, 0*time.Millisecond) 3503 return 3504 } 3505 3506 // Create/open a file and leave it open 3507 // or create a directory 3508 // Files must be closed afterwards. 3509 func (c SimpleFSClient) SimpleFSOpen(ctx context.Context, __arg SimpleFSOpenArg) (err error) { 3510 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSOpen", []interface{}{__arg}, nil, 0*time.Millisecond) 3511 return 3512 } 3513 3514 // Set/clear file bits - only executable for now 3515 func (c SimpleFSClient) SimpleFSSetStat(ctx context.Context, __arg SimpleFSSetStatArg) (err error) { 3516 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSSetStat", []interface{}{__arg}, nil, 0*time.Millisecond) 3517 return 3518 } 3519 3520 // Read (possibly partial) contents of open file, 3521 // up to the amount specified by size. 3522 // Repeat until zero bytes are returned or error. 3523 // If size is zero, read an arbitrary amount. 3524 func (c SimpleFSClient) SimpleFSRead(ctx context.Context, __arg SimpleFSReadArg) (res FileContent, err error) { 3525 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSRead", []interface{}{__arg}, &res, 0*time.Millisecond) 3526 return 3527 } 3528 3529 // Append content to opened file. 3530 // May be repeated until OpID is closed. 3531 func (c SimpleFSClient) SimpleFSWrite(ctx context.Context, __arg SimpleFSWriteArg) (err error) { 3532 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSWrite", []interface{}{__arg}, nil, 0*time.Millisecond) 3533 return 3534 } 3535 3536 // Remove file or directory from filesystem 3537 func (c SimpleFSClient) SimpleFSRemove(ctx context.Context, __arg SimpleFSRemoveArg) (err error) { 3538 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSRemove", []interface{}{__arg}, nil, 0*time.Millisecond) 3539 return 3540 } 3541 3542 // Get info about file 3543 func (c SimpleFSClient) SimpleFSStat(ctx context.Context, __arg SimpleFSStatArg) (res Dirent, err error) { 3544 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSStat", []interface{}{__arg}, &res, 0*time.Millisecond) 3545 return 3546 } 3547 3548 // Get revision info for a directory entry 3549 func (c SimpleFSClient) SimpleFSGetRevisions(ctx context.Context, __arg SimpleFSGetRevisionsArg) (err error) { 3550 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSGetRevisions", []interface{}{__arg}, nil, 0*time.Millisecond) 3551 return 3552 } 3553 3554 // Get list of revisions in progress. Can indicate status of pending 3555 // to get more revisions. 3556 func (c SimpleFSClient) SimpleFSReadRevisions(ctx context.Context, opID OpID) (res GetRevisionsResult, err error) { 3557 __arg := SimpleFSReadRevisionsArg{OpID: opID} 3558 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSReadRevisions", []interface{}{__arg}, &res, 0*time.Millisecond) 3559 return 3560 } 3561 3562 // Convenience helper for generating new random value 3563 func (c SimpleFSClient) SimpleFSMakeOpid(ctx context.Context) (res OpID, err error) { 3564 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSMakeOpid", []interface{}{SimpleFSMakeOpidArg{}}, &res, 0*time.Millisecond) 3565 return 3566 } 3567 3568 // Close OpID, cancels any pending operation. 3569 // Must be called after list/copy/remove 3570 func (c SimpleFSClient) SimpleFSClose(ctx context.Context, opID OpID) (err error) { 3571 __arg := SimpleFSCloseArg{OpID: opID} 3572 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSClose", []interface{}{__arg}, nil, 0*time.Millisecond) 3573 return 3574 } 3575 3576 // Cancels a running operation, like copy. 3577 func (c SimpleFSClient) SimpleFSCancel(ctx context.Context, opID OpID) (err error) { 3578 __arg := SimpleFSCancelArg{OpID: opID} 3579 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSCancel", []interface{}{__arg}, nil, 0*time.Millisecond) 3580 return 3581 } 3582 3583 // Check progress of pending operation 3584 func (c SimpleFSClient) SimpleFSCheck(ctx context.Context, opID OpID) (res OpProgress, err error) { 3585 __arg := SimpleFSCheckArg{OpID: opID} 3586 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSCheck", []interface{}{__arg}, &res, 0*time.Millisecond) 3587 return 3588 } 3589 3590 // Get all the outstanding operations 3591 func (c SimpleFSClient) SimpleFSGetOps(ctx context.Context) (res []OpDescription, err error) { 3592 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSGetOps", []interface{}{SimpleFSGetOpsArg{}}, &res, 0*time.Millisecond) 3593 return 3594 } 3595 3596 // Blocking wait for the pending operation to finish 3597 func (c SimpleFSClient) SimpleFSWait(ctx context.Context, opID OpID) (err error) { 3598 __arg := SimpleFSWaitArg{OpID: opID} 3599 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSWait", []interface{}{__arg}, nil, 0*time.Millisecond) 3600 return 3601 } 3602 3603 // Instructs KBFS to dump debugging info into its logs. 3604 func (c SimpleFSClient) SimpleFSDumpDebuggingInfo(ctx context.Context) (err error) { 3605 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSDumpDebuggingInfo", []interface{}{SimpleFSDumpDebuggingInfoArg{}}, nil, 0*time.Millisecond) 3606 return 3607 } 3608 3609 func (c SimpleFSClient) SimpleFSClearConflictState(ctx context.Context, path Path) (err error) { 3610 __arg := SimpleFSClearConflictStateArg{Path: path} 3611 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSClearConflictState", []interface{}{__arg}, nil, 0*time.Millisecond) 3612 return 3613 } 3614 3615 func (c SimpleFSClient) SimpleFSFinishResolvingConflict(ctx context.Context, path Path) (err error) { 3616 __arg := SimpleFSFinishResolvingConflictArg{Path: path} 3617 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSFinishResolvingConflict", []interface{}{__arg}, nil, 0*time.Millisecond) 3618 return 3619 } 3620 3621 // Force a TLF into a stuck conflict state (for testing). 3622 func (c SimpleFSClient) SimpleFSForceStuckConflict(ctx context.Context, path Path) (err error) { 3623 __arg := SimpleFSForceStuckConflictArg{Path: path} 3624 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSForceStuckConflict", []interface{}{__arg}, nil, 0*time.Millisecond) 3625 return 3626 } 3627 3628 // Get sync status. 3629 func (c SimpleFSClient) SimpleFSSyncStatus(ctx context.Context, filter ListFilter) (res FSSyncStatus, err error) { 3630 __arg := SimpleFSSyncStatusArg{Filter: filter} 3631 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSSyncStatus", []interface{}{__arg}, &res, 0*time.Millisecond) 3632 return 3633 } 3634 3635 // simpleFSUserEditHistory returns edit histories of TLFs that the logged-in 3636 // user can access. Each returned history is corresponds to a unique 3637 // writer-TLF pair. They are in descending order by the modification time 3638 // (as recorded by the server) of the most recent edit in each history. 3639 func (c SimpleFSClient) SimpleFSUserEditHistory(ctx context.Context) (res []FSFolderEditHistory, err error) { 3640 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSUserEditHistory", []interface{}{SimpleFSUserEditHistoryArg{}}, &res, 0*time.Millisecond) 3641 return 3642 } 3643 3644 // simpleFSFolderEditHistory returns the edit history for the TLF 3645 // described by `path`, for the most recent writers of that TLF. 3646 // The writers are in descending order by the modification time (as 3647 // recorded by the server) of their most recent edit. 3648 func (c SimpleFSClient) SimpleFSFolderEditHistory(ctx context.Context, path Path) (res FSFolderEditHistory, err error) { 3649 __arg := SimpleFSFolderEditHistoryArg{Path: path} 3650 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSFolderEditHistory", []interface{}{__arg}, &res, 0*time.Millisecond) 3651 return 3652 } 3653 3654 // simpleFSListFavorites gets the current favorites, ignored folders, and new 3655 // folders from the KBFS cache. 3656 func (c SimpleFSClient) SimpleFSListFavorites(ctx context.Context) (res FavoritesResult, err error) { 3657 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSListFavorites", []interface{}{SimpleFSListFavoritesArg{}}, &res, 0*time.Millisecond) 3658 return 3659 } 3660 3661 // simpleFSGetUserQuotaUsage returns the quota usage for the logged-in 3662 // user. Any usage includes local journal usage as well. 3663 func (c SimpleFSClient) SimpleFSGetUserQuotaUsage(ctx context.Context) (res SimpleFSQuotaUsage, err error) { 3664 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSGetUserQuotaUsage", []interface{}{SimpleFSGetUserQuotaUsageArg{}}, &res, 0*time.Millisecond) 3665 return 3666 } 3667 3668 // simpleFSGetTeamQuotaUsage returns the quota usage for the given team, if 3669 // the logged-in user has access to that team. Any usage includes 3670 // local journal usage as well. 3671 func (c SimpleFSClient) SimpleFSGetTeamQuotaUsage(ctx context.Context, teamName TeamName) (res SimpleFSQuotaUsage, err error) { 3672 __arg := SimpleFSGetTeamQuotaUsageArg{TeamName: teamName} 3673 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSGetTeamQuotaUsage", []interface{}{__arg}, &res, 0*time.Millisecond) 3674 return 3675 } 3676 3677 // simpleFSReset completely resets the KBFS folder referenced in `path`. 3678 // It should only be called after explicit user confirmation. 3679 func (c SimpleFSClient) SimpleFSReset(ctx context.Context, __arg SimpleFSResetArg) (err error) { 3680 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSReset", []interface{}{__arg}, nil, 0*time.Millisecond) 3681 return 3682 } 3683 3684 func (c SimpleFSClient) SimpleFSFolderSyncConfigAndStatus(ctx context.Context, path Path) (res FolderSyncConfigAndStatus, err error) { 3685 __arg := SimpleFSFolderSyncConfigAndStatusArg{Path: path} 3686 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSFolderSyncConfigAndStatus", []interface{}{__arg}, &res, 0*time.Millisecond) 3687 return 3688 } 3689 3690 func (c SimpleFSClient) SimpleFSSetFolderSyncConfig(ctx context.Context, __arg SimpleFSSetFolderSyncConfigArg) (err error) { 3691 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSSetFolderSyncConfig", []interface{}{__arg}, nil, 0*time.Millisecond) 3692 return 3693 } 3694 3695 func (c SimpleFSClient) SimpleFSSyncConfigAndStatus(ctx context.Context, identifyBehavior *TLFIdentifyBehavior) (res SyncConfigAndStatusRes, err error) { 3696 __arg := SimpleFSSyncConfigAndStatusArg{IdentifyBehavior: identifyBehavior} 3697 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSSyncConfigAndStatus", []interface{}{__arg}, &res, 0*time.Millisecond) 3698 return 3699 } 3700 3701 func (c SimpleFSClient) SimpleFSGetFolder(ctx context.Context, path KBFSPath) (res FolderWithFavFlags, err error) { 3702 __arg := SimpleFSGetFolderArg{Path: path} 3703 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSGetFolder", []interface{}{__arg}, &res, 0*time.Millisecond) 3704 return 3705 } 3706 3707 func (c SimpleFSClient) SimpleFSGetOnlineStatus(ctx context.Context, clientID string) (res KbfsOnlineStatus, err error) { 3708 __arg := SimpleFSGetOnlineStatusArg{ClientID: clientID} 3709 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSGetOnlineStatus", []interface{}{__arg}, &res, 0*time.Millisecond) 3710 return 3711 } 3712 3713 func (c SimpleFSClient) SimpleFSCheckReachability(ctx context.Context) (err error) { 3714 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSCheckReachability", []interface{}{SimpleFSCheckReachabilityArg{}}, nil, 0*time.Millisecond) 3715 return 3716 } 3717 3718 func (c SimpleFSClient) SimpleFSSetDebugLevel(ctx context.Context, level string) (err error) { 3719 __arg := SimpleFSSetDebugLevelArg{Level: level} 3720 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSSetDebugLevel", []interface{}{__arg}, nil, 0*time.Millisecond) 3721 return 3722 } 3723 3724 func (c SimpleFSClient) SimpleFSSettings(ctx context.Context) (res FSSettings, err error) { 3725 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSSettings", []interface{}{SimpleFSSettingsArg{}}, &res, 0*time.Millisecond) 3726 return 3727 } 3728 3729 func (c SimpleFSClient) SimpleFSSetNotificationThreshold(ctx context.Context, threshold int64) (err error) { 3730 __arg := SimpleFSSetNotificationThresholdArg{Threshold: threshold} 3731 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSSetNotificationThreshold", []interface{}{__arg}, nil, 0*time.Millisecond) 3732 return 3733 } 3734 3735 func (c SimpleFSClient) SimpleFSSetSfmiBannerDismissed(ctx context.Context, dismissed bool) (err error) { 3736 __arg := SimpleFSSetSfmiBannerDismissedArg{Dismissed: dismissed} 3737 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSSetSfmiBannerDismissed", []interface{}{__arg}, nil, 0*time.Millisecond) 3738 return 3739 } 3740 3741 func (c SimpleFSClient) SimpleFSSetSyncOnCellular(ctx context.Context, syncOnCellular bool) (err error) { 3742 __arg := SimpleFSSetSyncOnCellularArg{SyncOnCellular: syncOnCellular} 3743 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSSetSyncOnCellular", []interface{}{__arg}, nil, 0*time.Millisecond) 3744 return 3745 } 3746 3747 func (c SimpleFSClient) SimpleFSObfuscatePath(ctx context.Context, path Path) (res string, err error) { 3748 __arg := SimpleFSObfuscatePathArg{Path: path} 3749 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSObfuscatePath", []interface{}{__arg}, &res, 0*time.Millisecond) 3750 return 3751 } 3752 3753 func (c SimpleFSClient) SimpleFSDeobfuscatePath(ctx context.Context, path Path) (res []string, err error) { 3754 __arg := SimpleFSDeobfuscatePathArg{Path: path} 3755 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSDeobfuscatePath", []interface{}{__arg}, &res, 0*time.Millisecond) 3756 return 3757 } 3758 3759 func (c SimpleFSClient) SimpleFSGetStats(ctx context.Context) (res SimpleFSStats, err error) { 3760 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSGetStats", []interface{}{SimpleFSGetStatsArg{}}, &res, 0*time.Millisecond) 3761 return 3762 } 3763 3764 func (c SimpleFSClient) SimpleFSSubscribePath(ctx context.Context, __arg SimpleFSSubscribePathArg) (err error) { 3765 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSSubscribePath", []interface{}{__arg}, nil, 0*time.Millisecond) 3766 return 3767 } 3768 3769 func (c SimpleFSClient) SimpleFSSubscribeNonPath(ctx context.Context, __arg SimpleFSSubscribeNonPathArg) (err error) { 3770 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSSubscribeNonPath", []interface{}{__arg}, nil, 0*time.Millisecond) 3771 return 3772 } 3773 3774 func (c SimpleFSClient) SimpleFSUnsubscribe(ctx context.Context, __arg SimpleFSUnsubscribeArg) (err error) { 3775 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSUnsubscribe", []interface{}{__arg}, nil, 0*time.Millisecond) 3776 return 3777 } 3778 3779 func (c SimpleFSClient) SimpleFSStartDownload(ctx context.Context, __arg SimpleFSStartDownloadArg) (res string, err error) { 3780 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSStartDownload", []interface{}{__arg}, &res, 0*time.Millisecond) 3781 return 3782 } 3783 3784 func (c SimpleFSClient) SimpleFSGetDownloadInfo(ctx context.Context, downloadID string) (res DownloadInfo, err error) { 3785 __arg := SimpleFSGetDownloadInfoArg{DownloadID: downloadID} 3786 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSGetDownloadInfo", []interface{}{__arg}, &res, 0*time.Millisecond) 3787 return 3788 } 3789 3790 func (c SimpleFSClient) SimpleFSGetDownloadStatus(ctx context.Context) (res DownloadStatus, err error) { 3791 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSGetDownloadStatus", []interface{}{SimpleFSGetDownloadStatusArg{}}, &res, 0*time.Millisecond) 3792 return 3793 } 3794 3795 func (c SimpleFSClient) SimpleFSCancelDownload(ctx context.Context, downloadID string) (err error) { 3796 __arg := SimpleFSCancelDownloadArg{DownloadID: downloadID} 3797 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSCancelDownload", []interface{}{__arg}, nil, 0*time.Millisecond) 3798 return 3799 } 3800 3801 func (c SimpleFSClient) SimpleFSDismissDownload(ctx context.Context, downloadID string) (err error) { 3802 __arg := SimpleFSDismissDownloadArg{DownloadID: downloadID} 3803 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSDismissDownload", []interface{}{__arg}, nil, 0*time.Millisecond) 3804 return 3805 } 3806 3807 func (c SimpleFSClient) SimpleFSConfigureDownload(ctx context.Context, __arg SimpleFSConfigureDownloadArg) (err error) { 3808 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSConfigureDownload", []interface{}{__arg}, nil, 0*time.Millisecond) 3809 return 3810 } 3811 3812 func (c SimpleFSClient) SimpleFSMakeTempDirForUpload(ctx context.Context) (res string, err error) { 3813 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSMakeTempDirForUpload", []interface{}{SimpleFSMakeTempDirForUploadArg{}}, &res, 0*time.Millisecond) 3814 return 3815 } 3816 3817 func (c SimpleFSClient) SimpleFSStartUpload(ctx context.Context, __arg SimpleFSStartUploadArg) (res string, err error) { 3818 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSStartUpload", []interface{}{__arg}, &res, 0*time.Millisecond) 3819 return 3820 } 3821 3822 func (c SimpleFSClient) SimpleFSGetUploadStatus(ctx context.Context) (res []UploadState, err error) { 3823 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSGetUploadStatus", []interface{}{SimpleFSGetUploadStatusArg{}}, &res, 0*time.Millisecond) 3824 return 3825 } 3826 3827 func (c SimpleFSClient) SimpleFSCancelUpload(ctx context.Context, uploadID string) (err error) { 3828 __arg := SimpleFSCancelUploadArg{UploadID: uploadID} 3829 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSCancelUpload", []interface{}{__arg}, nil, 0*time.Millisecond) 3830 return 3831 } 3832 3833 func (c SimpleFSClient) SimpleFSDismissUpload(ctx context.Context, uploadID string) (err error) { 3834 __arg := SimpleFSDismissUploadArg{UploadID: uploadID} 3835 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSDismissUpload", []interface{}{__arg}, nil, 0*time.Millisecond) 3836 return 3837 } 3838 3839 func (c SimpleFSClient) SimpleFSGetFilesTabBadge(ctx context.Context) (res FilesTabBadge, err error) { 3840 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSGetFilesTabBadge", []interface{}{SimpleFSGetFilesTabBadgeArg{}}, &res, 0*time.Millisecond) 3841 return 3842 } 3843 3844 func (c SimpleFSClient) SimpleFSGetGUIFileContext(ctx context.Context, path KBFSPath) (res GUIFileContext, err error) { 3845 __arg := SimpleFSGetGUIFileContextArg{Path: path} 3846 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSGetGUIFileContext", []interface{}{__arg}, &res, 0*time.Millisecond) 3847 return 3848 } 3849 3850 func (c SimpleFSClient) SimpleFSUserIn(ctx context.Context, clientID string) (err error) { 3851 __arg := SimpleFSUserInArg{ClientID: clientID} 3852 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSUserIn", []interface{}{__arg}, nil, 0*time.Millisecond) 3853 return 3854 } 3855 3856 func (c SimpleFSClient) SimpleFSUserOut(ctx context.Context, clientID string) (err error) { 3857 __arg := SimpleFSUserOutArg{ClientID: clientID} 3858 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSUserOut", []interface{}{__arg}, nil, 0*time.Millisecond) 3859 return 3860 } 3861 3862 func (c SimpleFSClient) SimpleFSSearch(ctx context.Context, __arg SimpleFSSearchArg) (res SimpleFSSearchResults, err error) { 3863 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSSearch", []interface{}{__arg}, &res, 0*time.Millisecond) 3864 return 3865 } 3866 3867 func (c SimpleFSClient) SimpleFSResetIndex(ctx context.Context) (err error) { 3868 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSResetIndex", []interface{}{SimpleFSResetIndexArg{}}, nil, 0*time.Millisecond) 3869 return 3870 } 3871 3872 func (c SimpleFSClient) SimpleFSGetIndexProgress(ctx context.Context) (res SimpleFSIndexProgress, err error) { 3873 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSGetIndexProgress", []interface{}{SimpleFSGetIndexProgressArg{}}, &res, 0*time.Millisecond) 3874 return 3875 } 3876 3877 func (c SimpleFSClient) SimpleFSCancelJournalUploads(ctx context.Context, path KBFSPath) (err error) { 3878 __arg := SimpleFSCancelJournalUploadsArg{Path: path} 3879 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSCancelJournalUploads", []interface{}{__arg}, nil, 0*time.Millisecond) 3880 return 3881 } 3882 3883 func (c SimpleFSClient) SimpleFSArchiveStart(ctx context.Context, __arg SimpleFSArchiveStartArg) (res SimpleFSArchiveJobDesc, err error) { 3884 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSArchiveStart", []interface{}{__arg}, &res, 0*time.Millisecond) 3885 return 3886 } 3887 3888 func (c SimpleFSClient) SimpleFSArchiveCancelOrDismissJob(ctx context.Context, jobID string) (err error) { 3889 __arg := SimpleFSArchiveCancelOrDismissJobArg{JobID: jobID} 3890 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSArchiveCancelOrDismissJob", []interface{}{__arg}, nil, 0*time.Millisecond) 3891 return 3892 } 3893 3894 func (c SimpleFSClient) SimpleFSGetArchiveStatus(ctx context.Context) (res SimpleFSArchiveStatus, err error) { 3895 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSGetArchiveStatus", []interface{}{SimpleFSGetArchiveStatusArg{}}, &res, 0*time.Millisecond) 3896 return 3897 } 3898 3899 func (c SimpleFSClient) SimpleFSGetArchiveJobFreshness(ctx context.Context, jobID string) (res SimpleFSArchiveJobFreshness, err error) { 3900 __arg := SimpleFSGetArchiveJobFreshnessArg{JobID: jobID} 3901 err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSGetArchiveJobFreshness", []interface{}{__arg}, &res, 0*time.Millisecond) 3902 return 3903 }