Documentation ¶
Index ¶
- func InitMockTerm(mt *MockTerm)
- type Expector
- type MockClient
- type MockFI
- type MockFS
- func (mf MockFS) Close() error
- func (mf MockFS) Open(file string) (http.File, error)
- func (mf MockFS) Read(p []byte) (int, error)
- func (mf MockFS) Readdir(n int) ([]os.FileInfo, error)
- func (mf *MockFS) SawName()
- func (mf MockFS) Seek(offset int64, whence int) (int64, error)
- func (mf MockFS) Stat() (os.FileInfo, error)
- type MockFile
- type MockRdr
- type MockServ
- type MockTerm
- func (mt MockTerm) BreakCheck() bool
- func (mt MockTerm) Cls()
- func (mt MockTerm) GetCursor() (int, int)
- func (mt MockTerm) Locate(int, int)
- func (mt MockTerm) Log(msg string)
- func (mt MockTerm) Print(msg string)
- func (mt MockTerm) Println(msg string)
- func (mt MockTerm) Read(col, row, length int) string
- func (mt MockTerm) ReadKeys(count int) []byte
- func (mt MockTerm) SoundBell()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitMockTerm ¶
func InitMockTerm(mt *MockTerm)
Types ¶
type MockClient ¶
type MockClient struct { Contents string // file contents to send back Url string // Url to validate Err error // Error to return on call StatusCode int // Status code to return }
mocks the parts of http.Client that I use
type MockFI ¶
type MockFS ¶
type MockFS struct { File string // Filename Content string // text in the file StatErr bool // return an error when stat is called ReadErr *bool // return error from read call OpenAlways bool // return a file handle no matter what Events map[string]bool // desired Readdir results Names []string Err int }
type MockFile ¶
type MockFile struct { FileName string AccMode gwtypes.AccessMode LckMode gwtypes.LockMode }
func MockAnOpenFile ¶
func (*MockFile) AccessMode ¶
func (maf *MockFile) AccessMode() gwtypes.AccessMode
type MockServ ¶
func NewMockServer ¶
NewMockServer returns a pointer to a ready to use mock http server caller should call close when finished, to shut it down
Click to show internal directories.
Click to hide internal directories.