Documentation ¶
Index ¶
- func NewStubReader(stub *testing.Stub, content string) io.Reader
- func NewStubWriter(stub *testing.Stub) (io.Writer, *bytes.Buffer)
- type Dir
- type Entries
- type Entry
- type File
- type FileInfo
- type Removed
- type StubCloser
- type StubFile
- type StubFileInfo
- type StubHash
- type StubReader
- type StubSeeker
- type StubWriter
- type Symlink
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Dir ¶
Dir is an Entry that allows directories to be created and verified. The Path field should use "/" as the path separator.
type Entries ¶
type Entries []Entry
Entries supplies convenience methods on Entry slices.
func (Entries) AsRemoveds ¶
AsRemoveds returns a slice of Removed entries whose paths correspond to those in e.
type Entry ¶
type Entry interface { // GetPath returns the slash-separated relative path that this // entry represents. GetPath() string // Create causes the entry to be created, relative to basePath. It returns // a copy of the receiver. Create(c *gc.C, basePath string) Entry // Check checks that the entry exists, relative to basePath, and matches // the entry that would be created by Create. It returns a copy of the // receiver. Check(c *gc.C, basePath string) Entry }
Entry represents a filesystem entity that can be created; and whose correctness can be verified.
type File ¶
File is an Entry that allows plain files to be created and verified. The Path field should use "/" as the path separator.
type Removed ¶
type Removed struct {
Path string
}
Removed is an Entry that indicates the absence of any entry. The Path field should use "/" as the path separator.
type StubCloser ¶
func (*StubCloser) Close ¶
func (s *StubCloser) Close() error
type StubFile ¶
type StubFile struct { io.Reader io.Writer io.Seeker io.Closer Stub *testing.Stub Info StubFileInfo }
func NewStubFile ¶
func NewStubFile(stub *testing.Stub, raw io.ReadWriter) *StubFile
type StubFileInfo ¶
func NewStubFileInfo ¶
func NewStubFileInfo(stub *testing.Stub, name, content string) *StubFileInfo
func (StubFileInfo) IsDir ¶
func (s StubFileInfo) IsDir() bool
func (StubFileInfo) ModTime ¶
func (s StubFileInfo) ModTime() time.Time
func (StubFileInfo) Mode ¶
func (s StubFileInfo) Mode() os.FileMode
func (StubFileInfo) Name ¶
func (s StubFileInfo) Name() string
func (StubFileInfo) Size ¶
func (s StubFileInfo) Size() int64
func (StubFileInfo) Sys ¶
func (s StubFileInfo) Sys() interface{}
type StubHash ¶
type StubReader ¶
type StubSeeker ¶
type StubWriter ¶
Click to show internal directories.
Click to hide internal directories.