Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrReadBodyFailed = errors.New("failed to read response body") ErrUnmarshalBodyFailed = errors.New("failed to unmarshal response body") ErrSettingServiceAuth = errors.New("error setting service auth token") ErrResponseBodyEmpty = errors.New("response body empty") )
A list of error messages for creating a new index
Functions ¶
This section is empty.
Types ¶
type NewIndexName ¶
type NewIndexName struct {
IndexName string
}
type Reindex ¶
type Reindex struct { }
Reindex is a type that contains an implementation of the Indexer interface, which can be used for calling the Search API.
func (*Reindex) CreateIndex ¶
func (r *Reindex) CreateIndex(ctx context.Context, serviceAuthToken, searchAPISearchURL string, httpClient dphttp.Clienter) (*http.Response, error)
CreateIndex calls the Search API via the Do function of the dp-net/v2/http/Clienter. It passes in the ServiceAuthToken to identify itself, as the Search Reindex API, to the Search API.
func (*Reindex) GetIndexNameFromResponse ¶
GetIndexNameFromResponse unmarshalls the response body, which is passed into the function, and extracts the IndexName, which it then returns
Click to show internal directories.
Click to hide internal directories.