refactor: cleanup code

This commit is contained in:
Marvin Zhang
2024-10-25 11:18:57 +08:00
parent 5af81a4a60
commit 1485dd85e9
91 changed files with 323 additions and 4604 deletions

View File

@@ -1,28 +0,0 @@
package interfaces
import (
cfs "github.com/crawlab-team/crawlab/fs"
vcs "github.com/crawlab-team/crawlab/vcs"
)
type FsService interface {
WithConfigPath
List(path string, opts ...ServiceCrudOption) (files []FsFileInfo, err error)
GetFile(path string, opts ...ServiceCrudOption) (data []byte, err error)
GetFileInfo(path string, opts ...ServiceCrudOption) (file FsFileInfo, err error)
Save(path string, data []byte, opts ...ServiceCrudOption) (err error)
Rename(path, newPath string, opts ...ServiceCrudOption) (err error)
Delete(path string, opts ...ServiceCrudOption) (err error)
Copy(path, newPath string, opts ...ServiceCrudOption) (err error)
Commit(msg string) (err error)
SyncToFs(opts ...ServiceCrudOption) (err error)
SyncToWorkspace() (err error)
GetFsPath() (path string)
SetFsPath(path string)
GetWorkspacePath() (path string)
SetWorkspacePath(path string)
GetRepoPath() (path string)
SetRepoPath(path string)
GetFs() (fs cfs.Manager)
GetGitClient() (c *vcs.GitClient)
}