Documentation
¶
Index ¶
- type ClienterMock
- func (mock *ClienterMock) Checker(ctx context.Context, check *health.CheckState) error
- func (mock *ClienterMock) CheckerCalls() []struct{ ... }
- func (mock *ClienterMock) GetRootTopicsPrivate(ctx context.Context, reqHeaders sdk.Headers) (*models.PrivateSubtopics, error)
- func (mock *ClienterMock) GetRootTopicsPrivateCalls() []struct{ ... }
- func (mock *ClienterMock) GetRootTopicsPublic(ctx context.Context, reqHeaders sdk.Headers) (*models.PublicSubtopics, error)
- func (mock *ClienterMock) GetRootTopicsPublicCalls() []struct{ ... }
- func (mock *ClienterMock) GetSubtopicsPrivate(ctx context.Context, reqHeaders sdk.Headers, id string) (*models.PrivateSubtopics, error)
- func (mock *ClienterMock) GetSubtopicsPrivateCalls() []struct{ ... }
- func (mock *ClienterMock) GetSubtopicsPublic(ctx context.Context, reqHeaders sdk.Headers, id string) (*models.PublicSubtopics, error)
- func (mock *ClienterMock) GetSubtopicsPublicCalls() []struct{ ... }
- func (mock *ClienterMock) Health() *healthcheck.Client
- func (mock *ClienterMock) HealthCalls() []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
// GetRootTopicsPrivateFunc mocks the GetRootTopicsPrivate method.
GetRootTopicsPrivateFunc func(ctx context.Context, reqHeaders sdk.Headers) (*models.PrivateSubtopics, error)
// GetRootTopicsPublicFunc mocks the GetRootTopicsPublic method.
GetRootTopicsPublicFunc func(ctx context.Context, reqHeaders sdk.Headers) (*models.PublicSubtopics, error)
// GetSubtopicsPrivateFunc mocks the GetSubtopicsPrivate method.
GetSubtopicsPrivateFunc func(ctx context.Context, reqHeaders sdk.Headers, id string) (*models.PrivateSubtopics, error)
// GetSubtopicsPublicFunc mocks the GetSubtopicsPublic method.
GetSubtopicsPublicFunc func(ctx context.Context, reqHeaders sdk.Headers, id string) (*models.PublicSubtopics, error)
// HealthFunc mocks the Health method.
HealthFunc func() *healthcheck.Client
// 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")
},
GetRootTopicsPrivateFunc: func(ctx context.Context, reqHeaders sdk.Headers) (*models.PrivateSubtopics, error) {
panic("mock out the GetRootTopicsPrivate method")
},
GetRootTopicsPublicFunc: func(ctx context.Context, reqHeaders sdk.Headers) (*models.PublicSubtopics, error) {
panic("mock out the GetRootTopicsPublic method")
},
GetSubtopicsPrivateFunc: func(ctx context.Context, reqHeaders sdk.Headers, id string) (*models.PrivateSubtopics, error) {
panic("mock out the GetSubtopicsPrivate method")
},
GetSubtopicsPublicFunc: func(ctx context.Context, reqHeaders sdk.Headers, id string) (*models.PublicSubtopics, error) {
panic("mock out the GetSubtopicsPublic method")
},
HealthFunc: func() *healthcheck.Client {
panic("mock out the Health 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) GetRootTopicsPrivate ¶
func (mock *ClienterMock) GetRootTopicsPrivate(ctx context.Context, reqHeaders sdk.Headers) (*models.PrivateSubtopics, error)
GetRootTopicsPrivate calls GetRootTopicsPrivateFunc.
func (*ClienterMock) GetRootTopicsPrivateCalls ¶
func (mock *ClienterMock) GetRootTopicsPrivateCalls() []struct { Ctx context.Context ReqHeaders sdk.Headers }
GetRootTopicsPrivateCalls gets all the calls that were made to GetRootTopicsPrivate. Check the length with:
len(mockedClienter.GetRootTopicsPrivateCalls())
func (*ClienterMock) GetRootTopicsPublic ¶
func (mock *ClienterMock) GetRootTopicsPublic(ctx context.Context, reqHeaders sdk.Headers) (*models.PublicSubtopics, error)
GetRootTopicsPublic calls GetRootTopicsPublicFunc.
func (*ClienterMock) GetRootTopicsPublicCalls ¶
func (mock *ClienterMock) GetRootTopicsPublicCalls() []struct { Ctx context.Context ReqHeaders sdk.Headers }
GetRootTopicsPublicCalls gets all the calls that were made to GetRootTopicsPublic. Check the length with:
len(mockedClienter.GetRootTopicsPublicCalls())
func (*ClienterMock) GetSubtopicsPrivate ¶
func (mock *ClienterMock) GetSubtopicsPrivate(ctx context.Context, reqHeaders sdk.Headers, id string) (*models.PrivateSubtopics, error)
GetSubtopicsPrivate calls GetSubtopicsPrivateFunc.
func (*ClienterMock) GetSubtopicsPrivateCalls ¶
func (mock *ClienterMock) GetSubtopicsPrivateCalls() []struct { Ctx context.Context ReqHeaders sdk.Headers ID string }
GetSubtopicsPrivateCalls gets all the calls that were made to GetSubtopicsPrivate. Check the length with:
len(mockedClienter.GetSubtopicsPrivateCalls())
func (*ClienterMock) GetSubtopicsPublic ¶
func (mock *ClienterMock) GetSubtopicsPublic(ctx context.Context, reqHeaders sdk.Headers, id string) (*models.PublicSubtopics, error)
GetSubtopicsPublic calls GetSubtopicsPublicFunc.
func (*ClienterMock) GetSubtopicsPublicCalls ¶
func (mock *ClienterMock) GetSubtopicsPublicCalls() []struct { Ctx context.Context ReqHeaders sdk.Headers ID string }
GetSubtopicsPublicCalls gets all the calls that were made to GetSubtopicsPublic. Check the length with:
len(mockedClienter.GetSubtopicsPublicCalls())
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) URLCalls ¶
func (mock *ClienterMock) URLCalls() []struct { }
URLCalls gets all the calls that were made to URL. Check the length with:
len(mockedClienter.URLCalls())