Documentation
¶
Index ¶
- type FsMockRepository
- func (repo *FsMockRepository) CopyFile(srcPath string, dstPath string) error
- func (repo *FsMockRepository) CreateDir(path string) error
- func (repo *FsMockRepository) GetModTime(path string) (time.Time, error)
- func (repo *FsMockRepository) HomeDir() (string, error)
- func (repo *FsMockRepository) IsBrokenSymlink(path string) (bool, error)
- func (repo *FsMockRepository) IsDir(path string) (bool, error)
- func (repo *FsMockRepository) IsExist(path string) bool
- func (repo *FsMockRepository) ListFiles(path string) ([]string, error)
- func (repo *FsMockRepository) Remove(path string) error
- func (repo *FsMockRepository) WorkDir() (string, error)
- type FsRepository
- func (repo *FsRepository) CopyFile(srcPath string, dstPath string) error
- func (repo *FsRepository) CreateDir(path string) error
- func (repo *FsRepository) GetModTime(path string) (time.Time, error)
- func (repo *FsRepository) HomeDir() (string, error)
- func (repo *FsRepository) IsBrokenSymlink(path string) (bool, error)
- func (repo *FsRepository) IsDir(path string) (bool, error)
- func (repo *FsRepository) IsExist(path string) bool
- func (repo *FsRepository) ListFiles(path string) ([]string, error)
- func (repo *FsRepository) Remove(path string) error
- func (repo *FsRepository) WorkDir() (string, error)
- type FsRepositoryInterface
- type PromptRepository
- type PromptRepositoryInterface
- type Repos
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FsMockRepository ¶
type FsMockRepository struct {
Files []string
}
func (*FsMockRepository) CopyFile ¶
func (repo *FsMockRepository) CopyFile(srcPath string, dstPath string) error
func (*FsMockRepository) CreateDir ¶
func (repo *FsMockRepository) CreateDir(path string) error
func (*FsMockRepository) GetModTime ¶
func (repo *FsMockRepository) GetModTime(path string) (time.Time, error)
func (*FsMockRepository) HomeDir ¶
func (repo *FsMockRepository) HomeDir() (string, error)
func (*FsMockRepository) IsBrokenSymlink ¶
func (repo *FsMockRepository) IsBrokenSymlink(path string) (bool, error)
func (*FsMockRepository) IsExist ¶
func (repo *FsMockRepository) IsExist(path string) bool
check file or dir existence with roughly logic. if path is dir, please include dir path inside FsMockRepository.Files.
func (*FsMockRepository) ListFiles ¶
func (repo *FsMockRepository) ListFiles(path string) ([]string, error)
func (*FsMockRepository) Remove ¶
func (repo *FsMockRepository) Remove(path string) error
func (*FsMockRepository) WorkDir ¶
func (repo *FsMockRepository) WorkDir() (string, error)
type FsRepository ¶
type FsRepository struct{}
func (*FsRepository) CopyFile ¶
func (repo *FsRepository) CopyFile(srcPath string, dstPath string) error
func (*FsRepository) CreateDir ¶
func (repo *FsRepository) CreateDir(path string) error
func (*FsRepository) GetModTime ¶
func (repo *FsRepository) GetModTime(path string) (time.Time, error)
func (*FsRepository) HomeDir ¶
func (repo *FsRepository) HomeDir() (string, error)
func (*FsRepository) IsBrokenSymlink ¶
func (repo *FsRepository) IsBrokenSymlink(path string) (bool, error)
func (*FsRepository) IsExist ¶
func (repo *FsRepository) IsExist(path string) bool
func (*FsRepository) Remove ¶
func (repo *FsRepository) Remove(path string) error
func (*FsRepository) WorkDir ¶
func (repo *FsRepository) WorkDir() (string, error)
type FsRepositoryInterface ¶
type FsRepositoryInterface interface { IsExist(path string) bool IsDir(path string) (bool, error) GetModTime(path string) (time.Time, error) IsBrokenSymlink(path string) (bool, error) CreateDir(path string) error HomeDir() (string, error) WorkDir() (string, error) Remove(path string) error CopyFile(srcPath string, dstPath string) error ListFiles(path string) ([]string, error) }
type PromptRepository ¶
type PromptRepository struct {
// contains filtered or unexported fields
}
func (*PromptRepository) StartSelectPrompt ¶
func (repo *PromptRepository) StartSelectPrompt(message string, completer prompt.Completer) string
type Repos ¶
type Repos struct { Fs FsRepositoryInterface Prompt PromptRepositoryInterface }
func NewMock ¶ added in v0.0.15
func NewMock(fsmock *FsMockRepository) Repos
Click to show internal directories.
Click to hide internal directories.