chore: move some types to model

This commit is contained in:
Noah Hsu
2022-06-15 18:06:42 +08:00
parent 2cddd3cf2b
commit 979f8383d8
10 changed files with 62 additions and 37 deletions

View File

@ -2,6 +2,7 @@ package driver
import (
"context"
"github.com/alist-org/alist/v3/internal/model"
)
@ -28,8 +29,8 @@ type Other interface {
}
type Reader interface {
List(ctx context.Context, path string) ([]FileInfo, error)
Link(ctx context.Context, path string, args LinkArgs) (*Link, error)
List(ctx context.Context, path string) ([]model.FileInfo, error)
Link(ctx context.Context, path string, args model.LinkArgs) (*model.Link, error)
//Get(ctx context.Context, path string) (FileInfo, error) // maybe not need
}
@ -39,5 +40,5 @@ type Writer interface {
Rename(ctx context.Context, srcPath, dstName string) error
Copy(ctx context.Context, srcPath, dstPath string) error
Remove(ctx context.Context, path string) error
Put(ctx context.Context, parentPath string, stream FileStream) error
Put(ctx context.Context, parentPath string, stream model.FileStreamer) error
}