Documentation
¶
Overview ¶
Package api provides types used by the Seafile API.
Index ¶
- type AccountInfo
- type AuthenticationRequest
- type AuthenticationResult
- type BatchSourceDestRequest
- type CreateDirRequest
- type CreateLibrary
- type CreateLibraryRequest
- type DefaultLibrary
- type DirEntries
- type DirEntry
- type DirectoryDetail
- type FileDetail
- type FileInfo
- type FileOperationRequest
- type FileType
- type Library
- type Operation
- type ServerInfo
- type ShareLinkRequest
- type SharedLink
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountInfo ¶
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 ¶
type AuthenticationRequest struct {
Username string `json:"username"`
Password string `json:"password"`
}
AuthenticationRequest contains user credentials
type AuthenticationResult ¶
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 ¶
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 ¶
type CreateDirRequest struct {
Operation string `json:"operation"`
}
CreateDirRequest only contain an operation field
type CreateLibrary ¶
CreateLibrary properties. Seafile is not consistent and returns different types for different API calls
type CreateLibraryRequest ¶
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 ¶
DefaultLibrary when none specified
type DirEntries ¶
type DirEntries struct {
Entries []DirEntry `json:"dirent_list"`
}
DirEntries contains a list of DirEntry
type DirEntry ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 Library ¶
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 ServerInfo ¶
type ServerInfo struct {
Version string `json:"version"`
}
ServerInfo contains server information
type ShareLinkRequest ¶
type ShareLinkRequest struct {
}
ShareLinkRequest contains the information needed to create or list shared links
type SharedLink ¶
type SharedLink struct {
}
SharedLink contains the information returned by a call to shared link creation