Documentation
¶
Index ¶
- type FileAlreadyExistsError
- type FileManager
- type FileManagerImpl
- func (fm *FileManagerImpl) ApplyPatch(ctx context.Context, fs afero.Fs, path, patch string) (*model.File, error)
- func (fm *FileManagerImpl) CreateFile(ctx context.Context, fs afero.Fs, path, content string) (*model.File, error)
- func (fm *FileManagerImpl) DeleteFile(ctx context.Context, fs afero.Fs, path string) error
- func (fm *FileManagerImpl) ListFiles(ctx context.Context, fs afero.Fs, opts ...ListFileOption) ([]*model.File, error)
- func (fm *FileManagerImpl) ReadFile(ctx context.Context, fs afero.Fs, path string) (*model.File, error)
- func (fm *FileManagerImpl) UpdateFile(ctx context.Context, fs afero.Fs, path, content string) (*model.File, error)
- func (fm *FileManagerImpl) UpdateLines(ctx context.Context, fs afero.Fs, path string, lineDiff LineDiffChunk) (*model.File, error)
- type FileNotFoundError
- type LineDiffChunk
- type ListFileOption
- type ListFilesOptions
- type PatternFilter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileAlreadyExistsError ¶
type FileAlreadyExistsError struct {
// contains filtered or unexported fields
}
func NewFileAlreadyExistsError ¶
func NewFileAlreadyExistsError(path string) *FileAlreadyExistsError
func (FileAlreadyExistsError) Error ¶
func (e FileAlreadyExistsError) Error() string
type FileManager ¶
type FileManager interface { CreateFile(ctx context.Context, fs afero.Fs, path, content string) (*model.File, error) ReadFile(ctx context.Context, fs afero.Fs, path string) (*model.File, error) UpdateFile(ctx context.Context, fs afero.Fs, path, content string) (*model.File, error) DeleteFile(ctx context.Context, fs afero.Fs, path string) error ListFiles(ctx context.Context, fs afero.Fs, opts ...ListFileOption) ([]*model.File, error) ApplyPatch(ctx context.Context, fs afero.Fs, path, patch string) (*model.File, error) UpdateLines(ctx context.Context, fs afero.Fs, path string, lineDiff LineDiffChunk) (*model.File, error) }
func NewFileManager ¶
func NewFileManager(factory gitignore.MatcherFactory) FileManager
type FileManagerImpl ¶
type FileManagerImpl struct {
// contains filtered or unexported fields
}
func (*FileManagerImpl) ApplyPatch ¶
func (*FileManagerImpl) CreateFile ¶
func (*FileManagerImpl) DeleteFile ¶
func (*FileManagerImpl) ListFiles ¶
func (fm *FileManagerImpl) ListFiles(ctx context.Context, fs afero.Fs, opts ...ListFileOption) ([]*model.File, error)
func (*FileManagerImpl) UpdateFile ¶
func (*FileManagerImpl) UpdateLines ¶
func (fm *FileManagerImpl) UpdateLines(ctx context.Context, fs afero.Fs, path string, lineDiff LineDiffChunk) (*model.File, error)
type FileNotFoundError ¶
type FileNotFoundError struct {
// contains filtered or unexported fields
}
func NewFileNotFoundError ¶
func NewFileNotFoundError(path string) *FileNotFoundError
func (FileNotFoundError) Error ¶
func (e FileNotFoundError) Error() string
type LineDiffChunk ¶
type ListFileOption ¶
type ListFileOption func(opts *ListFilesOptions)
func ListFilesWithContent ¶
func ListFilesWithContent() ListFileOption
func ListFilesWithFilter ¶
func ListFilesWithFilter(filter PatternFilter) ListFileOption
func ListFilesWithShowHidden ¶
func ListFilesWithShowHidden() ListFileOption
type ListFilesOptions ¶
type ListFilesOptions struct { WithContent bool ShowHidden bool Filter PatternFilter }
type PatternFilter ¶
Click to show internal directories.
Click to hide internal directories.