🎨 change link interface

This commit is contained in:
微凉
2021-12-19 20:00:53 +08:00
parent f5b8815a84
commit d00f75c814
14 changed files with 96 additions and 73 deletions

View File

@ -14,10 +14,9 @@ import (
type Onedrive struct{}
func (driver Onedrive) Config() base.DriverConfig {
return base.DriverConfig{
Name: "Onedrive",
Name: "Onedrive",
OnlyProxy: false,
}
}
@ -173,8 +172,8 @@ func (driver Onedrive) Files(path string, account *model.Account) ([]model.File,
return files, nil
}
func (driver Onedrive) Link(path string, account *model.Account) (*base.Link, error) {
file, err := driver.GetFile(account, path)
func (driver Onedrive) Link(args base.Args, account *model.Account) (*base.Link, error) {
file, err := driver.GetFile(account, args.Path)
if err != nil {
return nil, err
}
@ -232,4 +231,4 @@ func (driver Onedrive) Upload(file *model.FileStream, account *model.Account) er
return base.ErrNotImplement
}
var _ base.Driver = (*Onedrive)(nil)
var _ base.Driver = (*Onedrive)(nil)