Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( errors.New("you are not authorized to perform this command against the connected server") )ErrUnauthorized =
Functions ¶
func WrapAPIErrors ¶
func WrapAPIErrors(err error, rErrs []ResponseError) error
WrapAPIErrors transforms an api error response into one wrapped error
Types ¶
type Engine ¶
Engine represents the search engine
func (*Engine) DownloadFile ¶
DownloadFile attempts to download a file from the api
func (*Engine) ExistsAtIndexPath ¶
ExistsAtIndexPath checks if a file already exists at this index path
type Response ¶
type Response struct { Results interface{} `json:"results"` Errors []ResponseError `json:"errors,omitempty"` }
Response is the format used for all api responses
type ResponseError ¶
type ResponseError struct {
Message string `json:"message"`
}
ResponseError is the format used for api response errors
func (ResponseError) Error ¶
func (a ResponseError) Error() string
Error implements the error interface
type SearchResponse ¶
type SearchResponse struct { Distances []float32 `json:"distances"` Documents []SearchResult `json:"documents"` }
SearchResponse represents the structure of a returned search query
Click to show internal directories.
Click to hide internal directories.