Documentation ¶
Index ¶
- func GetSpiderFsService(id primitive.ObjectID, opts ...Option) (svc interfaces.SpiderFsService, err error)
- func NewSpiderFsService(id primitive.ObjectID, opts ...Option) (svc2 interfaces.SpiderFsService, err error)
- func ProvideGetSpiderFsService(id primitive.ObjectID, opts ...Option) func() (svc interfaces.SpiderFsService, err error)
- func ProvideSpiderFsService(id primitive.ObjectID, opts ...Option) func() (svc interfaces.SpiderFsService, err error)
- type Option
- type Service
- func (svc *Service) Commit(msg string) (err error)
- func (svc *Service) Copy(path, newPath string) (err error)
- func (svc *Service) Delete(path string) (err error)
- func (svc *Service) Exists(path string) (ok bool)
- func (svc *Service) GetConfigPath() string
- func (svc *Service) GetFile(path string) (data []byte, err error)
- func (svc *Service) GetFileInfo(path string) (file interfaces.FsFileInfo, err error)
- func (svc *Service) GetFsPath() (res string)
- func (svc *Service) GetFsService() (fsSvc interfaces.FsService)
- func (svc *Service) GetRepoPath() (res string)
- func (svc *Service) GetWorkspacePath() (res string)
- func (svc *Service) Init() (err error)
- func (svc *Service) List(path string) (files []interfaces.FsFileInfo, err error)
- func (svc *Service) Rename(path, newPath string) (err error)
- func (svc *Service) Save(path string, data []byte) (err error)
- func (svc *Service) SetConfigPath(path string)
- func (svc *Service) SetFsPathBase(path string)
- func (svc *Service) SetId(id primitive.ObjectID)
- func (svc *Service) SetRepoPathBase(path string)
- func (svc *Service) SetWorkspacePathBase(path string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSpiderFsService ¶
func GetSpiderFsService(id primitive.ObjectID, opts ...Option) (svc interfaces.SpiderFsService, err error)
func NewSpiderFsService ¶
func NewSpiderFsService(id primitive.ObjectID, opts ...Option) (svc2 interfaces.SpiderFsService, err error)
func ProvideGetSpiderFsService ¶
func ProvideGetSpiderFsService(id primitive.ObjectID, opts ...Option) func() (svc interfaces.SpiderFsService, err error)
func ProvideSpiderFsService ¶
func ProvideSpiderFsService(id primitive.ObjectID, opts ...Option) func() (svc interfaces.SpiderFsService, err error)
Types ¶
type Option ¶
type Option func(svc interfaces.SpiderFsService)
func WithConfigPath ¶
func WithFsPathBase ¶
func WithRepoPathBase ¶
func WithWorkspacePathBase ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service implementation of interfaces.SpiderFsService It is a wrapper of interfaces.FsService that manages a spider's fs related functions
func (*Service) GetConfigPath ¶
func (*Service) GetFileInfo ¶
func (svc *Service) GetFileInfo(path string) (file interfaces.FsFileInfo, err error)
func (*Service) GetFsService ¶
func (svc *Service) GetFsService() (fsSvc interfaces.FsService)
func (*Service) GetRepoPath ¶
func (*Service) GetWorkspacePath ¶
func (*Service) List ¶
func (svc *Service) List(path string) (files []interfaces.FsFileInfo, err error)
func (*Service) SetConfigPath ¶
func (*Service) SetFsPathBase ¶
func (*Service) SetRepoPathBase ¶
func (*Service) SetWorkspacePathBase ¶
Click to show internal directories.
Click to hide internal directories.