/usr/lib/python2.7/dist-packages/seafile/rpcclient.py is in libseafile0 6.1.5-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 | import ccnet
from pysearpc import searpc_func, SearpcError
class SeafileRpcClient(ccnet.RpcClientBase):
"""RPC used in client"""
def __init__(self, ccnet_client_pool, *args, **kwargs):
ccnet.RpcClientBase.__init__(self, ccnet_client_pool, "seafile-rpcserver",
*args, **kwargs)
@searpc_func("object", [])
def seafile_get_session_info():
pass
get_session_info = seafile_get_session_info
@searpc_func("int", ["string"])
def seafile_calc_dir_size(path):
pass
calc_dir_size = seafile_calc_dir_size
@searpc_func("int64", [])
def seafile_get_total_block_size():
pass
get_total_block_size = seafile_get_total_block_size;
@searpc_func("string", ["string"])
def seafile_get_config(key):
pass
get_config = seafile_get_config
@searpc_func("int", ["string", "string"])
def seafile_set_config(key, value):
pass
set_config = seafile_set_config
@searpc_func("int", ["string"])
def seafile_get_config_int(key):
pass
get_config_int = seafile_get_config_int
@searpc_func("int", ["string", "int"])
def seafile_set_config_int(key, value):
pass
set_config_int = seafile_set_config_int
@searpc_func("int", ["int"])
def seafile_set_upload_rate_limit(limit):
pass
set_upload_rate_limit = seafile_set_upload_rate_limit
@searpc_func("int", ["int"])
def seafile_set_download_rate_limit(limit):
pass
set_download_rate_limit = seafile_set_download_rate_limit
### repo
@searpc_func("objlist", ["int", "int"])
def seafile_get_repo_list():
pass
get_repo_list = seafile_get_repo_list
@searpc_func("object", ["string"])
def seafile_get_repo():
pass
get_repo = seafile_get_repo
@searpc_func("string", ["string", "string", "string", "string", "string", "int"])
def seafile_create_repo(name, desc, passwd, base, relay_id, keep_history):
pass
create_repo = seafile_create_repo
@searpc_func("int", ["string"])
def seafile_destroy_repo(repo_id):
pass
remove_repo = seafile_destroy_repo
@searpc_func("objlist", ["string", "string", "string", "int"])
def seafile_diff():
pass
get_diff = seafile_diff
@searpc_func("object", ["string", "int", "string"])
def seafile_get_commit(repo_id, version, commit_id):
pass
get_commit = seafile_get_commit
@searpc_func("objlist", ["string", "int", "int"])
def seafile_get_commit_list():
pass
get_commit_list = seafile_get_commit_list
@searpc_func("objlist", ["string"])
def seafile_branch_gets(repo_id):
pass
branch_gets = seafile_branch_gets
@searpc_func("int", ["string", "string"])
def seafile_branch_add(repo_id, branch):
pass
branch_add = seafile_branch_add
##### clone related
@searpc_func("string", ["string", "string"])
def gen_default_worktree(worktree_parent, repo_name):
pass
@searpc_func("string", ["string", "int", "string", "string", "string", "string", "string", "string", "string", "string", "string", "int", "string"])
def seafile_clone(repo_id, repo_version, peer_id, repo_name, worktree, token, password, magic, peer_addr, peer_port, email, random_key, enc_version, more_info):
pass
clone = seafile_clone
@searpc_func("string", ["string", "int", "string", "string", "string", "string", "string", "string", "string", "string", "string", "int", "string"])
def seafile_download(repo_id, repo_version, peer_id, repo_name, wt_parent, token, password, magic, peer_addr, peer_port, email, random_key, enc_version, more_info):
pass
download = seafile_download
@searpc_func("int", ["string"])
def seafile_cancel_clone_task(repo_id):
pass
cancel_clone_task = seafile_cancel_clone_task
@searpc_func("int", ["string"])
def seafile_remove_clone_task(repo_id):
pass
remove_clone_task = seafile_remove_clone_task
@searpc_func("objlist", [])
def seafile_get_clone_tasks():
pass
get_clone_tasks = seafile_get_clone_tasks
@searpc_func("object", ["string"])
def seafile_find_transfer_task(repo_id):
pass
find_transfer_task = seafile_find_transfer_task
@searpc_func("object", ["string"])
def seafile_get_checkout_task(repo_id):
pass
get_checkout_task = seafile_get_checkout_task
### sync
@searpc_func("int", ["string", "string"])
def seafile_sync(repo_id, peer_id):
pass
sync = seafile_sync
@searpc_func("object", ["string"])
def seafile_get_repo_sync_task():
pass
get_repo_sync_task = seafile_get_repo_sync_task
@searpc_func("object", ["string"])
def seafile_get_repo_sync_info():
pass
get_repo_sync_info = seafile_get_repo_sync_info
@searpc_func("int", [])
def seafile_is_auto_sync_enabled():
pass
is_auto_sync_enabled = seafile_is_auto_sync_enabled
###### Property Management #########
@searpc_func("int", ["string", "string"])
def seafile_set_repo_passwd(repo_id, passwd):
pass
set_repo_passwd = seafile_set_repo_passwd
@searpc_func("int", ["string", "string", "string"])
def seafile_set_repo_property(repo_id, key, value):
pass
set_repo_property = seafile_set_repo_property
@searpc_func("string", ["string", "string"])
def seafile_get_repo_property(repo_id, key):
pass
get_repo_property = seafile_get_repo_property
@searpc_func("string", ["string"])
def seafile_get_repo_relay_address(repo_id):
pass
get_repo_relay_address = seafile_get_repo_relay_address
@searpc_func("string", ["string"])
def seafile_get_repo_relay_port(repo_id):
pass
get_repo_relay_port = seafile_get_repo_relay_port
@searpc_func("int", ["string", "string", "string"])
def seafile_update_repo_relay_info(repo_id, addr, port):
pass
update_repo_relay_info = seafile_update_repo_relay_info
@searpc_func("int", ["string", "string"])
def seafile_set_repo_token(repo_id, token):
pass
set_repo_token = seafile_set_repo_token
@searpc_func("string", ["string"])
def seafile_get_repo_token(repo_id):
pass
get_repo_token = seafile_get_repo_token
@searpc_func("object", ["int", "string", "string"])
def seafile_generate_magic_and_random_key(enc_version, repo_id, password):
pass
generate_magic_and_random_key = seafile_generate_magic_and_random_key
class SeafileThreadedRpcClient(ccnet.RpcClientBase):
"""RPC used in client that run in a thread"""
def __init__(self, ccnet_client_pool, *args, **kwargs):
ccnet.RpcClientBase.__init__(self, ccnet_client_pool,
"seafile-threaded-rpcserver",
*args, **kwargs)
@searpc_func("int", ["string", "string", "string"])
def seafile_edit_repo():
pass
edit_repo = seafile_edit_repo
@searpc_func("int", ["string", "string"])
def seafile_reset(repo_id, commit_id):
pass
reset = seafile_reset
@searpc_func("int", ["string", "string"])
def seafile_revert(repo_id, commit_id):
pass
revert = seafile_revert
@searpc_func("int", ["string", "string"])
def seafile_add(repo_id, path):
pass
add = seafile_add
@searpc_func("int", ["string", "string"])
def seafile_rm():
pass
rm = seafile_rm
@searpc_func("string", ["string", "string"])
def seafile_commit(repo_id, description):
pass
commit = seafile_commit
class MonitorRpcClient(ccnet.RpcClientBase):
def __init__(self, ccnet_client_pool):
ccnet.RpcClientBase.__init__(self, ccnet_client_pool, "monitor-rpcserver")
@searpc_func("int", ["string"])
def monitor_get_repos_size(repo_ids):
pass
get_repos_size = monitor_get_repos_size
class SeafServerRpcClient(ccnet.RpcClientBase):
def __init__(self, ccnet_client_pool, *args, **kwargs):
ccnet.RpcClientBase.__init__(self, ccnet_client_pool, "seafserv-rpcserver",
*args, **kwargs)
# token for web access to repo
@searpc_func("string", ["string", "string", "string", "string", "int"])
def seafile_web_get_access_token(repo_id, obj_id, op, username, use_onetime=1):
pass
web_get_access_token = seafile_web_get_access_token
@searpc_func("object", ["string"])
def seafile_web_query_access_token(token):
pass
web_query_access_token = seafile_web_query_access_token
@searpc_func("string", ["string"])
def seafile_query_zip_progress(token):
pass
query_zip_progress = seafile_query_zip_progress
###### GC ####################
@searpc_func("int", [])
def seafile_gc():
pass
gc = seafile_gc
@searpc_func("int", [])
def seafile_gc_get_progress():
pass
gc_get_progress = seafile_gc_get_progress
# password management
@searpc_func("int", ["string", "string"])
def seafile_is_passwd_set(repo_id, user):
pass
is_passwd_set = seafile_is_passwd_set
@searpc_func("object", ["string", "string"])
def seafile_get_decrypt_key(repo_id, user):
pass
get_decrypt_key = seafile_get_decrypt_key
# Copy tasks
@searpc_func("object", ["string"])
def get_copy_task(task_id):
pass
@searpc_func("int", ["string"])
def cancel_copy_task(task_id):
pass
class SeafServerThreadedRpcClient(ccnet.RpcClientBase):
def __init__(self, ccnet_client_pool, *args, **kwargs):
ccnet.RpcClientBase.__init__(self, ccnet_client_pool,
"seafserv-threaded-rpcserver",
*args, **kwargs)
# repo manipulation
@searpc_func("string", ["string", "string", "string", "string"])
def seafile_create_repo(name, desc, owner_email, passwd):
pass
create_repo = seafile_create_repo
@searpc_func("string", ["string", "string", "string", "string", "string", "string", "int"])
def seafile_create_enc_repo(repo_id, name, desc, owner_email, magic, random_key, enc_version):
pass
create_enc_repo = seafile_create_enc_repo
@searpc_func("object", ["string"])
def seafile_get_repo(repo_id):
pass
get_repo = seafile_get_repo
@searpc_func("int", ["string"])
def seafile_destroy_repo(repo_id):
pass
remove_repo = seafile_destroy_repo
@searpc_func("objlist", ["int", "int"])
def seafile_get_repo_list(start, limit):
pass
get_repo_list = seafile_get_repo_list
@searpc_func("int64", [])
def seafile_count_repos():
pass
count_repos = seafile_count_repos
@searpc_func("int", ["string", "string", "string", "string"])
def seafile_edit_repo(repo_id, name, description, user):
pass
edit_repo = seafile_edit_repo
@searpc_func("int", ["string", "string"])
def seafile_is_repo_owner(user_id, repo_id):
pass
is_repo_owner = seafile_is_repo_owner
@searpc_func("int", ["string", "string"])
def seafile_set_repo_owner(email, repo_id):
pass
set_repo_owner = seafile_set_repo_owner
@searpc_func("string", ["string"])
def seafile_get_repo_owner(repo_id):
pass
get_repo_owner = seafile_get_repo_owner
@searpc_func("objlist", [])
def seafile_get_orphan_repo_list():
pass
get_orphan_repo_list = seafile_get_orphan_repo_list
@searpc_func("objlist", ["string", "int"])
def seafile_list_owned_repos(user_id, ret_corrupted):
pass
list_owned_repos = seafile_list_owned_repos
@searpc_func("int64", ["string"])
def seafile_server_repo_size(repo_id):
pass
server_repo_size = seafile_server_repo_size
@searpc_func("int", ["string", "string"])
def seafile_repo_set_access_property(repo_id, role):
pass
repo_set_access_property = seafile_repo_set_access_property
@searpc_func("string", ["string"])
def seafile_repo_query_access_property(repo_id):
pass
repo_query_access_property = seafile_repo_query_access_property
@searpc_func("int", ["string", "string", "string"])
def seafile_revert_on_server(repo_id, commit_id, user_name):
pass
revert_on_server = seafile_revert_on_server
@searpc_func("objlist", ["string", "string", "string"])
def seafile_diff():
pass
get_diff = seafile_diff
@searpc_func("int", ["string", "string", "string", "string", "string"])
def seafile_post_file(repo_id, tmp_file_path, parent_dir, filename, user):
pass
post_file = seafile_post_file
@searpc_func("int", ["string", "string", "string", "string"])
def seafile_post_dir(repo_id, parent_dir, new_dir_name, user):
pass
post_dir = seafile_post_dir
@searpc_func("int", ["string", "string", "string", "string"])
def seafile_post_empty_file(repo_id, parent_dir, filename, user):
pass
post_empty_file = seafile_post_empty_file
@searpc_func("int", ["string", "string", "string", "string", "string", "string"])
def seafile_put_file(repo_id, tmp_file_path, parent_dir, filename, user, head_id):
pass
put_file = seafile_put_file
@searpc_func("int", ["string", "string", "string", "string"])
def seafile_del_file(repo_id, parent_dir, filename, user):
pass
del_file = seafile_del_file
@searpc_func("object", ["string", "string", "string", "string", "string", "string", "string", "int", "int"])
def seafile_copy_file(src_repo, src_dir, src_filename, dst_repo, dst_dir, dst_filename, user, need_progress, synchronous):
pass
copy_file = seafile_copy_file
@searpc_func("object", ["string", "string", "string", "string", "string", "string", "int", "string", "int", "int"])
def seafile_move_file(src_repo, src_dir, src_filename, dst_repo, dst_dir, dst_filename, replace, user, need_progress, synchronous):
pass
move_file = seafile_move_file
@searpc_func("int", ["string", "string", "string", "string", "string"])
def seafile_rename_file(repo_id, parent_dir, oldname, newname, user):
pass
rename_file = seafile_rename_file
@searpc_func("int", ["string", "string"])
def seafile_is_valid_filename(repo_id, filename):
pass
is_valid_filename = seafile_is_valid_filename
@searpc_func("object", ["string", "int", "string"])
def seafile_get_commit(repo_id, version, commit_id):
pass
get_commit = seafile_get_commit
@searpc_func("string", ["string", "string", "int", "int"])
def seafile_list_file_blocks(repo_id, file_id, offset, limit):
pass
list_file_blocks = seafile_list_file_blocks
@searpc_func("objlist", ["string", "string", "int", "int"])
def seafile_list_dir(repo_id, dir_id, offset, limit):
pass
list_dir = seafile_list_dir
@searpc_func("objlist", ["string", "string", "sting", "string", "int", "int"])
def list_dir_with_perm(repo_id, dir_path, dir_id, user, offset, limit):
pass
@searpc_func("int64", ["string", "int", "string"])
def seafile_get_file_size(store_id, version, file_id):
pass
get_file_size = seafile_get_file_size
@searpc_func("int64", ["string", "int", "string"])
def seafile_get_dir_size(store_id, version, dir_id):
pass
get_dir_size = seafile_get_dir_size
@searpc_func("objlist", ["string", "string", "string"])
def seafile_list_dir_by_path(repo_id, commit_id, path):
pass
list_dir_by_path = seafile_list_dir_by_path
@searpc_func("string", ["string", "string", "string"])
def seafile_get_dir_id_by_commit_and_path(repo_id, commit_id, path):
pass
get_dir_id_by_commit_and_path = seafile_get_dir_id_by_commit_and_path
@searpc_func("string", ["string", "string"])
def seafile_get_file_id_by_path(repo_id, path):
pass
get_file_id_by_path = seafile_get_file_id_by_path
@searpc_func("string", ["string", "string"])
def seafile_get_dir_id_by_path(repo_id, path):
pass
get_dir_id_by_path = seafile_get_dir_id_by_path
@searpc_func("string", ["string", "string", "string"])
def seafile_get_file_id_by_commit_and_path(repo_id, commit_id, path):
pass
get_file_id_by_commit_and_path = seafile_get_file_id_by_commit_and_path
@searpc_func("object", ["string", "string"])
def seafile_get_dirent_by_path(repo_id, commit_id, path):
pass
get_dirent_by_path = seafile_get_dirent_by_path
@searpc_func("objlist", ["string", "string", "int", "int", "int"])
def seafile_list_file_revisions(repo_id, path, max_revision, limit, show_days):
pass
list_file_revisions = seafile_list_file_revisions
@searpc_func("objlist", ["string", "string"])
def seafile_calc_files_last_modified(repo_id, parent_dir, limit):
pass
calc_files_last_modified = seafile_calc_files_last_modified
@searpc_func("int", ["string", "string", "string", "string"])
def seafile_revert_file(repo_id, commit_id, path, user):
pass
revert_file = seafile_revert_file
@searpc_func("string", ["string", "string"])
def seafile_check_repo_blocks_missing(repo_id, blklist):
pass
check_repo_blocks_missing = seafile_check_repo_blocks_missing
@searpc_func("int", ["string", "string", "string", "string"])
def seafile_revert_dir(repo_id, commit_id, path, user):
pass
revert_dir = seafile_revert_dir
@searpc_func("objlist", ["string", "int", "string", "string", "int"])
def get_deleted(repo_id, show_days, path, scan_stat, limit):
pass
# share repo to user
@searpc_func("string", ["string", "string", "string", "string"])
def seafile_add_share(repo_id, from_email, to_email, permission):
pass
add_share = seafile_add_share
@searpc_func("objlist", ["string", "string", "int", "int"])
def seafile_list_share_repos(email, query_col, start, limit):
pass
list_share_repos = seafile_list_share_repos
@searpc_func("objlist", ["string", "string"])
def seafile_list_repo_shared_to(from_user, repo_id):
pass
list_repo_shared_to = seafile_list_repo_shared_to
@searpc_func("int", ["string", "string", "string", "string", "string", "string"])
def share_subdir_to_user(repo_id, path, owner, share_user, permission, passwd):
pass
@searpc_func("int", ["string", "string", "string", "string"])
def unshare_subdir_for_user(repo_id, path, owner, share_user):
pass
@searpc_func("int", ["string", "string", "string", "string", "string"])
def update_share_subdir_perm_for_user(repo_id, path, owner, share_user, permission):
pass
@searpc_func("objlist", ["int", "string", "string", "int", "int"])
def seafile_list_org_share_repos(org_id, email, query_col, start, limit):
pass
list_org_share_repos = seafile_list_org_share_repos
@searpc_func("int", ["string", "string", "string"])
def seafile_remove_share(repo_id, from_email, to_email):
pass
remove_share = seafile_remove_share
@searpc_func("int", ["string", "string", "string", "string"])
def set_share_permission(repo_id, from_email, to_email, permission):
pass
# share repo to group
@searpc_func("int", ["string", "int", "string", "string"])
def seafile_group_share_repo(repo_id, group_id, user_name, permisson):
pass
group_share_repo = seafile_group_share_repo
@searpc_func("int", ["string", "int", "string"])
def seafile_group_unshare_repo(repo_id, group_id, user_name):
pass
group_unshare_repo = seafile_group_unshare_repo
@searpc_func("string", ["string"])
def seafile_get_shared_groups_by_repo(repo_id):
pass
get_shared_groups_by_repo=seafile_get_shared_groups_by_repo
@searpc_func("objlist", ["string", "string"])
def seafile_list_repo_shared_group(from_user, repo_id):
pass
list_repo_shared_group = seafile_list_repo_shared_group
@searpc_func("objlist", ["string", "string", "string"])
def seafile_get_shared_users_for_subdir(repo_id, path, from_user):
pass
get_shared_users_for_subdir = seafile_get_shared_users_for_subdir
@searpc_func("objlist", ["string", "string", "string"])
def seafile_get_shared_groups_for_subdir(repo_id, path, from_user):
pass
get_shared_groups_for_subdir = seafile_get_shared_groups_for_subdir
@searpc_func("int", ["string", "string", "string", "int", "string", "string"])
def share_subdir_to_group(repo_id, path, owner, share_group, permission, passwd):
pass
@searpc_func("int", ["string", "string", "string", "int"])
def unshare_subdir_for_group(repo_id, path, owner, share_group):
pass
@searpc_func("int", ["string", "string", "string", "int", "string"])
def update_share_subdir_perm_for_group(repo_id, path, owner, share_group, permission):
pass
@searpc_func("string", ["int"])
def seafile_get_group_repoids(group_id):
pass
get_group_repoids = seafile_get_group_repoids
@searpc_func("objlist", ["int"])
def seafile_get_repos_by_group(group_id):
pass
get_repos_by_group = seafile_get_repos_by_group
@searpc_func("objlist", ["string"])
def get_group_repos_by_owner(user_name):
pass
@searpc_func("string", ["string"])
def get_group_repo_owner(repo_id):
pass
@searpc_func("int", ["int", "string"])
def seafile_remove_repo_group(group_id, user_name):
pass
remove_repo_group = seafile_remove_repo_group
@searpc_func("int", ["int", "string", "string"])
def set_group_repo_permission(group_id, repo_id, permission):
pass
# branch and commit
@searpc_func("objlist", ["string"])
def seafile_branch_gets(repo_id):
pass
branch_gets = seafile_branch_gets
@searpc_func("objlist", ["string", "int", "int"])
def seafile_get_commit_list(repo_id, offset, limit):
pass
get_commit_list = seafile_get_commit_list
###### Token ####################
@searpc_func("int", ["string", "string", "string"])
def seafile_set_repo_token(repo_id, email, token):
pass
set_repo_token = seafile_set_repo_token
@searpc_func("string", ["string", "string"])
def seafile_get_repo_token_nonnull(repo_id, email):
"""Get the token of the repo for the email user. If the token does not
exist, a new one is generated and returned.
"""
pass
get_repo_token_nonnull = seafile_get_repo_token_nonnull
@searpc_func("string", ["string", "string"])
def seafile_generate_repo_token(repo_id, email):
pass
generate_repo_token = seafile_generate_repo_token
@searpc_func("int", ["string", "string"])
def seafile_delete_repo_token(repo_id, token, user):
pass
delete_repo_token = seafile_delete_repo_token
@searpc_func("objlist", ["string"])
def seafile_list_repo_tokens(repo_id):
pass
list_repo_tokens = seafile_list_repo_tokens
@searpc_func("objlist", ["string"])
def seafile_list_repo_tokens_by_email(email):
pass
list_repo_tokens_by_email = seafile_list_repo_tokens_by_email
@searpc_func("int", ["string", "string"])
def seafile_delete_repo_tokens_by_peer_id(email, user_id):
pass
delete_repo_tokens_by_peer_id = seafile_delete_repo_tokens_by_peer_id
@searpc_func("int", ["string"])
def delete_repo_tokens_by_email(email):
pass
###### quota ##########
@searpc_func("int64", ["string"])
def seafile_get_user_quota_usage(user_id):
pass
get_user_quota_usage = seafile_get_user_quota_usage
@searpc_func("int64", ["string"])
def seafile_get_user_share_usage(user_id):
pass
get_user_share_usage = seafile_get_user_share_usage
@searpc_func("int64", ["int"])
def seafile_get_org_quota_usage(org_id):
pass
get_org_quota_usage = seafile_get_org_quota_usage
@searpc_func("int64", ["int", "string"])
def seafile_get_org_user_quota_usage(org_id, user):
pass
get_org_user_quota_usage = seafile_get_org_user_quota_usage
@searpc_func("int", ["string", "int64"])
def set_user_quota(user, quota):
pass
@searpc_func("int64", ["string"])
def get_user_quota(user):
pass
@searpc_func("int", ["int", "int64"])
def set_org_quota(org_id, quota):
pass
@searpc_func("int64", ["int"])
def get_org_quota(org_id):
pass
@searpc_func("int", ["int", "string", "int64"])
def set_org_user_quota(org_id, user, quota):
pass
@searpc_func("int64", ["int", "string"])
def get_org_user_quota(org_id, user):
pass
@searpc_func("int", ["string"])
def check_quota(repo_id):
pass
# password management
@searpc_func("int", ["string", "string"])
def seafile_check_passwd(repo_id, magic):
pass
check_passwd = seafile_check_passwd
@searpc_func("int", ["string", "string", "string"])
def seafile_set_passwd(repo_id, user, passwd):
pass
set_passwd = seafile_set_passwd
@searpc_func("int", ["string", "string"])
def seafile_unset_passwd(repo_id, user, passwd):
pass
unset_passwd = seafile_unset_passwd
# repo permission checking
@searpc_func("string", ["string", "string"])
def check_permission(repo_id, user):
pass
# folder permission check
@searpc_func("string", ["string", "string", "string"])
def check_permission_by_path(repo_id, path, user):
pass
# org repo
@searpc_func("string", ["string", "string", "string", "string", "string", "int", "int"])
def seafile_create_org_repo(name, desc, user, passwd, magic, random_key, enc_version, org_id):
pass
create_org_repo = seafile_create_org_repo
@searpc_func("int", ["string"])
def seafile_get_org_id_by_repo_id(repo_id):
pass
get_org_id_by_repo_id = seafile_get_org_id_by_repo_id
@searpc_func("objlist", ["int", "int", "int"])
def seafile_get_org_repo_list(org_id, start, limit):
pass
get_org_repo_list = seafile_get_org_repo_list
@searpc_func("int", ["int"])
def seafile_remove_org_repo_by_org_id(org_id):
pass
remove_org_repo_by_org_id = seafile_remove_org_repo_by_org_id
@searpc_func("objlist", ["int", "string"])
def list_org_repos_by_owner(org_id, user):
pass
@searpc_func("string", ["string"])
def get_org_repo_owner(repo_id):
pass
# org group repo
@searpc_func("int", ["string", "int", "int", "string", "string"])
def add_org_group_repo(repo_id, org_id, group_id, owner, permission):
pass
@searpc_func("int", ["string", "int", "int"])
def del_org_group_repo(repo_id, org_id, group_id):
pass
@searpc_func("string", ["int", "int"])
def get_org_group_repoids(org_id, group_id):
pass
@searpc_func("string", ["int", "int", "string"])
def get_org_group_repo_owner(org_id, group_id, repo_id):
pass
@searpc_func("objlist", ["int", "string"])
def get_org_group_repos_by_owner(org_id, user):
pass
@searpc_func("string", ["int", "string"])
def get_org_groups_by_repo(org_id, repo_id):
pass
@searpc_func("int", ["int", "int", "string", "string"])
def set_org_group_repo_permission(org_id, group_id, repo_id, permission):
pass
# inner pub repo
@searpc_func("int", ["string", "string"])
def set_inner_pub_repo(repo_id, permission):
pass
@searpc_func("int", ["string"])
def unset_inner_pub_repo(repo_id):
pass
@searpc_func("objlist", [])
def list_inner_pub_repos():
pass
@searpc_func("objlist", ["string"])
def list_inner_pub_repos_by_owner(user):
pass
@searpc_func("int64", [])
def count_inner_pub_repos():
pass
@searpc_func("int", ["string"])
def is_inner_pub_repo(repo_id):
pass
# org inner pub repo
@searpc_func("int", ["int", "string", "string"])
def set_org_inner_pub_repo(org_id, repo_id, permission):
pass
@searpc_func("int", ["int", "string"])
def unset_org_inner_pub_repo(org_id, repo_id):
pass
@searpc_func("objlist", ["int"])
def list_org_inner_pub_repos(org_id):
pass
@searpc_func("objlist", ["int", "string"])
def list_org_inner_pub_repos_by_owner(org_id, user):
pass
@searpc_func("int", ["string", "int"])
def set_repo_history_limit(repo_id, days):
pass
@searpc_func("int", ["string"])
def get_repo_history_limit(repo_id):
pass
# virtual repo
@searpc_func("string", ["string", "string", "string", "string", "string", "string"])
def create_virtual_repo(origin_repo_id, path, repo_name, repo_desc, owner, passwd=''):
pass
@searpc_func("objlist", ["string"])
def get_virtual_repos_by_owner(owner):
pass
@searpc_func("object", ["string", "string", "string"])
def get_virtual_repo(origin_repo, path, owner):
pass
# system default library
@searpc_func("string", [])
def get_system_default_repo_id():
pass
# Change password
@searpc_func("int", ["string", "string", "string", "string"])
def seafile_change_repo_passwd(repo_id, old_passwd, new_passwd, user):
pass
change_repo_passwd = seafile_change_repo_passwd
# Clean trash
@searpc_func("int", ["string", "int"])
def clean_up_repo_history(repo_id, keep_days):
pass
# Trashed repos
@searpc_func("objlist", ["int", "int"])
def get_trash_repo_list(start, limit):
pass
@searpc_func("int", ["string"])
def del_repo_from_trash(repo_id):
pass
@searpc_func("int", ["string"])
def restore_repo_from_trash(repo_id):
pass
@searpc_func("objlist", ["string"])
def get_trash_repos_by_owner(owner):
pass
@searpc_func("int", [])
def empty_repo_trash():
pass
@searpc_func("int", ["string"])
def empty_repo_trash_by_owner(owner):
pass
@searpc_func("object", ["string"])
def empty_repo_trash_by_owner(owner):
pass
@searpc_func("object", ["int", "string", "string"])
def generate_magic_and_random_key(enc_version, repo_id, password):
pass
|