Documentation ¶
Overview ¶
Package eshttp provides methods of communication with Elastic Search by way of HTTP calls
Package eshttp is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { SubmitBulkToES(bulk []byte, companyNumbers []byte, esDestURL string, esDestIndex string) ([]byte, error) GetAlphaKeys(companyNames []byte, alphaKeyURL string) ([]byte, error) }
Client provides an interface with which to communicate with Elastic Search by way of HTTP requests
type ClientImpl ¶
type ClientImpl struct {
// contains filtered or unexported fields
}
ClientImpl provides a concrete implementation of the Client interface
func (*ClientImpl) GetAlphaKeys ¶
func (c *ClientImpl) GetAlphaKeys(companyNames []byte, alphaKeyURL string) ([]byte, error)
GetAlphaKeys performs a POST request to fetch alpha keys for a given set of company names
func (*ClientImpl) SubmitBulkToES ¶
func (c *ClientImpl) SubmitBulkToES(bulk []byte, companyNumbers []byte, esDestURL string, esDestIndex string) ([]byte, error)
SubmitBulkToES uses an HTTP post request to submit data to Elastic Search
type MockClient ¶
type MockClient struct {
// contains filtered or unexported fields
}
MockClient is a mock of Client interface.
func NewMockClient ¶
func NewMockClient(ctrl *gomock.Controller) *MockClient
NewMockClient creates a new mock instance.
func (*MockClient) EXPECT ¶
func (m *MockClient) EXPECT() *MockClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockClient) GetAlphaKeys ¶
func (m *MockClient) GetAlphaKeys(companyNames []byte, alphaKeyURL string) ([]byte, error)
GetAlphaKeys mocks base method.
func (*MockClient) SubmitBulkToES ¶
func (m *MockClient) SubmitBulkToES(bulk, companyNumbers []byte, esDestURL, esDestIndex string) ([]byte, error)
SubmitBulkToES mocks base method.
type MockClientMockRecorder ¶
type MockClientMockRecorder struct {
// contains filtered or unexported fields
}
MockClientMockRecorder is the mock recorder for MockClient.
func (*MockClientMockRecorder) GetAlphaKeys ¶
func (mr *MockClientMockRecorder) GetAlphaKeys(companyNames, alphaKeyURL interface{}) *gomock.Call
GetAlphaKeys indicates an expected call of GetAlphaKeys.
func (*MockClientMockRecorder) SubmitBulkToES ¶
func (mr *MockClientMockRecorder) SubmitBulkToES(bulk, companyNumbers, esDestURL, esDestIndex interface{}) *gomock.Call
SubmitBulkToES indicates an expected call of SubmitBulkToES.
type MockRequester ¶
type MockRequester struct {
// contains filtered or unexported fields
}
MockRequester is a mock of Requester interface
func NewMockRequester ¶
func NewMockRequester(ctrl *gomock.Controller) *MockRequester
NewMockRequester creates a new mock instance
func (*MockRequester) EXPECT ¶
func (m *MockRequester) EXPECT() *MockRequesterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockRequesterMockRecorder ¶
type MockRequesterMockRecorder struct {
// contains filtered or unexported fields
}
MockRequesterMockRecorder is the mock recorder for MockRequester
func (*MockRequesterMockRecorder) Post ¶
func (mr *MockRequesterMockRecorder) Post(arg0 interface{}, arg1 interface{}) *gomock.Call
Post indicates an expected call of Post