Documentation ¶
Index ¶
- Variables
- func Logger() log.Logger
- func NewFakeBackupContext(target string, env map[string]string, storageProvider cfbackup.StorageProvider) (backupContext cfbackup.BackupContext)
- func NewFakeDirector(ip, username, password string, port int) bosh.Bosh
- func NewLocalMockExecuter() command.Executer
- type ClosingBuffer
- type FailExecuter
- type FailureMockNFSExecuter
- type FakeStorageProvider
- type MockHTTPGateway
- type SuccessExecuter
- type SuccessMockNFSExecuter
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //SuccessString -- SuccessString = `{"state":"done"}` //FailureString -- FailureString = `{"state":"notdone"}` )
View Source
var ( NfsSuccessString = "success nfs" NfsFailureString = "failed nfs" )
Exported status strings
View Source
var ( //ErrMockNfsCommand --- ErrMockNfsCommand = errors.New("error occurred") )
View Source
var GetNfs = func(lf io.Writer, cmdexec command.Executer) *cfbackup.NFSBackup { return &cfbackup.NFSBackup{ Caller: cmdexec, RemoteOps: &mockRemoteOps{ Writer: lf, }, } }
GetNfs ---
View Source
var MockMultiPartBodyFunc = func(string, string, io.Reader, map[string]string) (io.Reader, error) { return &ClosingBuffer{bytes.NewBufferString("success")}, nil }
MockMultiPartBodyFunc --
View Source
var MockMultiPartUploadFunc = func(ghttp.ConnAuth, string, string, int64, io.Reader, map[string]string) (*http.Response, error) { return &http.Response{ StatusCode: 200, }, nil }
MockMultiPartUploadFunc ---
Functions ¶
func NewFakeBackupContext ¶
func NewFakeBackupContext(target string, env map[string]string, storageProvider cfbackup.StorageProvider) (backupContext cfbackup.BackupContext)
NewFakeBackupContext --
func NewFakeDirector ¶
NewFakeDirector ---
Types ¶
type ClosingBuffer ¶
ClosingBuffer ---
type FakeStorageProvider ¶
type FakeStorageProvider struct { }
FakeStorageProvider --
func (*FakeStorageProvider) Reader ¶
func (d *FakeStorageProvider) Reader(path ...string) (io.ReadCloser, error)
Reader ---
func (*FakeStorageProvider) Writer ¶
func (d *FakeStorageProvider) Writer(path ...string) (closer io.WriteCloser, err error)
Writer --
type MockHTTPGateway ¶
MockHTTPGateway --
func (*MockHTTPGateway) Get ¶
func (gateway *MockHTTPGateway) Get(entity ghttp.HttpRequestEntity) ghttp.RequestAdaptor
Get --
func (*MockHTTPGateway) Post ¶
func (gateway *MockHTTPGateway) Post(entity ghttp.HttpRequestEntity, body io.Reader) ghttp.RequestAdaptor
Post ---
func (*MockHTTPGateway) Put ¶
func (gateway *MockHTTPGateway) Put(entity ghttp.HttpRequestEntity, body io.Reader) ghttp.RequestAdaptor
Put --
Click to show internal directories.
Click to hide internal directories.