Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Api ¶
type Api interface { Sign() error Space() (Space, error) Login(name, password string) error Find(id, name string) (File, error) FindDir(id, name string) (File, error) FindFile(id, name string) (File, error) ListFile(id string) ([]File, error) Mkdir(parentId, path string, parents bool) error Mkdirs(parentId string, path ...string) (map[string]interface{}, error) Copy(taget string, src ...File) error Move(taget string, src ...File) error Delete(src ...File) error Rename(file File, newName string) error Download(file File, start int64) (*http.Response, error) ReadWriter }
type App ¶
type App interface { Uploader() ReadWriter Login(name, password string) error Sign() error Space() (Space, error) Stat(path string) (File, error) List(file File) ([]File, error) ListBy(name string) ([]File, error) Mkdir(path string, parents bool) error Mkdirs(path ...string) error Copy(target string, from ...string) error Move(target string, from ...string) error Remove(paths ...string) error Download(local string, paths ...string) error DownloadFile(local string, file File) error Upload(cloud string, locals ...string) error }
type Drive ¶ added in v0.6.0
type Drive interface { fs.StatFS fs.ReadDirFS Space() (Space, error) Mkdir(name string) error Delete(name ...string) error Login(username, password string) error Copy(target string, source ...string) error Move(target string, source ...string) error Upload(config UploadConfig, cloud string, locals ...string) error UploadFrom(file Upload) error Download(local string, cloud ...string) error GetDownloadUrl(cloud string) (string, error) }
type DriveApi ¶ added in v0.6.0
type DriveApi interface { PwdLogin(username, password string) error // get upload Uploader() ReadWriter // get download link Download(file File, start int64) (*http.Response, error) // sign for space Sign() error // get space info Space() (Space, error) // searce file by type Search(parent File, fileType FileType, name string) ([]File, error) // list file by type List(parent File, fileType FileType) ([]File, error) // mkdir Mkdir(parent File, name string) (File, error) // rename file Rename(target File, name string) error // move file Move(target File, source ...File) error // copy file Copy(target File, source ...File) error // delete file Delete(file ...File) error }
type ReadWriter ¶ added in v0.6.0
type UploadConfig ¶ added in v0.6.2
func (*UploadConfig) Check ¶ added in v0.6.2
func (c *UploadConfig) Check() (err error)
func (*UploadConfig) Match ¶ added in v0.6.2
func (c *UploadConfig) Match(name string) bool
func (*UploadConfig) NewTask ¶ added in v0.6.2
func (c *UploadConfig) NewTask() *util.TaskPool
type UploadFile ¶
type Uploader1 ¶ added in v0.6.0
type Uploader1 interface {
Upload(file UploadFile, part UploadPart) error
}
Click to show internal directories.
Click to hide internal directories.