Documentation ¶
Overview ¶
Package upsert contains the logic to send the upsert request to the API
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidResponse is returned when the Search API returns a non 200 status ErrInvalidResponse = errors.New("invalid status returned by search.api.ch.gov.uk") )
Functions ¶
This section is empty.
Types ¶
type APIUpsert ¶
type APIUpsert struct { HTTPClient *http.Client AlphabeticalUpsertCompanyAPIUrl string AdvancedUpsertCompanyAPIUrl string }
Template config contains recipient address, http client and send email endpoint
type CompanyProfileDelta ¶
type CompanyProfileDelta struct {
CompanyNumber string `json:"company_number"`
}
Company profile delta data json contains fields such as company_number
type MockUpsert ¶
type MockUpsert struct {
// contains filtered or unexported fields
}
MockUpsert is a mock of Upsert interface
func NewMockUpsert ¶
func NewMockUpsert(ctrl *gomock.Controller) *MockUpsert
NewMockUpsert creates a new mock instance
func (*MockUpsert) EXPECT ¶
func (m *MockUpsert) EXPECT() *MockUpsertMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockUpsert) SendViaAPI ¶
func (m *MockUpsert) SendViaAPI(data string, apiKey string) error
SendViaAPI mocks base method
type MockUpsertMockRecorder ¶
type MockUpsertMockRecorder struct {
// contains filtered or unexported fields
}
MockUpsertMockRecorder is the mock recorder for MockUpsert
func (*MockUpsertMockRecorder) SendViaAPI ¶
func (mr *MockUpsertMockRecorder) SendViaAPI(data interface{}) *gomock.Call
SendViaAPI indicates an expected call of SendViaAPI
Click to show internal directories.
Click to hide internal directories.