refactor: obj name mapping and internal path processing (#2733)
* refactor:Prepare to remove the get interface * feat:add obj Unwarp interface * refactor:obj name mapping and program internal path processing * chore: fix typo * feat: unwrap get * fix: no use op.Get to get parent id * fix: set the path uniformly Co-authored-by: Noah Hsu <i@nn.ci>
This commit is contained in:
@ -80,7 +80,7 @@ func Remove(ctx context.Context, path string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
func PutDirectly(ctx context.Context, dstDirPath string, file model.FileStreamer) error {
|
||||
func PutDirectly(ctx context.Context, dstDirPath string, file *model.FileStream) error {
|
||||
err := putDirectly(ctx, dstDirPath, file)
|
||||
if err != nil {
|
||||
log.Errorf("failed put %s: %+v", dstDirPath, err)
|
||||
@ -88,7 +88,7 @@ func PutDirectly(ctx context.Context, dstDirPath string, file model.FileStreamer
|
||||
return err
|
||||
}
|
||||
|
||||
func PutAsTask(dstDirPath string, file model.FileStreamer) error {
|
||||
func PutAsTask(dstDirPath string, file *model.FileStream) error {
|
||||
err := putAsTask(dstDirPath, file)
|
||||
if err != nil {
|
||||
log.Errorf("failed put %s: %+v", dstDirPath, err)
|
||||
|
Reference in New Issue
Block a user