Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a dp-search-api client which can be used to make requests to the server
type ContentType ¶ added in v1.30.1
ContentType represents the specific content type for the search results with its respective count
type ErrInvalidSearchResponse ¶
type ErrInvalidSearchResponse struct {
// contains filtered or unexported fields
}
ErrInvalidSearchResponse is returned when the dp-search-api does not respond with a valid status
func NewSearchErrorResponse ¶
func NewSearchErrorResponse(resp *http.Response, uri string) (e *ErrInvalidSearchResponse)
NewSearchErrorResponse creates an error response
func (ErrInvalidSearchResponse) Code ¶
func (e ErrInvalidSearchResponse) Code() int
Code returns the status code received from dp-search-api if an error is returned
func (ErrInvalidSearchResponse) Error ¶
func (e ErrInvalidSearchResponse) Error() string
Error should be called by the user to print out the stringified version of the error
type Response ¶
type Response struct { Count int `json:"count"` ContentTypes []ContentType `json:"content_types"` Items []contentItem `json:"items"` Suggestions []string `json:"suggestions,omitempty"` }
Response represents the fields for the search results as returned by dp-search-api
Click to show internal directories.
Click to hide internal directories.