remotemock

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockClient

type MockClient struct {
	// contains filtered or unexported fields
}

func New

func New(targets []checks.GlobalTarget) *MockClient

New creates a new MockClient to mock the remote.Interactor

func (*MockClient) DeleteFile

func (m *MockClient) DeleteFile(ctx context.Context, file remote.File) error

func (*MockClient) FetchFiles

func (m *MockClient) FetchFiles(ctx context.Context) ([]checks.GlobalTarget, error)

func (*MockClient) PostFile

func (m *MockClient) PostFile(ctx context.Context, _ remote.File) error

func (*MockClient) PostFileCalled

func (m *MockClient) PostFileCalled() bool

func (*MockClient) PostFileCount

func (m *MockClient) PostFileCount() int

PostFileCount returns the number of times PostFile was called

func (*MockClient) PutFile

func (m *MockClient) PutFile(ctx context.Context, _ remote.File) error

func (*MockClient) PutFileCalled

func (m *MockClient) PutFileCalled() bool

PutFileCalled returns true if PutFile was called

func (*MockClient) PutFileCount

func (m *MockClient) PutFileCount() int

PutFileCount returns the number of times PutFile was called

func (*MockClient) SetDeleteFileErr

func (m *MockClient) SetDeleteFileErr(err error)

SetDeleteFileErr sets the error returned by DeleteFile

func (*MockClient) SetFetchFilesErr

func (m *MockClient) SetFetchFilesErr(err error)

SetFetchFilesErr sets the error returned by FetchFiles

func (*MockClient) SetPostFileErr

func (m *MockClient) SetPostFileErr(err error)

SetPostFileErr sets the error returned by PostFile

func (*MockClient) SetPutFileErr

func (m *MockClient) SetPutFileErr(err error)

SetPutFileErr sets the error returned by PutFile

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL