rclone: github.com/ncw/rclone/backend/seafile/api Index | Files

package api

import "github.com/ncw/rclone/backend/seafile/api"


Package Files


type AccountInfo Uses

type AccountInfo struct {
    Usage int64  `json:"usage"`
    Total int64  `json:"total"`
    Email string `json:"email"`
    Name  string `json:"name"`

AccountInfo contains simple user properties

type AuthenticationRequest Uses

type AuthenticationRequest struct {
    Username string `json:"username"`
    Password string `json:"password"`

AuthenticationRequest contains user credentials

type AuthenticationResult Uses

type AuthenticationResult struct {
    Token  string   `json:"token"`
    Errors []string `json:"non_field_errors"`

AuthenticationResult is returned by a call to the authentication api

type BatchSourceDestRequest Uses

type BatchSourceDestRequest struct {
    SrcLibraryID string   `json:"src_repo_id"`
    SrcParentDir string   `json:"src_parent_dir"`
    SrcItems     []string `json:"src_dirents"`
    DstLibraryID string   `json:"dst_repo_id"`
    DstParentDir string   `json:"dst_parent_dir"`

BatchSourceDestRequest contains JSON parameters for sending a batch copy or move operation

type CreateDirRequest Uses

type CreateDirRequest struct {
    Operation string `json:"operation"`

CreateDirRequest only contain an operation field

type CreateLibrary Uses

type CreateLibrary struct {
    ID   string `json:"repo_id"`
    Name string `json:"repo_name"`

CreateLibrary properties. Seafile is not consistent and returns different types for different API calls

type CreateLibraryRequest Uses

type CreateLibraryRequest struct {
    Name        string `json:"name"`
    Description string `json:"desc"`
    Password    string `json:"passwd"`

CreateLibraryRequest contains the information needed to create a library

type DefaultLibrary Uses

type DefaultLibrary struct {
    ID     string `json:"repo_id"`
    Exists bool   `json:"exists"`

DefaultLibrary when none specified

type DirEntries Uses

type DirEntries struct {
    Entries []DirEntry `json:"dirent_list"`

DirEntries contains a list of DirEntry

type DirEntry Uses

type DirEntry struct {
    ID       string   `json:"id"`
    Type     FileType `json:"type"`
    Name     string   `json:"name"`
    Size     int64    `json:"size"`
    Path     string   `json:"parent_dir"`
    Modified int64    `json:"mtime"`

DirEntry contains a directory entry

type DirectoryDetail Uses

type DirectoryDetail struct {
    ID   string `json:"repo_id"`
    Name string `json:"name"`
    Path string `json:"path"`

DirectoryDetail contains the directory details specific to the getDirectoryDetails call

type FileDetail Uses

type FileDetail struct {
    ID       string   `json:"id"`
    Type     FileType `json:"type"`
    Name     string   `json:"name"`
    Size     int64    `json:"size"`
    Parent   string   `json:"parent_dir"`
    Modified string   `json:"last_modified"`

FileDetail contains file properties (for older api v2.0)

type FileInfo Uses

type FileInfo struct {
    Type      string `json:"type"`
    LibraryID string `json:"repo_id"`
    Path      string `json:"parent_dir"`
    Name      string `json:"obj_name"`
    ID        string `json:"obj_id"`
    Size      int64  `json:"size"`

FileInfo is returned by a server file copy/move/rename (new api v2.1)

type FileOperationRequest Uses

type FileOperationRequest struct {
    Operation            Operation `json:"operation"`
    DestinationLibraryID string    `json:"dst_repo"` // For copy/move operation
    DestinationPath      string    `json:"dst_dir"`  // For copy/move operation
    NewName              string    `json:"newname"`  // Only to be used by the rename operation

FileOperationRequest is sent to the api to copy, move or rename a file

type FileType Uses

type FileType string

FileType is either "dir" or "file"

var (
    FileTypeDir  FileType = "dir"
    FileTypeFile FileType = "file"

File types

type Library Uses

type Library struct {
    Encrypted bool   `json:"encrypted"`
    Owner     string `json:"owner"`
    ID        string `json:"id"`
    Size      int64  `json:"size"`
    Name      string `json:"name"`
    Modified  int64  `json:"mtime"`

Library properties. Please note not all properties are going to be useful for rclone

type Operation Uses

type Operation string

Operation is move, copy or rename

var (
    CopyFileOperation   Operation = "copy"
    MoveFileOperation   Operation = "move"
    RenameFileOperation Operation = "rename"


type ServerInfo Uses

type ServerInfo struct {
    Version string `json:"version"`

ServerInfo contains server information

type ShareLinkRequest Uses

type ShareLinkRequest struct {
    LibraryID string `json:"repo_id"`
    Path      string `json:"path"`

ShareLinkRequest contains the information needed to create or list shared links

type SharedLink struct {
    Link      string `json:"link"`
    IsExpired bool   `json:"is_expired"`

SharedLink contains the information returned by a call to shared link creation

Updated 2020-09-21. Refresh now. Tools for package owners.