fs

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2022 License: BSD-3-Clause Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultFsPath = "/fs"

Variables

View Source
var DefaultRepoPath string
View Source
var DefaultWorkspacePath string

Functions

func IsAbsolute

func IsAbsolute() interfaces.ServiceCrudOption

func NewFsService

func NewFsService(opts ...Option) (svc2 interfaces.FsService, err error)

Types

type FilerFileInfoSlice

type FilerFileInfoSlice []goseaweedfs.FilerFileInfo

func (FilerFileInfoSlice) Len

func (f FilerFileInfoSlice) Len() int

func (FilerFileInfoSlice) Less

func (f FilerFileInfoSlice) Less(i, j int) bool

func (FilerFileInfoSlice) Swap

func (f FilerFileInfoSlice) Swap(i, j int)

type Option

type Option func(svc interfaces.FsService)

func WithConfigPath

func WithConfigPath(path string) Option

func WithFsPath

func WithFsPath(path string) Option

func WithRepoPath

func WithRepoPath(path string) Option

func WithWorkspacePath

func WithWorkspacePath(path string) Option

type Service

type Service struct {
	// contains filtered or unexported fields
}

func (*Service) Commit

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

func (*Service) Copy

func (svc *Service) Copy(path, newPath string, opts ...interfaces.ServiceCrudOption) (err error)

func (*Service) Delete

func (svc *Service) Delete(path string, opts ...interfaces.ServiceCrudOption) (err error)

func (*Service) GetConfigPath

func (svc *Service) GetConfigPath() string

func (*Service) GetFile

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

func (*Service) GetFileInfo

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

func (*Service) GetFs

func (svc *Service) GetFs() (fs cfs.Manager)

func (*Service) GetFsPath

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

func (*Service) GetGitClient

func (svc *Service) GetGitClient() (c *vcs.GitClient)

func (*Service) GetRepoPath

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

func (*Service) GetWorkspacePath

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

func (*Service) List

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

func (*Service) Rename

func (svc *Service) Rename(path, newPath string, opts ...interfaces.ServiceCrudOption) (err error)

func (*Service) Save

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

func (*Service) SetConfigPath

func (svc *Service) SetConfigPath(path string)

func (*Service) SetFsPath

func (svc *Service) SetFsPath(path string)

func (*Service) SetRepoPath

func (svc *Service) SetRepoPath(path string)

func (*Service) SetWorkspacePath

func (svc *Service) SetWorkspacePath(path string)

func (*Service) SyncToFs

func (svc *Service) SyncToFs(opts ...interfaces.ServiceCrudOption) (err error)

SyncToFs sync from repo/workspace to fs

func (*Service) SyncToWorkspace

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

SyncToWorkspace sync from fs to workspace

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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