Documentation
¶
Index ¶
- Variables
- type BrokenFS
- func (fs *BrokenFS) Chroot(path string) (billy.Filesystem, error)
- func (fs *BrokenFS) Create(filename string) (billy.File, error)
- func (fs *BrokenFS) Open(filename string) (billy.File, error)
- func (fs *BrokenFS) OpenFile(filename string, flag int, perm os.FileMode) (billy.File, error)
- func (fs *BrokenFS) Stat(filename string) (os.FileInfo, error)
- func (fs *BrokenFS) TempFile(dir, prefix string) (billy.File, error)
- type BrokenFSOptions
- type Helper
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBrokenFS = fmt.Errorf("mocked")
ErrBrokenFS is a default error that will be returned if some operation is mocked
Functions ¶
This section is empty.
Types ¶
type BrokenFS ¶
type BrokenFS struct { billy.Filesystem // contains filtered or unexported fields }
BrokenFS is a simple billy.Filesystem mockup
func NewBrokenFS ¶
func NewBrokenFS(fs billy.Filesystem, opts BrokenFSOptions) *BrokenFS
NewBrokenFS is BrokenFS constructor
type BrokenFSOptions ¶
type BrokenFSOptions struct { FailedOpen bool FailedOpenFile bool FailedStat bool FailedChroot bool FailedCreate bool FailedTempFile bool }
BrokenFSOptions contains list of operations that will be broken in the scope of this mock up
Click to show internal directories.
Click to hide internal directories.