Skip to content

Commit

Permalink
chore: implement the driver interface with obj return [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Sep 8, 2023
1 parent 8e43335 commit 335b11c
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions drivers/template/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,34 +41,34 @@ func (d *Template) Link(ctx context.Context, file model.Obj, args model.LinkArgs
return nil, errs.NotImplement
}

func (d *Template) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) error {
func (d *Template) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) (model.Obj, error) {
// TODO create folder, optional
return errs.NotImplement
return nil, errs.NotImplement
}

func (d *Template) Move(ctx context.Context, srcObj, dstDir model.Obj) error {
func (d *Template) Move(ctx context.Context, srcObj, dstDir model.Obj) (model.Obj, error) {
// TODO move obj, optional
return errs.NotImplement
return nil, errs.NotImplement
}

func (d *Template) Rename(ctx context.Context, srcObj model.Obj, newName string) error {
func (d *Template) Rename(ctx context.Context, srcObj model.Obj, newName string) (model.Obj, error) {
// TODO rename obj, optional
return errs.NotImplement
return nil, errs.NotImplement
}

func (d *Template) Copy(ctx context.Context, srcObj, dstDir model.Obj) error {
func (d *Template) Copy(ctx context.Context, srcObj, dstDir model.Obj) (model.Obj, error) {
// TODO copy obj, optional
return errs.NotImplement
return nil, errs.NotImplement
}

func (d *Template) Remove(ctx context.Context, obj model.Obj) error {
// TODO remove obj, optional
return errs.NotImplement
}

func (d *Template) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, up driver.UpdateProgress) error {
func (d *Template) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, up driver.UpdateProgress) (model.Obj, error) {
// TODO upload file, optional
return errs.NotImplement
return nil, errs.NotImplement
}

//func (d *Template) Other(ctx context.Context, args model.OtherArgs) (interface{}, error) {
Expand Down

0 comments on commit 335b11c

Please sign in to comment.