Documentation
¶
Index ¶
- type ClienterMock
- func (mock *ClienterMock) Checker(ctx context.Context, check *healthcheck.CheckState) error
- func (mock *ClienterMock) CheckerCalls() []struct{ ... }
- func (mock *ClienterMock) CreateFileEvent(ctx context.Context, event files.FileEvent, headers sdk.Headers) (*files.FileEvent, error)
- func (mock *ClienterMock) CreateFileEventCalls() []struct{ ... }
- func (mock *ClienterMock) DeleteFile(ctx context.Context, filePath string, headers sdk.Headers) error
- func (mock *ClienterMock) DeleteFileCalls() []struct{ ... }
- func (mock *ClienterMock) GetFile(ctx context.Context, filePath string, headers sdk.Headers) (*files.StoredRegisteredMetaData, error)
- func (mock *ClienterMock) GetFileCalls() []struct{ ... }
- func (mock *ClienterMock) Health() *health.Client
- func (mock *ClienterMock) HealthCalls() []struct{}
- func (mock *ClienterMock) MarkFilePublished(ctx context.Context, filePath string, headers sdk.Headers) error
- func (mock *ClienterMock) MarkFilePublishedCalls() []struct{ ... }
- func (mock *ClienterMock) MarkFileUploaded(ctx context.Context, filePath string, etag string, headers sdk.Headers) error
- func (mock *ClienterMock) MarkFileUploadedCalls() []struct{ ... }
- func (mock *ClienterMock) RegisterFile(ctx context.Context, metadata files.StoredRegisteredMetaData, ...) error
- func (mock *ClienterMock) RegisterFileCalls() []struct{ ... }
- func (mock *ClienterMock) URL() string
- func (mock *ClienterMock) URLCalls() []struct{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClienterMock ¶
type ClienterMock struct {
// CheckerFunc mocks the Checker method.
CheckerFunc func(ctx context.Context, check *healthcheck.CheckState) error
// CreateFileEventFunc mocks the CreateFileEvent method.
CreateFileEventFunc func(ctx context.Context, event files.FileEvent, headers sdk.Headers) (*files.FileEvent, error)
// DeleteFileFunc mocks the DeleteFile method.
DeleteFileFunc func(ctx context.Context, filePath string, headers sdk.Headers) error
// GetFileFunc mocks the GetFile method.
GetFileFunc func(ctx context.Context, filePath string, headers sdk.Headers) (*files.StoredRegisteredMetaData, error)
// HealthFunc mocks the Health method.
HealthFunc func() *health.Client
// MarkFilePublishedFunc mocks the MarkFilePublished method.
MarkFilePublishedFunc func(ctx context.Context, filePath string, headers sdk.Headers) error
// MarkFileUploadedFunc mocks the MarkFileUploaded method.
MarkFileUploadedFunc func(ctx context.Context, filePath string, etag string, headers sdk.Headers) error
// RegisterFileFunc mocks the RegisterFile method.
RegisterFileFunc func(ctx context.Context, metadata files.StoredRegisteredMetaData, headers sdk.Headers) error
// URLFunc mocks the URL method.
URLFunc func() string
// contains filtered or unexported fields
}
ClienterMock is a mock implementation of sdk.Clienter.
func TestSomethingThatUsesClienter(t *testing.T) {
// make and configure a mocked sdk.Clienter
mockedClienter := &ClienterMock{
CheckerFunc: func(ctx context.Context, check *healthcheck.CheckState) error {
panic("mock out the Checker method")
},
CreateFileEventFunc: func(ctx context.Context, event files.FileEvent, headers sdk.Headers) (*files.FileEvent, error) {
panic("mock out the CreateFileEvent method")
},
DeleteFileFunc: func(ctx context.Context, filePath string, headers sdk.Headers) error {
panic("mock out the DeleteFile method")
},
GetFileFunc: func(ctx context.Context, filePath string, headers sdk.Headers) (*files.StoredRegisteredMetaData, error) {
panic("mock out the GetFile method")
},
HealthFunc: func() *health.Client {
panic("mock out the Health method")
},
MarkFilePublishedFunc: func(ctx context.Context, filePath string, headers sdk.Headers) error {
panic("mock out the MarkFilePublished method")
},
MarkFileUploadedFunc: func(ctx context.Context, filePath string, etag string, headers sdk.Headers) error {
panic("mock out the MarkFileUploaded method")
},
RegisterFileFunc: func(ctx context.Context, metadata files.StoredRegisteredMetaData, headers sdk.Headers) error {
panic("mock out the RegisterFile method")
},
URLFunc: func() string {
panic("mock out the URL method")
},
}
// use mockedClienter in code that requires sdk.Clienter
// and then make assertions.
}
func (*ClienterMock) Checker ¶
func (mock *ClienterMock) Checker(ctx context.Context, check *healthcheck.CheckState) error
Checker calls CheckerFunc.
func (*ClienterMock) CheckerCalls ¶
func (mock *ClienterMock) CheckerCalls() []struct { Ctx context.Context Check *healthcheck.CheckState }
CheckerCalls gets all the calls that were made to Checker. Check the length with:
len(mockedClienter.CheckerCalls())
func (*ClienterMock) CreateFileEvent ¶
func (mock *ClienterMock) CreateFileEvent(ctx context.Context, event files.FileEvent, headers sdk.Headers) (*files.FileEvent, error)
CreateFileEvent calls CreateFileEventFunc.
func (*ClienterMock) CreateFileEventCalls ¶
func (mock *ClienterMock) CreateFileEventCalls() []struct { Ctx context.Context Event files.FileEvent Headers sdk.Headers }
CreateFileEventCalls gets all the calls that were made to CreateFileEvent. Check the length with:
len(mockedClienter.CreateFileEventCalls())
func (*ClienterMock) DeleteFile ¶
func (mock *ClienterMock) DeleteFile(ctx context.Context, filePath string, headers sdk.Headers) error
DeleteFile calls DeleteFileFunc.
func (*ClienterMock) DeleteFileCalls ¶
func (mock *ClienterMock) DeleteFileCalls() []struct { Ctx context.Context FilePath string Headers sdk.Headers }
DeleteFileCalls gets all the calls that were made to DeleteFile. Check the length with:
len(mockedClienter.DeleteFileCalls())
func (*ClienterMock) GetFile ¶
func (mock *ClienterMock) GetFile(ctx context.Context, filePath string, headers sdk.Headers) (*files.StoredRegisteredMetaData, error)
GetFile calls GetFileFunc.
func (*ClienterMock) GetFileCalls ¶
func (mock *ClienterMock) GetFileCalls() []struct { Ctx context.Context FilePath string Headers sdk.Headers }
GetFileCalls gets all the calls that were made to GetFile. Check the length with:
len(mockedClienter.GetFileCalls())
func (*ClienterMock) Health ¶
func (mock *ClienterMock) Health() *health.Client
Health calls HealthFunc.
func (*ClienterMock) HealthCalls ¶
func (mock *ClienterMock) HealthCalls() []struct { }
HealthCalls gets all the calls that were made to Health. Check the length with:
len(mockedClienter.HealthCalls())
func (*ClienterMock) MarkFilePublished ¶
func (mock *ClienterMock) MarkFilePublished(ctx context.Context, filePath string, headers sdk.Headers) error
MarkFilePublished calls MarkFilePublishedFunc.
func (*ClienterMock) MarkFilePublishedCalls ¶
func (mock *ClienterMock) MarkFilePublishedCalls() []struct { Ctx context.Context FilePath string Headers sdk.Headers }
MarkFilePublishedCalls gets all the calls that were made to MarkFilePublished. Check the length with:
len(mockedClienter.MarkFilePublishedCalls())
func (*ClienterMock) MarkFileUploaded ¶ added in v1.17.0
func (mock *ClienterMock) MarkFileUploaded(ctx context.Context, filePath string, etag string, headers sdk.Headers) error
MarkFileUploaded calls MarkFileUploadedFunc.
func (*ClienterMock) MarkFileUploadedCalls ¶ added in v1.17.0
func (mock *ClienterMock) MarkFileUploadedCalls() []struct { Ctx context.Context FilePath string Etag string Headers sdk.Headers }
MarkFileUploadedCalls gets all the calls that were made to MarkFileUploaded. Check the length with:
len(mockedClienter.MarkFileUploadedCalls())
func (*ClienterMock) RegisterFile ¶ added in v1.17.0
func (mock *ClienterMock) RegisterFile(ctx context.Context, metadata files.StoredRegisteredMetaData, headers sdk.Headers) error
RegisterFile calls RegisterFileFunc.
func (*ClienterMock) RegisterFileCalls ¶ added in v1.17.0
func (mock *ClienterMock) RegisterFileCalls() []struct { Ctx context.Context Metadata files.StoredRegisteredMetaData Headers sdk.Headers }
RegisterFileCalls gets all the calls that were made to RegisterFile. Check the length with:
len(mockedClienter.RegisterFileCalls())
func (*ClienterMock) URLCalls ¶
func (mock *ClienterMock) URLCalls() []struct { }
URLCalls gets all the calls that were made to URL. Check the length with:
len(mockedClienter.URLCalls())