Documentation
¶
Index ¶
- func BatchOperation(name, desc, dstFs, dstRemote string, endpoints []string, items []ListItem)
- func Copy(items []ListItem, dstFs, dstRemote string)
- func CreateMount(mountData map[string]interface{}) error
- func Delete(items []ListItem)
- func GetDataSlice(ctx context.Context, endpoint, key string) ([]string, error)
- func GetListPath(path, dir string, cdback bool) (string, string)
- func ListMountTypes(ctx context.Context) ([]string, error)
- func ListRemotes(ctx context.Context) ([]string, error)
- func Mkdir(id, fs, remote, name string) error
- func Move(items []ListItem, dstFs, dstRemote string)
- func PublicLink(id, fs, remote string, item ListItem) (string, error)
- func Unmount(mountpoint string) error
- func UnmountAll() error
- type About
- type FsDetail
- type List
- type ListItem
- type MountHelp
- type MountPoint
- type Mounts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BatchOperation ¶
BatchOperation starts a batch job on a list of items.
func CreateMount ¶
CreateMount creates a mountpoint.
func GetDataSlice ¶
GetDataSlice runs a command and returns its output as a slice.
func GetListPath ¶
GetListPath returns the joined path with the provided directory, or if cdback is true, returns the path's directory.
func ListMountTypes ¶
ListMountTypes lists the mount types.
func ListRemotes ¶
ListRemotes lists the configured remotes.
func PublicLink ¶
PublicLink returns a public link for the provided item.
Types ¶
type About ¶
type About struct {
Total int64 `json:"total"`
Used int64 `json:"used"`
Trashed int64 `json:"trashed"`
Other int64 `json:"other"`
Free int64 `json:"free"`
}
About stores the storage information for a remote.
type FsDetail ¶ added in v0.0.3
type FsDetail struct {
Name string `json:"Name"`
Precision int `json:"Precision"`
Root string `json:"Root"`
String string `json:"String"`
Hashes []string `json:"Hashes"`
Features map[string]bool `json:"Features"`
FeatureList []string
}
FsDetail stores details of a remote.
type ListItem ¶
type ListItem struct {
ID string `mapstructure:"ID"`
IsDir bool `mapstructure:"IsDir"`
MimeType string `mapstructure:"MimeType"`
ModTime string `mapstructure:"ModTime"`
Name string `mapstructure:"Name"`
Path string `mapstructure:"Path"`
Size int64 `mapstructure:"Size"`
FS string
ISize string
ModifiedTime string
ModifiedTimeUnix int64
About bool
RefreshAddItem bool
}
ListItem stores information about a directory entry.
type MountHelp ¶
type MountHelp struct {
Name, Help, OptionType, ValueType string
Windows, OSX, Other bool
Options []string
}
MountHelp stores information about a mount option.
func GetMountHelp ¶
GetMountHelp returns the information for a mount option.
func GetMountOptions ¶
GetMountOptions returns a list of all mount options.
type MountPoint ¶
type MountPoint struct {
Fs string `json:"Fs"`
MountPoint string `json:"MountPoint"`
MountedOn time.Time `json:"MountedOn"`
}
MountPoint stores information about a mountpoint.
func GetMountPoints ¶
func GetMountPoints() ([]MountPoint, error)
GetMountPoints returns a list of mountpoints.
type Mounts ¶
type Mounts struct {
MountPoints []MountPoint `json:"mountPoints"`
}
Mounts stores the list of mountpoints.