fs

package
v0.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2023 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

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 WithConfigPath(path string) Option

func WithFsPathBase

func WithFsPathBase(path string) Option

func WithId

func WithId(id primitive.ObjectID) Option

func WithRepoPathBase

func WithRepoPathBase(path string) Option

func WithWorkspacePathBase

func WithWorkspacePathBase(path string) Option

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) Commit

func (svc *Service) Commit(msg string) (err error)

func (*Service) Copy

func (svc *Service) Copy(path, newPath string) (err error)

func (*Service) Delete

func (svc *Service) Delete(path string) (err error)

func (*Service) Exists added in v0.6.1

func (svc *Service) Exists(path string) (ok bool)

func (*Service) GetConfigPath

func (svc *Service) GetConfigPath() string

func (*Service) GetFile

func (svc *Service) GetFile(path string) (data []byte, err error)

func (*Service) GetFileInfo

func (svc *Service) GetFileInfo(path string) (file interfaces.FsFileInfo, err error)

func (*Service) GetFsPath

func (svc *Service) GetFsPath() (res string)

func (*Service) GetFsService

func (svc *Service) GetFsService() (fsSvc interfaces.FsService)

func (*Service) GetRepoPath

func (svc *Service) GetRepoPath() (res string)

func (*Service) GetWorkspacePath

func (svc *Service) GetWorkspacePath() (res string)

func (*Service) Init

func (svc *Service) Init() (err error)

func (*Service) List

func (svc *Service) List(path string) (files []interfaces.FsFileInfo, err error)

func (*Service) Rename

func (svc *Service) Rename(path, newPath string) (err error)

func (*Service) Save

func (svc *Service) Save(path string, data []byte) (err error)

func (*Service) SetConfigPath

func (svc *Service) SetConfigPath(path string)

func (*Service) SetFsPathBase

func (svc *Service) SetFsPathBase(path string)

func (*Service) SetId

func (svc *Service) SetId(id primitive.ObjectID)

func (*Service) SetRepoPathBase

func (svc *Service) SetRepoPathBase(path string)

func (*Service) SetWorkspacePathBase

func (svc *Service) SetWorkspacePathBase(path string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL