Documentation
¶
Index ¶
- type ClienterMock
- func (mock *ClienterMock) Checker(ctx context.Context, check *health.CheckState) error
- func (mock *ClienterMock) CheckerCalls() []struct{ ... }
- func (mock *ClienterMock) CreateIndex(ctx context.Context, options sdk.Options) (*models.CreateIndexResponse, apiError.Error)
- func (mock *ClienterMock) CreateIndexCalls() []struct{ ... }
- func (mock *ClienterMock) GetReleaseCalendarEntries(ctx context.Context, options sdk.Options) (*transformer.SearchReleaseResponse, apiError.Error)
- func (mock *ClienterMock) GetReleaseCalendarEntriesCalls() []struct{ ... }
- func (mock *ClienterMock) GetSearch(ctx context.Context, options sdk.Options) (*models.SearchResponse, apiError.Error)
- func (mock *ClienterMock) GetSearchCalls() []struct{ ... }
- func (mock *ClienterMock) Health() *healthcheck.Client
- func (mock *ClienterMock) HealthCalls() []struct{}
- func (mock *ClienterMock) PostSearchURIs(ctx context.Context, options sdk.Options, urisRequest api.URIsRequest) (*models.SearchResponse, apiError.Error)
- func (mock *ClienterMock) PostSearchURIsCalls() []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 *health.CheckState) error
// CreateIndexFunc mocks the CreateIndex method.
CreateIndexFunc func(ctx context.Context, options sdk.Options) (*models.CreateIndexResponse, apiError.Error)
// GetReleaseCalendarEntriesFunc mocks the GetReleaseCalendarEntries method.
GetReleaseCalendarEntriesFunc func(ctx context.Context, options sdk.Options) (*transformer.SearchReleaseResponse, apiError.Error)
// GetSearchFunc mocks the GetSearch method.
GetSearchFunc func(ctx context.Context, options sdk.Options) (*models.SearchResponse, apiError.Error)
// HealthFunc mocks the Health method.
HealthFunc func() *healthcheck.Client
// PostSearchURIsFunc mocks the PostSearchURIs method.
PostSearchURIsFunc func(ctx context.Context, options sdk.Options, urisRequest api.URIsRequest) (*models.SearchResponse, apiError.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 *health.CheckState) error {
panic("mock out the Checker method")
},
CreateIndexFunc: func(ctx context.Context, options sdk.Options) (*models.CreateIndexResponse, apiError.Error) {
panic("mock out the CreateIndex method")
},
GetReleaseCalendarEntriesFunc: func(ctx context.Context, options sdk.Options) (*transformer.SearchReleaseResponse, apiError.Error) {
panic("mock out the GetReleaseCalendarEntries method")
},
GetSearchFunc: func(ctx context.Context, options sdk.Options) (*models.SearchResponse, apiError.Error) {
panic("mock out the GetSearch method")
},
HealthFunc: func() *healthcheck.Client {
panic("mock out the Health method")
},
PostSearchURIsFunc: func(ctx context.Context, options sdk.Options, urisRequest api.URIsRequest) (*models.SearchResponse, apiError.Error) {
panic("mock out the PostSearchURIs 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 *health.CheckState) error
Checker calls CheckerFunc.
func (*ClienterMock) CheckerCalls ¶
func (mock *ClienterMock) CheckerCalls() []struct { Ctx context.Context Check *health.CheckState }
CheckerCalls gets all the calls that were made to Checker. Check the length with:
len(mockedClienter.CheckerCalls())
func (*ClienterMock) CreateIndex ¶
func (mock *ClienterMock) CreateIndex(ctx context.Context, options sdk.Options) (*models.CreateIndexResponse, apiError.Error)
CreateIndex calls CreateIndexFunc.
func (*ClienterMock) CreateIndexCalls ¶
func (mock *ClienterMock) CreateIndexCalls() []struct { Ctx context.Context Options sdk.Options }
CreateIndexCalls gets all the calls that were made to CreateIndex. Check the length with:
len(mockedClienter.CreateIndexCalls())
func (*ClienterMock) GetReleaseCalendarEntries ¶
func (mock *ClienterMock) GetReleaseCalendarEntries(ctx context.Context, options sdk.Options) (*transformer.SearchReleaseResponse, apiError.Error)
GetReleaseCalendarEntries calls GetReleaseCalendarEntriesFunc.
func (*ClienterMock) GetReleaseCalendarEntriesCalls ¶
func (mock *ClienterMock) GetReleaseCalendarEntriesCalls() []struct { Ctx context.Context Options sdk.Options }
GetReleaseCalendarEntriesCalls gets all the calls that were made to GetReleaseCalendarEntries. Check the length with:
len(mockedClienter.GetReleaseCalendarEntriesCalls())
func (*ClienterMock) GetSearch ¶
func (mock *ClienterMock) GetSearch(ctx context.Context, options sdk.Options) (*models.SearchResponse, apiError.Error)
GetSearch calls GetSearchFunc.
func (*ClienterMock) GetSearchCalls ¶
func (mock *ClienterMock) GetSearchCalls() []struct { Ctx context.Context Options sdk.Options }
GetSearchCalls gets all the calls that were made to GetSearch. Check the length with:
len(mockedClienter.GetSearchCalls())
func (*ClienterMock) Health ¶
func (mock *ClienterMock) Health() *healthcheck.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) PostSearchURIs ¶ added in v1.47.0
func (mock *ClienterMock) PostSearchURIs(ctx context.Context, options sdk.Options, urisRequest api.URIsRequest) (*models.SearchResponse, apiError.Error)
PostSearchURIs calls PostSearchURIsFunc.
func (*ClienterMock) PostSearchURIsCalls ¶ added in v1.47.0
func (mock *ClienterMock) PostSearchURIsCalls() []struct { Ctx context.Context Options sdk.Options UrisRequest api.URIsRequest }
PostSearchURIsCalls gets all the calls that were made to PostSearchURIs. Check the length with:
len(mockedClienter.PostSearchURIsCalls())
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())