Documentation
¶
Overview ¶
Package api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.9.0 DO NOT EDIT.
Package api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.9.0 DO NOT EDIT.
Index ¶
- Constants
- func NewCreateCollectionRequest(server string, body CreateCollectionJSONRequestBody) (*http.Request, error)
- func NewCreateCollectionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewCreateKeyRequest(server string, body CreateKeyJSONRequestBody) (*http.Request, error)
- func NewCreateKeyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewDebugRequest(server string) (*http.Request, error)
- func NewDeleteAliasRequest(server string, aliasName string) (*http.Request, error)
- func NewDeleteCollectionRequest(server string, collectionName string) (*http.Request, error)
- func NewDeleteDocumentRequest(server string, collectionName string, documentId string) (*http.Request, error)
- func NewDeleteDocumentsRequest(server string, collectionName string, params *DeleteDocumentsParams) (*http.Request, error)
- func NewDeleteKeyRequest(server string, keyId int64) (*http.Request, error)
- func NewDeleteSearchOverrideRequest(server string, collectionName string, overrideId string) (*http.Request, error)
- func NewDeleteSearchSynonymRequest(server string, collectionName string, synonymId string) (*http.Request, error)
- func NewExportDocumentsRequest(server string, collectionName string, params *ExportDocumentsParams) (*http.Request, error)
- func NewGetAliasRequest(server string, aliasName string) (*http.Request, error)
- func NewGetAliasesRequest(server string) (*http.Request, error)
- func NewGetCollectionRequest(server string, collectionName string) (*http.Request, error)
- func NewGetCollectionsRequest(server string) (*http.Request, error)
- func NewGetDocumentRequest(server string, collectionName string, documentId string) (*http.Request, error)
- func NewGetKeyRequest(server string, keyId int64) (*http.Request, error)
- func NewGetKeysRequest(server string) (*http.Request, error)
- func NewGetSearchOverrideRequest(server string, collectionName string, overrideId string) (*http.Request, error)
- func NewGetSearchOverridesRequest(server string, collectionName string) (*http.Request, error)
- func NewGetSearchSynonymRequest(server string, collectionName string, synonymId string) (*http.Request, error)
- func NewGetSearchSynonymsRequest(server string, collectionName string) (*http.Request, error)
- func NewHealthRequest(server string) (*http.Request, error)
- func NewImportDocumentsRequestWithBody(server string, collectionName string, params *ImportDocumentsParams, ...) (*http.Request, error)
- func NewIndexDocumentRequest(server string, collectionName string, params *IndexDocumentParams, ...) (*http.Request, error)
- func NewIndexDocumentRequestWithBody(server string, collectionName string, params *IndexDocumentParams, ...) (*http.Request, error)
- func NewMultiSearchRequest(server string, params *MultiSearchParams, body MultiSearchJSONRequestBody) (*http.Request, error)
- func NewMultiSearchRequestWithBody(server string, params *MultiSearchParams, contentType string, body io.Reader) (*http.Request, error)
- func NewSearchCollectionRequest(server string, collectionName string, params *SearchCollectionParams) (*http.Request, error)
- func NewTakeSnapshotRequest(server string, params *TakeSnapshotParams) (*http.Request, error)
- func NewUpdateCollectionRequest(server string, collectionName string, body UpdateCollectionJSONRequestBody) (*http.Request, error)
- func NewUpdateCollectionRequestWithBody(server string, collectionName string, contentType string, body io.Reader) (*http.Request, error)
- func NewUpdateDocumentRequest(server string, collectionName string, documentId string, ...) (*http.Request, error)
- func NewUpdateDocumentRequestWithBody(server string, collectionName string, documentId string, contentType string, ...) (*http.Request, error)
- func NewUpsertAliasRequest(server string, aliasName string, body UpsertAliasJSONRequestBody) (*http.Request, error)
- func NewUpsertAliasRequestWithBody(server string, aliasName string, contentType string, body io.Reader) (*http.Request, error)
- func NewUpsertSearchOverrideRequest(server string, collectionName string, overrideId string, ...) (*http.Request, error)
- func NewUpsertSearchOverrideRequestWithBody(server string, collectionName string, overrideId string, contentType string, ...) (*http.Request, error)
- func NewUpsertSearchSynonymRequest(server string, collectionName string, synonymId string, ...) (*http.Request, error)
- func NewUpsertSearchSynonymRequestWithBody(server string, collectionName string, synonymId string, contentType string, ...) (*http.Request, error)
- func NewVoteRequest(server string) (*http.Request, error)
- type ApiKey
- type ApiKeySchema
- type ApiKeysResponse
- type ApiResponse
- type Client
- func (c *Client) CreateCollection(ctx context.Context, body CreateCollectionJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateCollectionWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) CreateKey(ctx context.Context, body CreateKeyJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateKeyWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) Debug(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) DeleteAlias(ctx context.Context, aliasName string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) DeleteCollection(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) DeleteDocument(ctx context.Context, collectionName string, documentId string, ...) (*http.Response, error)
- func (c *Client) DeleteDocuments(ctx context.Context, collectionName string, params *DeleteDocumentsParams, ...) (*http.Response, error)
- func (c *Client) DeleteKey(ctx context.Context, keyId int64, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) DeleteSearchOverride(ctx context.Context, collectionName string, overrideId string, ...) (*http.Response, error)
- func (c *Client) DeleteSearchSynonym(ctx context.Context, collectionName string, synonymId string, ...) (*http.Response, error)
- func (c *Client) ExportDocuments(ctx context.Context, collectionName string, params *ExportDocumentsParams, ...) (*http.Response, error)
- func (c *Client) GetAlias(ctx context.Context, aliasName string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetAliases(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetCollection(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetCollections(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetDocument(ctx context.Context, collectionName string, documentId string, ...) (*http.Response, error)
- func (c *Client) GetKey(ctx context.Context, keyId int64, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetKeys(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetSearchOverride(ctx context.Context, collectionName string, overrideId string, ...) (*http.Response, error)
- func (c *Client) GetSearchOverrides(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetSearchSynonym(ctx context.Context, collectionName string, synonymId string, ...) (*http.Response, error)
- func (c *Client) GetSearchSynonyms(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) Health(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ImportDocumentsWithBody(ctx context.Context, collectionName string, params *ImportDocumentsParams, ...) (*http.Response, error)
- func (c *Client) IndexDocument(ctx context.Context, collectionName string, params *IndexDocumentParams, ...) (*http.Response, error)
- func (c *Client) IndexDocumentWithBody(ctx context.Context, collectionName string, params *IndexDocumentParams, ...) (*http.Response, error)
- func (c *Client) MultiSearch(ctx context.Context, params *MultiSearchParams, ...) (*http.Response, error)
- func (c *Client) MultiSearchWithBody(ctx context.Context, params *MultiSearchParams, contentType string, ...) (*http.Response, error)
- func (c *Client) SearchCollection(ctx context.Context, collectionName string, params *SearchCollectionParams, ...) (*http.Response, error)
- func (c *Client) TakeSnapshot(ctx context.Context, params *TakeSnapshotParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) UpdateCollection(ctx context.Context, collectionName string, ...) (*http.Response, error)
- func (c *Client) UpdateCollectionWithBody(ctx context.Context, collectionName string, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) UpdateDocument(ctx context.Context, collectionName string, documentId string, ...) (*http.Response, error)
- func (c *Client) UpdateDocumentWithBody(ctx context.Context, collectionName string, documentId string, ...) (*http.Response, error)
- func (c *Client) UpsertAlias(ctx context.Context, aliasName string, body UpsertAliasJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) UpsertAliasWithBody(ctx context.Context, aliasName string, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) UpsertSearchOverride(ctx context.Context, collectionName string, overrideId string, ...) (*http.Response, error)
- func (c *Client) UpsertSearchOverrideWithBody(ctx context.Context, collectionName string, overrideId string, ...) (*http.Response, error)
- func (c *Client) UpsertSearchSynonym(ctx context.Context, collectionName string, synonymId string, ...) (*http.Response, error)
- func (c *Client) UpsertSearchSynonymWithBody(ctx context.Context, collectionName string, synonymId string, ...) (*http.Response, error)
- func (c *Client) Vote(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CreateCollectionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateCollectionResponse, error)
- func (c *ClientWithResponses) CreateCollectionWithResponse(ctx context.Context, body CreateCollectionJSONRequestBody, ...) (*CreateCollectionResponse, error)
- func (c *ClientWithResponses) CreateKeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateKeyResponse, error)
- func (c *ClientWithResponses) CreateKeyWithResponse(ctx context.Context, body CreateKeyJSONRequestBody, ...) (*CreateKeyResponse, error)
- func (c *ClientWithResponses) DebugWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*DebugResponse, error)
- func (c *ClientWithResponses) DeleteAliasWithResponse(ctx context.Context, aliasName string, reqEditors ...RequestEditorFn) (*DeleteAliasResponse, error)
- func (c *ClientWithResponses) DeleteCollectionWithResponse(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*DeleteCollectionResponse, error)
- func (c *ClientWithResponses) DeleteDocumentWithResponse(ctx context.Context, collectionName string, documentId string, ...) (*DeleteDocumentResponse, error)
- func (c *ClientWithResponses) DeleteDocumentsWithResponse(ctx context.Context, collectionName string, params *DeleteDocumentsParams, ...) (*DeleteDocumentsResponse, error)
- func (c *ClientWithResponses) DeleteKeyWithResponse(ctx context.Context, keyId int64, reqEditors ...RequestEditorFn) (*DeleteKeyResponse, error)
- func (c *ClientWithResponses) DeleteSearchOverrideWithResponse(ctx context.Context, collectionName string, overrideId string, ...) (*DeleteSearchOverrideResponse, error)
- func (c *ClientWithResponses) DeleteSearchSynonymWithResponse(ctx context.Context, collectionName string, synonymId string, ...) (*DeleteSearchSynonymResponse, error)
- func (c *ClientWithResponses) ExportDocumentsWithResponse(ctx context.Context, collectionName string, params *ExportDocumentsParams, ...) (*ExportDocumentsResponse, error)
- func (c *ClientWithResponses) GetAliasWithResponse(ctx context.Context, aliasName string, reqEditors ...RequestEditorFn) (*GetAliasResponse, error)
- func (c *ClientWithResponses) GetAliasesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetAliasesResponse, error)
- func (c *ClientWithResponses) GetCollectionWithResponse(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*GetCollectionResponse, error)
- func (c *ClientWithResponses) GetCollectionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCollectionsResponse, error)
- func (c *ClientWithResponses) GetDocumentWithResponse(ctx context.Context, collectionName string, documentId string, ...) (*GetDocumentResponse, error)
- func (c *ClientWithResponses) GetKeyWithResponse(ctx context.Context, keyId int64, reqEditors ...RequestEditorFn) (*GetKeyResponse, error)
- func (c *ClientWithResponses) GetKeysWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetKeysResponse, error)
- func (c *ClientWithResponses) GetSearchOverrideWithResponse(ctx context.Context, collectionName string, overrideId string, ...) (*GetSearchOverrideResponse, error)
- func (c *ClientWithResponses) GetSearchOverridesWithResponse(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*GetSearchOverridesResponse, error)
- func (c *ClientWithResponses) GetSearchSynonymWithResponse(ctx context.Context, collectionName string, synonymId string, ...) (*GetSearchSynonymResponse, error)
- func (c *ClientWithResponses) GetSearchSynonymsWithResponse(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*GetSearchSynonymsResponse, error)
- func (c *ClientWithResponses) HealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthResponse, error)
- func (c *ClientWithResponses) ImportDocumentsWithBodyWithResponse(ctx context.Context, collectionName string, params *ImportDocumentsParams, ...) (*ImportDocumentsResponse, error)
- func (c *ClientWithResponses) IndexDocumentWithBodyWithResponse(ctx context.Context, collectionName string, params *IndexDocumentParams, ...) (*IndexDocumentResponse, error)
- func (c *ClientWithResponses) IndexDocumentWithResponse(ctx context.Context, collectionName string, params *IndexDocumentParams, ...) (*IndexDocumentResponse, error)
- func (c *ClientWithResponses) MultiSearchWithBodyWithResponse(ctx context.Context, params *MultiSearchParams, contentType string, ...) (*MultiSearchResponse, error)
- func (c *ClientWithResponses) MultiSearchWithResponse(ctx context.Context, params *MultiSearchParams, ...) (*MultiSearchResponse, error)
- func (c *ClientWithResponses) SearchCollectionWithResponse(ctx context.Context, collectionName string, params *SearchCollectionParams, ...) (*SearchCollectionResponse, error)
- func (c *ClientWithResponses) TakeSnapshotWithResponse(ctx context.Context, params *TakeSnapshotParams, reqEditors ...RequestEditorFn) (*TakeSnapshotResponse, error)
- func (c *ClientWithResponses) UpdateCollectionWithBodyWithResponse(ctx context.Context, collectionName string, contentType string, body io.Reader, ...) (*UpdateCollectionResponse, error)
- func (c *ClientWithResponses) UpdateCollectionWithResponse(ctx context.Context, collectionName string, ...) (*UpdateCollectionResponse, error)
- func (c *ClientWithResponses) UpdateDocumentWithBodyWithResponse(ctx context.Context, collectionName string, documentId string, ...) (*UpdateDocumentResponse, error)
- func (c *ClientWithResponses) UpdateDocumentWithResponse(ctx context.Context, collectionName string, documentId string, ...) (*UpdateDocumentResponse, error)
- func (c *ClientWithResponses) UpsertAliasWithBodyWithResponse(ctx context.Context, aliasName string, contentType string, body io.Reader, ...) (*UpsertAliasResponse, error)
- func (c *ClientWithResponses) UpsertAliasWithResponse(ctx context.Context, aliasName string, body UpsertAliasJSONRequestBody, ...) (*UpsertAliasResponse, error)
- func (c *ClientWithResponses) UpsertSearchOverrideWithBodyWithResponse(ctx context.Context, collectionName string, overrideId string, ...) (*UpsertSearchOverrideResponse, error)
- func (c *ClientWithResponses) UpsertSearchOverrideWithResponse(ctx context.Context, collectionName string, overrideId string, ...) (*UpsertSearchOverrideResponse, error)
- func (c *ClientWithResponses) UpsertSearchSynonymWithBodyWithResponse(ctx context.Context, collectionName string, synonymId string, ...) (*UpsertSearchSynonymResponse, error)
- func (c *ClientWithResponses) UpsertSearchSynonymWithResponse(ctx context.Context, collectionName string, synonymId string, ...) (*UpsertSearchSynonymResponse, error)
- func (c *ClientWithResponses) VoteWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*VoteResponse, error)
- type ClientWithResponsesInterface
- type CollectionAlias
- type CollectionAliasSchema
- type CollectionAliasesResponse
- type CollectionResponse
- type CollectionSchema
- type CollectionUpdateSchema
- type CreateCollectionJSONBody
- type CreateCollectionJSONRequestBody
- type CreateCollectionResponse
- type CreateKeyJSONBody
- type CreateKeyJSONRequestBody
- type CreateKeyResponse
- type DebugResponse
- type DeleteAliasResponse
- type DeleteCollectionResponse
- type DeleteDocumentResponse
- type DeleteDocumentsParams
- type DeleteDocumentsResponse
- type DeleteKeyResponse
- type DeleteSearchOverrideResponse
- type DeleteSearchSynonymResponse
- type ExportDocumentsParams
- type ExportDocumentsResponse
- type FacetCounts
- type Field
- type GetAliasResponse
- type GetAliasesResponse
- type GetCollectionResponse
- type GetCollectionsResponse
- type GetDocumentResponse
- type GetKeyResponse
- type GetKeysResponse
- type GetSearchOverrideResponse
- type GetSearchOverridesResponse
- type GetSearchSynonymResponse
- type GetSearchSynonymsResponse
- type HealthResponse
- type HealthStatus
- type HttpRequestDoer
- type ImportDocumentResponse
- type ImportDocumentsParams
- type ImportDocumentsParamsDirtyValues
- type ImportDocumentsResponse
- type IndexDocumentJSONBody
- type IndexDocumentJSONRequestBody
- type IndexDocumentParams
- type IndexDocumentParamsAction
- type IndexDocumentResponse
- type MultiSearchCollectionParameters
- type MultiSearchJSONBody
- type MultiSearchJSONRequestBody
- type MultiSearchParameters
- type MultiSearchParams
- type MultiSearchResponse
- type MultiSearchResult
- type MultiSearchSearchesParameter
- type RequestEditorFn
- type SearchCollectionParams
- type SearchCollectionResponse
- type SearchGroupedHit
- type SearchHighlight
- type SearchOverride
- type SearchOverrideExclude
- type SearchOverrideInclude
- type SearchOverrideRule
- type SearchOverrideRuleMatch
- type SearchOverrideSchema
- type SearchOverridesResponse
- type SearchResult
- type SearchResultHit
- type SearchResultHit_GeoDistanceMeters
- func (a SearchResultHit_GeoDistanceMeters) Get(fieldName string) (value int, found bool)
- func (a SearchResultHit_GeoDistanceMeters) MarshalJSON() ([]byte, error)
- func (a *SearchResultHit_GeoDistanceMeters) Set(fieldName string, value int)
- func (a *SearchResultHit_GeoDistanceMeters) UnmarshalJSON(b []byte) error
- type SearchSynonym
- type SearchSynonymSchema
- type SearchSynonymsResponse
- type SuccessStatus
- type TakeSnapshotParams
- type TakeSnapshotResponse
- type UpdateCollectionJSONBody
- type UpdateCollectionJSONRequestBody
- type UpdateCollectionResponse
- type UpdateDocumentJSONBody
- type UpdateDocumentJSONRequestBody
- type UpdateDocumentResponse
- type UpsertAliasJSONBody
- type UpsertAliasJSONRequestBody
- type UpsertAliasResponse
- type UpsertSearchOverrideJSONBody
- type UpsertSearchOverrideJSONRequestBody
- type UpsertSearchOverrideResponse
- type UpsertSearchSynonymJSONBody
- type UpsertSearchSynonymJSONRequestBody
- type UpsertSearchSynonymResponse
- type VoteResponse
Constants ¶
const APIKeyHeader = "X-TYPESENSE-API-KEY"
const (
Api_key_headerScopes = "api_key_header.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func NewCreateCollectionRequest ¶
func NewCreateCollectionRequest(server string, body CreateCollectionJSONRequestBody) (*http.Request, error)
NewCreateCollectionRequest calls the generic CreateCollection builder with application/json body
func NewCreateCollectionRequestWithBody ¶
func NewCreateCollectionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateCollectionRequestWithBody generates requests for CreateCollection with any type of body
func NewCreateKeyRequest ¶
func NewCreateKeyRequest(server string, body CreateKeyJSONRequestBody) (*http.Request, error)
NewCreateKeyRequest calls the generic CreateKey builder with application/json body
func NewCreateKeyRequestWithBody ¶
func NewCreateKeyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateKeyRequestWithBody generates requests for CreateKey with any type of body
func NewDebugRequest ¶
NewDebugRequest generates requests for Debug
func NewDeleteAliasRequest ¶
NewDeleteAliasRequest generates requests for DeleteAlias
func NewDeleteCollectionRequest ¶
NewDeleteCollectionRequest generates requests for DeleteCollection
func NewDeleteDocumentRequest ¶
func NewDeleteDocumentRequest(server string, collectionName string, documentId string) (*http.Request, error)
NewDeleteDocumentRequest generates requests for DeleteDocument
func NewDeleteDocumentsRequest ¶
func NewDeleteDocumentsRequest(server string, collectionName string, params *DeleteDocumentsParams) (*http.Request, error)
NewDeleteDocumentsRequest generates requests for DeleteDocuments
func NewDeleteKeyRequest ¶
NewDeleteKeyRequest generates requests for DeleteKey
func NewDeleteSearchOverrideRequest ¶
func NewDeleteSearchOverrideRequest(server string, collectionName string, overrideId string) (*http.Request, error)
NewDeleteSearchOverrideRequest generates requests for DeleteSearchOverride
func NewDeleteSearchSynonymRequest ¶ added in v0.2.0
func NewDeleteSearchSynonymRequest(server string, collectionName string, synonymId string) (*http.Request, error)
NewDeleteSearchSynonymRequest generates requests for DeleteSearchSynonym
func NewExportDocumentsRequest ¶
func NewExportDocumentsRequest(server string, collectionName string, params *ExportDocumentsParams) (*http.Request, error)
NewExportDocumentsRequest generates requests for ExportDocuments
func NewGetAliasRequest ¶
NewGetAliasRequest generates requests for GetAlias
func NewGetAliasesRequest ¶
NewGetAliasesRequest generates requests for GetAliases
func NewGetCollectionRequest ¶
NewGetCollectionRequest generates requests for GetCollection
func NewGetCollectionsRequest ¶
NewGetCollectionsRequest generates requests for GetCollections
func NewGetDocumentRequest ¶
func NewGetDocumentRequest(server string, collectionName string, documentId string) (*http.Request, error)
NewGetDocumentRequest generates requests for GetDocument
func NewGetKeyRequest ¶
NewGetKeyRequest generates requests for GetKey
func NewGetKeysRequest ¶
NewGetKeysRequest generates requests for GetKeys
func NewGetSearchOverrideRequest ¶
func NewGetSearchOverrideRequest(server string, collectionName string, overrideId string) (*http.Request, error)
NewGetSearchOverrideRequest generates requests for GetSearchOverride
func NewGetSearchOverridesRequest ¶
NewGetSearchOverridesRequest generates requests for GetSearchOverrides
func NewGetSearchSynonymRequest ¶ added in v0.2.0
func NewGetSearchSynonymRequest(server string, collectionName string, synonymId string) (*http.Request, error)
NewGetSearchSynonymRequest generates requests for GetSearchSynonym
func NewGetSearchSynonymsRequest ¶ added in v0.2.0
NewGetSearchSynonymsRequest generates requests for GetSearchSynonyms
func NewHealthRequest ¶
NewHealthRequest generates requests for Health
func NewImportDocumentsRequestWithBody ¶
func NewImportDocumentsRequestWithBody(server string, collectionName string, params *ImportDocumentsParams, contentType string, body io.Reader) (*http.Request, error)
NewImportDocumentsRequestWithBody generates requests for ImportDocuments with any type of body
func NewIndexDocumentRequest ¶
func NewIndexDocumentRequest(server string, collectionName string, params *IndexDocumentParams, body IndexDocumentJSONRequestBody) (*http.Request, error)
NewIndexDocumentRequest calls the generic IndexDocument builder with application/json body
func NewIndexDocumentRequestWithBody ¶
func NewIndexDocumentRequestWithBody(server string, collectionName string, params *IndexDocumentParams, contentType string, body io.Reader) (*http.Request, error)
NewIndexDocumentRequestWithBody generates requests for IndexDocument with any type of body
func NewMultiSearchRequest ¶ added in v0.4.0
func NewMultiSearchRequest(server string, params *MultiSearchParams, body MultiSearchJSONRequestBody) (*http.Request, error)
NewMultiSearchRequest calls the generic MultiSearch builder with application/json body
func NewMultiSearchRequestWithBody ¶ added in v0.4.0
func NewMultiSearchRequestWithBody(server string, params *MultiSearchParams, contentType string, body io.Reader) (*http.Request, error)
NewMultiSearchRequestWithBody generates requests for MultiSearch with any type of body
func NewSearchCollectionRequest ¶
func NewSearchCollectionRequest(server string, collectionName string, params *SearchCollectionParams) (*http.Request, error)
NewSearchCollectionRequest generates requests for SearchCollection
func NewTakeSnapshotRequest ¶ added in v0.2.0
func NewTakeSnapshotRequest(server string, params *TakeSnapshotParams) (*http.Request, error)
NewTakeSnapshotRequest generates requests for TakeSnapshot
func NewUpdateCollectionRequest ¶ added in v0.5.0
func NewUpdateCollectionRequest(server string, collectionName string, body UpdateCollectionJSONRequestBody) (*http.Request, error)
NewUpdateCollectionRequest calls the generic UpdateCollection builder with application/json body
func NewUpdateCollectionRequestWithBody ¶ added in v0.5.0
func NewUpdateCollectionRequestWithBody(server string, collectionName string, contentType string, body io.Reader) (*http.Request, error)
NewUpdateCollectionRequestWithBody generates requests for UpdateCollection with any type of body
func NewUpdateDocumentRequest ¶
func NewUpdateDocumentRequest(server string, collectionName string, documentId string, body UpdateDocumentJSONRequestBody) (*http.Request, error)
NewUpdateDocumentRequest calls the generic UpdateDocument builder with application/json body
func NewUpdateDocumentRequestWithBody ¶
func NewUpdateDocumentRequestWithBody(server string, collectionName string, documentId string, contentType string, body io.Reader) (*http.Request, error)
NewUpdateDocumentRequestWithBody generates requests for UpdateDocument with any type of body
func NewUpsertAliasRequest ¶
func NewUpsertAliasRequest(server string, aliasName string, body UpsertAliasJSONRequestBody) (*http.Request, error)
NewUpsertAliasRequest calls the generic UpsertAlias builder with application/json body
func NewUpsertAliasRequestWithBody ¶
func NewUpsertAliasRequestWithBody(server string, aliasName string, contentType string, body io.Reader) (*http.Request, error)
NewUpsertAliasRequestWithBody generates requests for UpsertAlias with any type of body
func NewUpsertSearchOverrideRequest ¶
func NewUpsertSearchOverrideRequest(server string, collectionName string, overrideId string, body UpsertSearchOverrideJSONRequestBody) (*http.Request, error)
NewUpsertSearchOverrideRequest calls the generic UpsertSearchOverride builder with application/json body
func NewUpsertSearchOverrideRequestWithBody ¶
func NewUpsertSearchOverrideRequestWithBody(server string, collectionName string, overrideId string, contentType string, body io.Reader) (*http.Request, error)
NewUpsertSearchOverrideRequestWithBody generates requests for UpsertSearchOverride with any type of body
func NewUpsertSearchSynonymRequest ¶ added in v0.2.0
func NewUpsertSearchSynonymRequest(server string, collectionName string, synonymId string, body UpsertSearchSynonymJSONRequestBody) (*http.Request, error)
NewUpsertSearchSynonymRequest calls the generic UpsertSearchSynonym builder with application/json body
func NewUpsertSearchSynonymRequestWithBody ¶ added in v0.2.0
func NewUpsertSearchSynonymRequestWithBody(server string, collectionName string, synonymId string, contentType string, body io.Reader) (*http.Request, error)
NewUpsertSearchSynonymRequestWithBody generates requests for UpsertSearchSynonym with any type of body
Types ¶
type ApiKey ¶
type ApiKey struct {
// Embedded struct due to allOf(#/components/schemas/ApiKeySchema)
ApiKeySchema `yaml:",inline"`
// Embedded fields due to inline allOf schema
Id int64 `json:"id"`
Value string `json:"value"`
ValuePrefix string `json:"value_prefix"`
}
ApiKey defines model for ApiKey.
type ApiKeySchema ¶
type ApiKeySchema struct {
Actions []string `json:"actions"`
Collections []string `json:"collections"`
Description string `json:"description"`
ExpiresAt *int64 `json:"expires_at,omitempty"`
Value *string `json:"value,omitempty"`
}
ApiKeySchema defines model for ApiKeySchema.
type ApiKeysResponse ¶
type ApiKeysResponse struct {
Keys []*ApiKey `json:"keys"`
}
ApiKeysResponse defines model for ApiKeysResponse.
type ApiResponse ¶
type ApiResponse struct {
Message string `json:"message"`
}
ApiResponse defines model for ApiResponse.
type Client ¶
type Client struct {
// The endpoint of the server conforming to this interface, with scheme,
// https://api.deepmap.com for example. This can contain a path relative
// to the server, such as https://api.deepmap.com/dev-test, and all the
// paths in the swagger spec will be appended to the server.
Server string
// Doer for performing requests, typically a *http.Client with any
// customized settings, such as certificate chains.
Client HttpRequestDoer
// A list of callbacks for modifying requests which are generated before sending over
// the network.
RequestEditors []RequestEditorFn
}
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) CreateCollection ¶
func (c *Client) CreateCollection(ctx context.Context, body CreateCollectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateCollectionWithBody ¶
func (*Client) CreateKey ¶
func (c *Client) CreateKey(ctx context.Context, body CreateKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateKeyWithBody ¶
func (*Client) DeleteAlias ¶
func (*Client) DeleteCollection ¶
func (*Client) DeleteDocument ¶
func (*Client) DeleteDocuments ¶
func (c *Client) DeleteDocuments(ctx context.Context, collectionName string, params *DeleteDocumentsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) DeleteSearchOverride ¶
func (*Client) DeleteSearchSynonym ¶ added in v0.2.0
func (*Client) ExportDocuments ¶
func (c *Client) ExportDocuments(ctx context.Context, collectionName string, params *ExportDocumentsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetAliases ¶
func (*Client) GetCollection ¶
func (*Client) GetCollections ¶
func (*Client) GetDocument ¶
func (*Client) GetSearchOverride ¶
func (*Client) GetSearchOverrides ¶
func (*Client) GetSearchSynonym ¶ added in v0.2.0
func (*Client) GetSearchSynonyms ¶ added in v0.2.0
func (*Client) ImportDocumentsWithBody ¶
func (*Client) IndexDocument ¶
func (c *Client) IndexDocument(ctx context.Context, collectionName string, params *IndexDocumentParams, body IndexDocumentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) IndexDocumentWithBody ¶
func (*Client) MultiSearch ¶ added in v0.4.0
func (c *Client) MultiSearch(ctx context.Context, params *MultiSearchParams, body MultiSearchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) MultiSearchWithBody ¶ added in v0.4.0
func (*Client) SearchCollection ¶
func (c *Client) SearchCollection(ctx context.Context, collectionName string, params *SearchCollectionParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) TakeSnapshot ¶ added in v0.2.0
func (c *Client) TakeSnapshot(ctx context.Context, params *TakeSnapshotParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdateCollection ¶ added in v0.5.0
func (c *Client) UpdateCollection(ctx context.Context, collectionName string, body UpdateCollectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdateCollectionWithBody ¶ added in v0.5.0
func (*Client) UpdateDocument ¶
func (c *Client) UpdateDocument(ctx context.Context, collectionName string, documentId string, body UpdateDocumentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdateDocumentWithBody ¶
func (*Client) UpsertAlias ¶
func (c *Client) UpsertAlias(ctx context.Context, aliasName string, body UpsertAliasJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpsertAliasWithBody ¶
func (*Client) UpsertSearchOverride ¶
func (c *Client) UpsertSearchOverride(ctx context.Context, collectionName string, overrideId string, body UpsertSearchOverrideJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpsertSearchOverrideWithBody ¶
func (*Client) UpsertSearchSynonym ¶ added in v0.2.0
func (c *Client) UpsertSearchSynonym(ctx context.Context, collectionName string, synonymId string, body UpsertSearchSynonymJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpsertSearchSynonymWithBody ¶ added in v0.2.0
type ClientInterface ¶
type ClientInterface interface {
// GetAliases request
GetAliases(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteAlias request
DeleteAlias(ctx context.Context, aliasName string, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetAlias request
GetAlias(ctx context.Context, aliasName string, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpsertAlias request with any body
UpsertAliasWithBody(ctx context.Context, aliasName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UpsertAlias(ctx context.Context, aliasName string, body UpsertAliasJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetCollections request
GetCollections(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateCollection request with any body
CreateCollectionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateCollection(ctx context.Context, body CreateCollectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteCollection request
DeleteCollection(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetCollection request
GetCollection(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateCollection request with any body
UpdateCollectionWithBody(ctx context.Context, collectionName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdateCollection(ctx context.Context, collectionName string, body UpdateCollectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteDocuments request
DeleteDocuments(ctx context.Context, collectionName string, params *DeleteDocumentsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// IndexDocument request with any body
IndexDocumentWithBody(ctx context.Context, collectionName string, params *IndexDocumentParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
IndexDocument(ctx context.Context, collectionName string, params *IndexDocumentParams, body IndexDocumentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// ExportDocuments request
ExportDocuments(ctx context.Context, collectionName string, params *ExportDocumentsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// ImportDocuments request with any body
ImportDocumentsWithBody(ctx context.Context, collectionName string, params *ImportDocumentsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// SearchCollection request
SearchCollection(ctx context.Context, collectionName string, params *SearchCollectionParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteDocument request
DeleteDocument(ctx context.Context, collectionName string, documentId string, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetDocument request
GetDocument(ctx context.Context, collectionName string, documentId string, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateDocument request with any body
UpdateDocumentWithBody(ctx context.Context, collectionName string, documentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdateDocument(ctx context.Context, collectionName string, documentId string, body UpdateDocumentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetSearchOverrides request
GetSearchOverrides(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteSearchOverride request
DeleteSearchOverride(ctx context.Context, collectionName string, overrideId string, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetSearchOverride request
GetSearchOverride(ctx context.Context, collectionName string, overrideId string, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpsertSearchOverride request with any body
UpsertSearchOverrideWithBody(ctx context.Context, collectionName string, overrideId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UpsertSearchOverride(ctx context.Context, collectionName string, overrideId string, body UpsertSearchOverrideJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetSearchSynonyms request
GetSearchSynonyms(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteSearchSynonym request
DeleteSearchSynonym(ctx context.Context, collectionName string, synonymId string, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetSearchSynonym request
GetSearchSynonym(ctx context.Context, collectionName string, synonymId string, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpsertSearchSynonym request with any body
UpsertSearchSynonymWithBody(ctx context.Context, collectionName string, synonymId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UpsertSearchSynonym(ctx context.Context, collectionName string, synonymId string, body UpsertSearchSynonymJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// Debug request
Debug(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// Health request
Health(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetKeys request
GetKeys(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateKey request with any body
CreateKeyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateKey(ctx context.Context, body CreateKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteKey request
DeleteKey(ctx context.Context, keyId int64, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetKey request
GetKey(ctx context.Context, keyId int64, reqEditors ...RequestEditorFn) (*http.Response, error)
// MultiSearch request with any body
MultiSearchWithBody(ctx context.Context, params *MultiSearchParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
MultiSearch(ctx context.Context, params *MultiSearchParams, body MultiSearchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// TakeSnapshot request
TakeSnapshot(ctx context.Context, params *TakeSnapshotParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// Vote request
Vote(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
}
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithAPIKey ¶
func WithAPIKey(apiKey string) ClientOption
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) CreateCollectionWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateCollectionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCollectionResponse, error)
CreateCollectionWithBodyWithResponse request with arbitrary body returning *CreateCollectionResponse
func (*ClientWithResponses) CreateCollectionWithResponse ¶
func (c *ClientWithResponses) CreateCollectionWithResponse(ctx context.Context, body CreateCollectionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCollectionResponse, error)
func (*ClientWithResponses) CreateKeyWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateKeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateKeyResponse, error)
CreateKeyWithBodyWithResponse request with arbitrary body returning *CreateKeyResponse
func (*ClientWithResponses) CreateKeyWithResponse ¶
func (c *ClientWithResponses) CreateKeyWithResponse(ctx context.Context, body CreateKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateKeyResponse, error)
func (*ClientWithResponses) DebugWithResponse ¶
func (c *ClientWithResponses) DebugWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*DebugResponse, error)
DebugWithResponse request returning *DebugResponse
func (*ClientWithResponses) DeleteAliasWithResponse ¶
func (c *ClientWithResponses) DeleteAliasWithResponse(ctx context.Context, aliasName string, reqEditors ...RequestEditorFn) (*DeleteAliasResponse, error)
DeleteAliasWithResponse request returning *DeleteAliasResponse
func (*ClientWithResponses) DeleteCollectionWithResponse ¶
func (c *ClientWithResponses) DeleteCollectionWithResponse(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*DeleteCollectionResponse, error)
DeleteCollectionWithResponse request returning *DeleteCollectionResponse
func (*ClientWithResponses) DeleteDocumentWithResponse ¶
func (c *ClientWithResponses) DeleteDocumentWithResponse(ctx context.Context, collectionName string, documentId string, reqEditors ...RequestEditorFn) (*DeleteDocumentResponse, error)
DeleteDocumentWithResponse request returning *DeleteDocumentResponse
func (*ClientWithResponses) DeleteDocumentsWithResponse ¶
func (c *ClientWithResponses) DeleteDocumentsWithResponse(ctx context.Context, collectionName string, params *DeleteDocumentsParams, reqEditors ...RequestEditorFn) (*DeleteDocumentsResponse, error)
DeleteDocumentsWithResponse request returning *DeleteDocumentsResponse
func (*ClientWithResponses) DeleteKeyWithResponse ¶
func (c *ClientWithResponses) DeleteKeyWithResponse(ctx context.Context, keyId int64, reqEditors ...RequestEditorFn) (*DeleteKeyResponse, error)
DeleteKeyWithResponse request returning *DeleteKeyResponse
func (*ClientWithResponses) DeleteSearchOverrideWithResponse ¶
func (c *ClientWithResponses) DeleteSearchOverrideWithResponse(ctx context.Context, collectionName string, overrideId string, reqEditors ...RequestEditorFn) (*DeleteSearchOverrideResponse, error)
DeleteSearchOverrideWithResponse request returning *DeleteSearchOverrideResponse
func (*ClientWithResponses) DeleteSearchSynonymWithResponse ¶ added in v0.2.0
func (c *ClientWithResponses) DeleteSearchSynonymWithResponse(ctx context.Context, collectionName string, synonymId string, reqEditors ...RequestEditorFn) (*DeleteSearchSynonymResponse, error)
DeleteSearchSynonymWithResponse request returning *DeleteSearchSynonymResponse
func (*ClientWithResponses) ExportDocumentsWithResponse ¶
func (c *ClientWithResponses) ExportDocumentsWithResponse(ctx context.Context, collectionName string, params *ExportDocumentsParams, reqEditors ...RequestEditorFn) (*ExportDocumentsResponse, error)
ExportDocumentsWithResponse request returning *ExportDocumentsResponse
func (*ClientWithResponses) GetAliasWithResponse ¶
func (c *ClientWithResponses) GetAliasWithResponse(ctx context.Context, aliasName string, reqEditors ...RequestEditorFn) (*GetAliasResponse, error)
GetAliasWithResponse request returning *GetAliasResponse
func (*ClientWithResponses) GetAliasesWithResponse ¶
func (c *ClientWithResponses) GetAliasesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetAliasesResponse, error)
GetAliasesWithResponse request returning *GetAliasesResponse
func (*ClientWithResponses) GetCollectionWithResponse ¶
func (c *ClientWithResponses) GetCollectionWithResponse(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*GetCollectionResponse, error)
GetCollectionWithResponse request returning *GetCollectionResponse
func (*ClientWithResponses) GetCollectionsWithResponse ¶
func (c *ClientWithResponses) GetCollectionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCollectionsResponse, error)
GetCollectionsWithResponse request returning *GetCollectionsResponse
func (*ClientWithResponses) GetDocumentWithResponse ¶
func (c *ClientWithResponses) GetDocumentWithResponse(ctx context.Context, collectionName string, documentId string, reqEditors ...RequestEditorFn) (*GetDocumentResponse, error)
GetDocumentWithResponse request returning *GetDocumentResponse
func (*ClientWithResponses) GetKeyWithResponse ¶
func (c *ClientWithResponses) GetKeyWithResponse(ctx context.Context, keyId int64, reqEditors ...RequestEditorFn) (*GetKeyResponse, error)
GetKeyWithResponse request returning *GetKeyResponse
func (*ClientWithResponses) GetKeysWithResponse ¶
func (c *ClientWithResponses) GetKeysWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetKeysResponse, error)
GetKeysWithResponse request returning *GetKeysResponse
func (*ClientWithResponses) GetSearchOverrideWithResponse ¶
func (c *ClientWithResponses) GetSearchOverrideWithResponse(ctx context.Context, collectionName string, overrideId string, reqEditors ...RequestEditorFn) (*GetSearchOverrideResponse, error)
GetSearchOverrideWithResponse request returning *GetSearchOverrideResponse
func (*ClientWithResponses) GetSearchOverridesWithResponse ¶
func (c *ClientWithResponses) GetSearchOverridesWithResponse(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*GetSearchOverridesResponse, error)
GetSearchOverridesWithResponse request returning *GetSearchOverridesResponse
func (*ClientWithResponses) GetSearchSynonymWithResponse ¶ added in v0.2.0
func (c *ClientWithResponses) GetSearchSynonymWithResponse(ctx context.Context, collectionName string, synonymId string, reqEditors ...RequestEditorFn) (*GetSearchSynonymResponse, error)
GetSearchSynonymWithResponse request returning *GetSearchSynonymResponse
func (*ClientWithResponses) GetSearchSynonymsWithResponse ¶ added in v0.2.0
func (c *ClientWithResponses) GetSearchSynonymsWithResponse(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*GetSearchSynonymsResponse, error)
GetSearchSynonymsWithResponse request returning *GetSearchSynonymsResponse
func (*ClientWithResponses) HealthWithResponse ¶
func (c *ClientWithResponses) HealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthResponse, error)
HealthWithResponse request returning *HealthResponse
func (*ClientWithResponses) ImportDocumentsWithBodyWithResponse ¶
func (c *ClientWithResponses) ImportDocumentsWithBodyWithResponse(ctx context.Context, collectionName string, params *ImportDocumentsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ImportDocumentsResponse, error)
ImportDocumentsWithBodyWithResponse request with arbitrary body returning *ImportDocumentsResponse
func (*ClientWithResponses) IndexDocumentWithBodyWithResponse ¶
func (c *ClientWithResponses) IndexDocumentWithBodyWithResponse(ctx context.Context, collectionName string, params *IndexDocumentParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IndexDocumentResponse, error)
IndexDocumentWithBodyWithResponse request with arbitrary body returning *IndexDocumentResponse
func (*ClientWithResponses) IndexDocumentWithResponse ¶
func (c *ClientWithResponses) IndexDocumentWithResponse(ctx context.Context, collectionName string, params *IndexDocumentParams, body IndexDocumentJSONRequestBody, reqEditors ...RequestEditorFn) (*IndexDocumentResponse, error)
func (*ClientWithResponses) MultiSearchWithBodyWithResponse ¶ added in v0.4.0
func (c *ClientWithResponses) MultiSearchWithBodyWithResponse(ctx context.Context, params *MultiSearchParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*MultiSearchResponse, error)
MultiSearchWithBodyWithResponse request with arbitrary body returning *MultiSearchResponse
func (*ClientWithResponses) MultiSearchWithResponse ¶ added in v0.4.0
func (c *ClientWithResponses) MultiSearchWithResponse(ctx context.Context, params *MultiSearchParams, body MultiSearchJSONRequestBody, reqEditors ...RequestEditorFn) (*MultiSearchResponse, error)
func (*ClientWithResponses) SearchCollectionWithResponse ¶
func (c *ClientWithResponses) SearchCollectionWithResponse(ctx context.Context, collectionName string, params *SearchCollectionParams, reqEditors ...RequestEditorFn) (*SearchCollectionResponse, error)
SearchCollectionWithResponse request returning *SearchCollectionResponse
func (*ClientWithResponses) TakeSnapshotWithResponse ¶ added in v0.2.0
func (c *ClientWithResponses) TakeSnapshotWithResponse(ctx context.Context, params *TakeSnapshotParams, reqEditors ...RequestEditorFn) (*TakeSnapshotResponse, error)
TakeSnapshotWithResponse request returning *TakeSnapshotResponse
func (*ClientWithResponses) UpdateCollectionWithBodyWithResponse ¶ added in v0.5.0
func (c *ClientWithResponses) UpdateCollectionWithBodyWithResponse(ctx context.Context, collectionName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCollectionResponse, error)
UpdateCollectionWithBodyWithResponse request with arbitrary body returning *UpdateCollectionResponse
func (*ClientWithResponses) UpdateCollectionWithResponse ¶ added in v0.5.0
func (c *ClientWithResponses) UpdateCollectionWithResponse(ctx context.Context, collectionName string, body UpdateCollectionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCollectionResponse, error)
func (*ClientWithResponses) UpdateDocumentWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateDocumentWithBodyWithResponse(ctx context.Context, collectionName string, documentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateDocumentResponse, error)
UpdateDocumentWithBodyWithResponse request with arbitrary body returning *UpdateDocumentResponse
func (*ClientWithResponses) UpdateDocumentWithResponse ¶
func (c *ClientWithResponses) UpdateDocumentWithResponse(ctx context.Context, collectionName string, documentId string, body UpdateDocumentJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateDocumentResponse, error)
func (*ClientWithResponses) UpsertAliasWithBodyWithResponse ¶
func (c *ClientWithResponses) UpsertAliasWithBodyWithResponse(ctx context.Context, aliasName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpsertAliasResponse, error)
UpsertAliasWithBodyWithResponse request with arbitrary body returning *UpsertAliasResponse
func (*ClientWithResponses) UpsertAliasWithResponse ¶
func (c *ClientWithResponses) UpsertAliasWithResponse(ctx context.Context, aliasName string, body UpsertAliasJSONRequestBody, reqEditors ...RequestEditorFn) (*UpsertAliasResponse, error)
func (*ClientWithResponses) UpsertSearchOverrideWithBodyWithResponse ¶
func (c *ClientWithResponses) UpsertSearchOverrideWithBodyWithResponse(ctx context.Context, collectionName string, overrideId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpsertSearchOverrideResponse, error)
UpsertSearchOverrideWithBodyWithResponse request with arbitrary body returning *UpsertSearchOverrideResponse
func (*ClientWithResponses) UpsertSearchOverrideWithResponse ¶
func (c *ClientWithResponses) UpsertSearchOverrideWithResponse(ctx context.Context, collectionName string, overrideId string, body UpsertSearchOverrideJSONRequestBody, reqEditors ...RequestEditorFn) (*UpsertSearchOverrideResponse, error)
func (*ClientWithResponses) UpsertSearchSynonymWithBodyWithResponse ¶ added in v0.2.0
func (c *ClientWithResponses) UpsertSearchSynonymWithBodyWithResponse(ctx context.Context, collectionName string, synonymId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpsertSearchSynonymResponse, error)
UpsertSearchSynonymWithBodyWithResponse request with arbitrary body returning *UpsertSearchSynonymResponse
func (*ClientWithResponses) UpsertSearchSynonymWithResponse ¶ added in v0.2.0
func (c *ClientWithResponses) UpsertSearchSynonymWithResponse(ctx context.Context, collectionName string, synonymId string, body UpsertSearchSynonymJSONRequestBody, reqEditors ...RequestEditorFn) (*UpsertSearchSynonymResponse, error)
func (*ClientWithResponses) VoteWithResponse ¶ added in v0.2.0
func (c *ClientWithResponses) VoteWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*VoteResponse, error)
VoteWithResponse request returning *VoteResponse
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// GetAliases request
GetAliasesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetAliasesResponse, error)
// DeleteAlias request
DeleteAliasWithResponse(ctx context.Context, aliasName string, reqEditors ...RequestEditorFn) (*DeleteAliasResponse, error)
// GetAlias request
GetAliasWithResponse(ctx context.Context, aliasName string, reqEditors ...RequestEditorFn) (*GetAliasResponse, error)
// UpsertAlias request with any body
UpsertAliasWithBodyWithResponse(ctx context.Context, aliasName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpsertAliasResponse, error)
UpsertAliasWithResponse(ctx context.Context, aliasName string, body UpsertAliasJSONRequestBody, reqEditors ...RequestEditorFn) (*UpsertAliasResponse, error)
// GetCollections request
GetCollectionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCollectionsResponse, error)
// CreateCollection request with any body
CreateCollectionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCollectionResponse, error)
CreateCollectionWithResponse(ctx context.Context, body CreateCollectionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCollectionResponse, error)
// DeleteCollection request
DeleteCollectionWithResponse(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*DeleteCollectionResponse, error)
// GetCollection request
GetCollectionWithResponse(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*GetCollectionResponse, error)
// UpdateCollection request with any body
UpdateCollectionWithBodyWithResponse(ctx context.Context, collectionName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCollectionResponse, error)
UpdateCollectionWithResponse(ctx context.Context, collectionName string, body UpdateCollectionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCollectionResponse, error)
// DeleteDocuments request
DeleteDocumentsWithResponse(ctx context.Context, collectionName string, params *DeleteDocumentsParams, reqEditors ...RequestEditorFn) (*DeleteDocumentsResponse, error)
// IndexDocument request with any body
IndexDocumentWithBodyWithResponse(ctx context.Context, collectionName string, params *IndexDocumentParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IndexDocumentResponse, error)
IndexDocumentWithResponse(ctx context.Context, collectionName string, params *IndexDocumentParams, body IndexDocumentJSONRequestBody, reqEditors ...RequestEditorFn) (*IndexDocumentResponse, error)
// ExportDocuments request
ExportDocumentsWithResponse(ctx context.Context, collectionName string, params *ExportDocumentsParams, reqEditors ...RequestEditorFn) (*ExportDocumentsResponse, error)
// ImportDocuments request with any body
ImportDocumentsWithBodyWithResponse(ctx context.Context, collectionName string, params *ImportDocumentsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ImportDocumentsResponse, error)
// SearchCollection request
SearchCollectionWithResponse(ctx context.Context, collectionName string, params *SearchCollectionParams, reqEditors ...RequestEditorFn) (*SearchCollectionResponse, error)
// DeleteDocument request
DeleteDocumentWithResponse(ctx context.Context, collectionName string, documentId string, reqEditors ...RequestEditorFn) (*DeleteDocumentResponse, error)
// GetDocument request
GetDocumentWithResponse(ctx context.Context, collectionName string, documentId string, reqEditors ...RequestEditorFn) (*GetDocumentResponse, error)
// UpdateDocument request with any body
UpdateDocumentWithBodyWithResponse(ctx context.Context, collectionName string, documentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateDocumentResponse, error)
UpdateDocumentWithResponse(ctx context.Context, collectionName string, documentId string, body UpdateDocumentJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateDocumentResponse, error)
// GetSearchOverrides request
GetSearchOverridesWithResponse(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*GetSearchOverridesResponse, error)
// DeleteSearchOverride request
DeleteSearchOverrideWithResponse(ctx context.Context, collectionName string, overrideId string, reqEditors ...RequestEditorFn) (*DeleteSearchOverrideResponse, error)
// GetSearchOverride request
GetSearchOverrideWithResponse(ctx context.Context, collectionName string, overrideId string, reqEditors ...RequestEditorFn) (*GetSearchOverrideResponse, error)
// UpsertSearchOverride request with any body
UpsertSearchOverrideWithBodyWithResponse(ctx context.Context, collectionName string, overrideId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpsertSearchOverrideResponse, error)
UpsertSearchOverrideWithResponse(ctx context.Context, collectionName string, overrideId string, body UpsertSearchOverrideJSONRequestBody, reqEditors ...RequestEditorFn) (*UpsertSearchOverrideResponse, error)
// GetSearchSynonyms request
GetSearchSynonymsWithResponse(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*GetSearchSynonymsResponse, error)
// DeleteSearchSynonym request
DeleteSearchSynonymWithResponse(ctx context.Context, collectionName string, synonymId string, reqEditors ...RequestEditorFn) (*DeleteSearchSynonymResponse, error)
// GetSearchSynonym request
GetSearchSynonymWithResponse(ctx context.Context, collectionName string, synonymId string, reqEditors ...RequestEditorFn) (*GetSearchSynonymResponse, error)
// UpsertSearchSynonym request with any body
UpsertSearchSynonymWithBodyWithResponse(ctx context.Context, collectionName string, synonymId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpsertSearchSynonymResponse, error)
UpsertSearchSynonymWithResponse(ctx context.Context, collectionName string, synonymId string, body UpsertSearchSynonymJSONRequestBody, reqEditors ...RequestEditorFn) (*UpsertSearchSynonymResponse, error)
// Debug request
DebugWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*DebugResponse, error)
// Health request
HealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthResponse, error)
// GetKeys request
GetKeysWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetKeysResponse, error)
// CreateKey request with any body
CreateKeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateKeyResponse, error)
CreateKeyWithResponse(ctx context.Context, body CreateKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateKeyResponse, error)
// DeleteKey request
DeleteKeyWithResponse(ctx context.Context, keyId int64, reqEditors ...RequestEditorFn) (*DeleteKeyResponse, error)
// GetKey request
GetKeyWithResponse(ctx context.Context, keyId int64, reqEditors ...RequestEditorFn) (*GetKeyResponse, error)
// MultiSearch request with any body
MultiSearchWithBodyWithResponse(ctx context.Context, params *MultiSearchParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*MultiSearchResponse, error)
MultiSearchWithResponse(ctx context.Context, params *MultiSearchParams, body MultiSearchJSONRequestBody, reqEditors ...RequestEditorFn) (*MultiSearchResponse, error)
// TakeSnapshot request
TakeSnapshotWithResponse(ctx context.Context, params *TakeSnapshotParams, reqEditors ...RequestEditorFn) (*TakeSnapshotResponse, error)
// Vote request
VoteWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*VoteResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CollectionAlias ¶
type CollectionAlias struct {
// Name of the collection the alias mapped to
CollectionName string `json:"collection_name"`
// Name of the collection alias
Name string `json:"name"`
}
CollectionAlias defines model for CollectionAlias.
type CollectionAliasSchema ¶
type CollectionAliasSchema struct {
// Name of the collection you wish to map the alias to
CollectionName string `json:"collection_name"`
}
CollectionAliasSchema defines model for CollectionAliasSchema.
type CollectionAliasesResponse ¶
type CollectionAliasesResponse struct {
Aliases []*CollectionAlias `json:"aliases"`
}
CollectionAliasesResponse defines model for CollectionAliasesResponse.
type CollectionResponse ¶ added in v0.4.0
type CollectionResponse struct {
// Embedded struct due to allOf(#/components/schemas/CollectionSchema)
CollectionSchema `yaml:",inline"`
// Embedded fields due to inline allOf schema
// Timestamp of when the collection was created
CreatedAt int64 `json:"created_at"`
// Number of documents in the collection
NumDocuments int64 `json:"num_documents"`
}
CollectionResponse defines model for CollectionResponse.
type CollectionSchema ¶
type CollectionSchema struct {
// The name of an int32 / float field that determines the order in which the search results are ranked when a sort_by clause is not provided during searching. This field must indicate some kind of popularity.
DefaultSortingField *string `json:"default_sorting_field,omitempty"`
// Enables experimental support at a collection level for nested object or object array fields. This field is only available if the Typesense server is version `0.24.0.rcn34` or later.
EnableNestedFields *bool `json:"enable_nested_fields,omitempty"`
// A list of fields for querying, filtering and faceting
Fields []Field `json:"fields"`
// Name of the collection
Name string `json:"name"`
// List of symbols or special characters to be indexed.
SymbolsToIndex *[]string `json:"symbols_to_index,omitempty"`
// List of symbols or special characters to be used for splitting the text into individual words in addition to space and new-line characters.
TokenSeparators *[]string `json:"token_separators,omitempty"`
}
CollectionSchema defines model for CollectionSchema.
type CollectionUpdateSchema ¶ added in v0.5.0
type CollectionUpdateSchema struct {
// A list of fields for querying, filtering and faceting
Fields []Field `json:"fields"`
}
CollectionUpdateSchema defines model for CollectionUpdateSchema.
type CreateCollectionJSONBody ¶
type CreateCollectionJSONBody CollectionSchema
CreateCollectionJSONBody defines parameters for CreateCollection.
type CreateCollectionJSONRequestBody ¶
type CreateCollectionJSONRequestBody CreateCollectionJSONBody
CreateCollectionJSONRequestBody defines body for CreateCollection for application/json ContentType.
type CreateCollectionResponse ¶
type CreateCollectionResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *CollectionResponse
JSON400 *ApiResponse
JSON409 *ApiResponse
}
func ParseCreateCollectionResponse ¶
func ParseCreateCollectionResponse(rsp *http.Response) (*CreateCollectionResponse, error)
ParseCreateCollectionResponse parses an HTTP response from a CreateCollectionWithResponse call
func (CreateCollectionResponse) Status ¶
func (r CreateCollectionResponse) Status() string
Status returns HTTPResponse.Status
func (CreateCollectionResponse) StatusCode ¶
func (r CreateCollectionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateKeyJSONBody ¶
type CreateKeyJSONBody ApiKeySchema
CreateKeyJSONBody defines parameters for CreateKey.
type CreateKeyJSONRequestBody ¶
type CreateKeyJSONRequestBody CreateKeyJSONBody
CreateKeyJSONRequestBody defines body for CreateKey for application/json ContentType.
type CreateKeyResponse ¶
type CreateKeyResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *ApiKey
JSON400 *ApiResponse
JSON409 *ApiResponse
}
func ParseCreateKeyResponse ¶
func ParseCreateKeyResponse(rsp *http.Response) (*CreateKeyResponse, error)
ParseCreateKeyResponse parses an HTTP response from a CreateKeyWithResponse call
func (CreateKeyResponse) Status ¶
func (r CreateKeyResponse) Status() string
Status returns HTTPResponse.Status
func (CreateKeyResponse) StatusCode ¶
func (r CreateKeyResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DebugResponse ¶
type DebugResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *struct {
Version *string `json:"version,omitempty"`
}
}
func ParseDebugResponse ¶
func ParseDebugResponse(rsp *http.Response) (*DebugResponse, error)
ParseDebugResponse parses an HTTP response from a DebugWithResponse call
func (DebugResponse) Status ¶
func (r DebugResponse) Status() string
Status returns HTTPResponse.Status
func (DebugResponse) StatusCode ¶
func (r DebugResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteAliasResponse ¶
type DeleteAliasResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *CollectionAlias
JSON404 *ApiResponse
}
func ParseDeleteAliasResponse ¶
func ParseDeleteAliasResponse(rsp *http.Response) (*DeleteAliasResponse, error)
ParseDeleteAliasResponse parses an HTTP response from a DeleteAliasWithResponse call
func (DeleteAliasResponse) Status ¶
func (r DeleteAliasResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteAliasResponse) StatusCode ¶
func (r DeleteAliasResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteCollectionResponse ¶
type DeleteCollectionResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *CollectionResponse
JSON404 *ApiResponse
}
func ParseDeleteCollectionResponse ¶
func ParseDeleteCollectionResponse(rsp *http.Response) (*DeleteCollectionResponse, error)
ParseDeleteCollectionResponse parses an HTTP response from a DeleteCollectionWithResponse call
func (DeleteCollectionResponse) Status ¶
func (r DeleteCollectionResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteCollectionResponse) StatusCode ¶
func (r DeleteCollectionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteDocumentResponse ¶
type DeleteDocumentResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *map[string]interface{}
JSON404 *ApiResponse
}
func ParseDeleteDocumentResponse ¶
func ParseDeleteDocumentResponse(rsp *http.Response) (*DeleteDocumentResponse, error)
ParseDeleteDocumentResponse parses an HTTP response from a DeleteDocumentWithResponse call
func (DeleteDocumentResponse) Status ¶
func (r DeleteDocumentResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteDocumentResponse) StatusCode ¶
func (r DeleteDocumentResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteDocumentsParams ¶
type DeleteDocumentsParams struct {
FilterBy *string `json:"filter_by,omitempty"`
BatchSize *int `json:"batch_size,omitempty"`
}
DeleteDocumentsParams defines parameters for DeleteDocuments.
type DeleteDocumentsResponse ¶
type DeleteDocumentsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *struct {
NumDeleted int `json:"num_deleted"`
}
JSON404 *ApiResponse
}
func ParseDeleteDocumentsResponse ¶
func ParseDeleteDocumentsResponse(rsp *http.Response) (*DeleteDocumentsResponse, error)
ParseDeleteDocumentsResponse parses an HTTP response from a DeleteDocumentsWithResponse call
func (DeleteDocumentsResponse) Status ¶
func (r DeleteDocumentsResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteDocumentsResponse) StatusCode ¶
func (r DeleteDocumentsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteKeyResponse ¶
type DeleteKeyResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ApiKey
JSON400 *ApiResponse
JSON404 *ApiResponse
}
func ParseDeleteKeyResponse ¶
func ParseDeleteKeyResponse(rsp *http.Response) (*DeleteKeyResponse, error)
ParseDeleteKeyResponse parses an HTTP response from a DeleteKeyWithResponse call
func (DeleteKeyResponse) Status ¶
func (r DeleteKeyResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteKeyResponse) StatusCode ¶
func (r DeleteKeyResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteSearchOverrideResponse ¶
type DeleteSearchOverrideResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *SearchOverride
JSON404 *ApiResponse
}
func ParseDeleteSearchOverrideResponse ¶
func ParseDeleteSearchOverrideResponse(rsp *http.Response) (*DeleteSearchOverrideResponse, error)
ParseDeleteSearchOverrideResponse parses an HTTP response from a DeleteSearchOverrideWithResponse call
func (DeleteSearchOverrideResponse) Status ¶
func (r DeleteSearchOverrideResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteSearchOverrideResponse) StatusCode ¶
func (r DeleteSearchOverrideResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteSearchSynonymResponse ¶ added in v0.2.0
type DeleteSearchSynonymResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *SearchSynonym
JSON404 *ApiResponse
}
func ParseDeleteSearchSynonymResponse ¶ added in v0.2.0
func ParseDeleteSearchSynonymResponse(rsp *http.Response) (*DeleteSearchSynonymResponse, error)
ParseDeleteSearchSynonymResponse parses an HTTP response from a DeleteSearchSynonymWithResponse call
func (DeleteSearchSynonymResponse) Status ¶ added in v0.2.0
func (r DeleteSearchSynonymResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteSearchSynonymResponse) StatusCode ¶ added in v0.2.0
func (r DeleteSearchSynonymResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ExportDocumentsParams ¶ added in v0.4.0
type ExportDocumentsParams struct {
FilterBy *string `json:"filter_by,omitempty"`
IncludeFields *string `json:"include_fields,omitempty"`
ExcludeFields *string `json:"exclude_fields,omitempty"`
}
ExportDocumentsParams defines parameters for ExportDocuments.
type ExportDocumentsResponse ¶
type ExportDocumentsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON404 *ApiResponse
}
func ParseExportDocumentsResponse ¶
func ParseExportDocumentsResponse(rsp *http.Response) (*ExportDocumentsResponse, error)
ParseExportDocumentsResponse parses an HTTP response from a ExportDocumentsWithResponse call
func (ExportDocumentsResponse) Status ¶
func (r ExportDocumentsResponse) Status() string
Status returns HTTPResponse.Status
func (ExportDocumentsResponse) StatusCode ¶
func (r ExportDocumentsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type FacetCounts ¶ added in v0.4.0
type FacetCounts struct {
Counts *[]struct {
Count *int `json:"count,omitempty"`
Highlighted *string `json:"highlighted,omitempty"`
Value *string `json:"value,omitempty"`
} `json:"counts,omitempty"`
FieldName *string `json:"field_name,omitempty"`
Stats *struct {
Avg *float64 `json:"avg,omitempty"`
Max *float64 `json:"max,omitempty"`
Min *float64 `json:"min,omitempty"`
Sum *float64 `json:"sum,omitempty"`
TotalValues *int `json:"total_values,omitempty"`
} `json:"stats,omitempty"`
}
FacetCounts defines model for FacetCounts.
type Field ¶
type Field struct {
Drop *bool `json:"drop,omitempty"`
Facet *bool `json:"facet,omitempty"`
Index *bool `json:"index,omitempty"`
Infix *bool `json:"infix,omitempty"`
Locale *string `json:"locale,omitempty"`
Name string `json:"name"`
Optional *bool `json:"optional,omitempty"`
Sort *bool `json:"sort,omitempty"`
Type string `json:"type"`
}
Field defines model for Field.
type GetAliasResponse ¶
type GetAliasResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *CollectionAlias
JSON404 *ApiResponse
}
func ParseGetAliasResponse ¶
func ParseGetAliasResponse(rsp *http.Response) (*GetAliasResponse, error)
ParseGetAliasResponse parses an HTTP response from a GetAliasWithResponse call
func (GetAliasResponse) Status ¶
func (r GetAliasResponse) Status() string
Status returns HTTPResponse.Status
func (GetAliasResponse) StatusCode ¶
func (r GetAliasResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetAliasesResponse ¶
type GetAliasesResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *CollectionAliasesResponse
}
func ParseGetAliasesResponse ¶
func ParseGetAliasesResponse(rsp *http.Response) (*GetAliasesResponse, error)
ParseGetAliasesResponse parses an HTTP response from a GetAliasesWithResponse call
func (GetAliasesResponse) Status ¶
func (r GetAliasesResponse) Status() string
Status returns HTTPResponse.Status
func (GetAliasesResponse) StatusCode ¶
func (r GetAliasesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetCollectionResponse ¶
type GetCollectionResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *CollectionResponse
JSON404 *ApiResponse
}
func ParseGetCollectionResponse ¶
func ParseGetCollectionResponse(rsp *http.Response) (*GetCollectionResponse, error)
ParseGetCollectionResponse parses an HTTP response from a GetCollectionWithResponse call
func (GetCollectionResponse) Status ¶
func (r GetCollectionResponse) Status() string
Status returns HTTPResponse.Status
func (GetCollectionResponse) StatusCode ¶
func (r GetCollectionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetCollectionsResponse ¶
type GetCollectionsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *[]*CollectionResponse
}
func ParseGetCollectionsResponse ¶
func ParseGetCollectionsResponse(rsp *http.Response) (*GetCollectionsResponse, error)
ParseGetCollectionsResponse parses an HTTP response from a GetCollectionsWithResponse call
func (GetCollectionsResponse) Status ¶
func (r GetCollectionsResponse) Status() string
Status returns HTTPResponse.Status
func (GetCollectionsResponse) StatusCode ¶
func (r GetCollectionsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetDocumentResponse ¶
type GetDocumentResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *map[string]interface{}
JSON404 *ApiResponse
}
func ParseGetDocumentResponse ¶
func ParseGetDocumentResponse(rsp *http.Response) (*GetDocumentResponse, error)
ParseGetDocumentResponse parses an HTTP response from a GetDocumentWithResponse call
func (GetDocumentResponse) Status ¶
func (r GetDocumentResponse) Status() string
Status returns HTTPResponse.Status
func (GetDocumentResponse) StatusCode ¶
func (r GetDocumentResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetKeyResponse ¶
type GetKeyResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ApiKey
JSON404 *ApiResponse
}
func ParseGetKeyResponse ¶
func ParseGetKeyResponse(rsp *http.Response) (*GetKeyResponse, error)
ParseGetKeyResponse parses an HTTP response from a GetKeyWithResponse call
func (GetKeyResponse) Status ¶
func (r GetKeyResponse) Status() string
Status returns HTTPResponse.Status
func (GetKeyResponse) StatusCode ¶
func (r GetKeyResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetKeysResponse ¶
type GetKeysResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ApiKeysResponse
}
func ParseGetKeysResponse ¶
func ParseGetKeysResponse(rsp *http.Response) (*GetKeysResponse, error)
ParseGetKeysResponse parses an HTTP response from a GetKeysWithResponse call
func (GetKeysResponse) Status ¶
func (r GetKeysResponse) Status() string
Status returns HTTPResponse.Status
func (GetKeysResponse) StatusCode ¶
func (r GetKeysResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetSearchOverrideResponse ¶
type GetSearchOverrideResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *SearchOverride
}
func ParseGetSearchOverrideResponse ¶
func ParseGetSearchOverrideResponse(rsp *http.Response) (*GetSearchOverrideResponse, error)
ParseGetSearchOverrideResponse parses an HTTP response from a GetSearchOverrideWithResponse call
func (GetSearchOverrideResponse) Status ¶
func (r GetSearchOverrideResponse) Status() string
Status returns HTTPResponse.Status
func (GetSearchOverrideResponse) StatusCode ¶
func (r GetSearchOverrideResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetSearchOverridesResponse ¶
type GetSearchOverridesResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *SearchOverridesResponse
}
func ParseGetSearchOverridesResponse ¶
func ParseGetSearchOverridesResponse(rsp *http.Response) (*GetSearchOverridesResponse, error)
ParseGetSearchOverridesResponse parses an HTTP response from a GetSearchOverridesWithResponse call
func (GetSearchOverridesResponse) Status ¶
func (r GetSearchOverridesResponse) Status() string
Status returns HTTPResponse.Status
func (GetSearchOverridesResponse) StatusCode ¶
func (r GetSearchOverridesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetSearchSynonymResponse ¶ added in v0.2.0
type GetSearchSynonymResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *SearchSynonym
JSON404 *ApiResponse
}
func ParseGetSearchSynonymResponse ¶ added in v0.2.0
func ParseGetSearchSynonymResponse(rsp *http.Response) (*GetSearchSynonymResponse, error)
ParseGetSearchSynonymResponse parses an HTTP response from a GetSearchSynonymWithResponse call
func (GetSearchSynonymResponse) Status ¶ added in v0.2.0
func (r GetSearchSynonymResponse) Status() string
Status returns HTTPResponse.Status
func (GetSearchSynonymResponse) StatusCode ¶ added in v0.2.0
func (r GetSearchSynonymResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetSearchSynonymsResponse ¶ added in v0.2.0
type GetSearchSynonymsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *SearchSynonymsResponse
JSON404 *ApiResponse
}
func ParseGetSearchSynonymsResponse ¶ added in v0.2.0
func ParseGetSearchSynonymsResponse(rsp *http.Response) (*GetSearchSynonymsResponse, error)
ParseGetSearchSynonymsResponse parses an HTTP response from a GetSearchSynonymsWithResponse call
func (GetSearchSynonymsResponse) Status ¶ added in v0.2.0
func (r GetSearchSynonymsResponse) Status() string
Status returns HTTPResponse.Status
func (GetSearchSynonymsResponse) StatusCode ¶ added in v0.2.0
func (r GetSearchSynonymsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HealthResponse ¶
type HealthResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *HealthStatus
}
func ParseHealthResponse ¶
func ParseHealthResponse(rsp *http.Response) (*HealthResponse, error)
ParseHealthResponse parses an HTTP response from a HealthWithResponse call
func (HealthResponse) Status ¶
func (r HealthResponse) Status() string
Status returns HTTPResponse.Status
func (HealthResponse) StatusCode ¶
func (r HealthResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HealthStatus ¶
type HealthStatus struct {
Ok bool `json:"ok"`
}
HealthStatus defines model for HealthStatus.
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type ImportDocumentResponse ¶
type ImportDocumentsParams ¶
type ImportDocumentsParams struct {
Action *string `json:"action,omitempty"`
BatchSize *int `json:"batch_size,omitempty"`
DirtyValues *ImportDocumentsParamsDirtyValues `json:"dirty_values,omitempty"`
}
ImportDocumentsParams defines parameters for ImportDocuments.
type ImportDocumentsParamsDirtyValues ¶ added in v0.4.0
type ImportDocumentsParamsDirtyValues string
ImportDocumentsParamsDirtyValues defines parameters for ImportDocuments.
type ImportDocumentsResponse ¶
type ImportDocumentsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON400 *ApiResponse
JSON404 *ApiResponse
}
func ParseImportDocumentsResponse ¶
func ParseImportDocumentsResponse(rsp *http.Response) (*ImportDocumentsResponse, error)
ParseImportDocumentsResponse parses an HTTP response from a ImportDocumentsWithResponse call
func (ImportDocumentsResponse) Status ¶
func (r ImportDocumentsResponse) Status() string
Status returns HTTPResponse.Status
func (ImportDocumentsResponse) StatusCode ¶
func (r ImportDocumentsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type IndexDocumentJSONBody ¶
type IndexDocumentJSONBody interface{}
IndexDocumentJSONBody defines parameters for IndexDocument.
type IndexDocumentJSONRequestBody ¶
type IndexDocumentJSONRequestBody IndexDocumentJSONBody
IndexDocumentJSONRequestBody defines body for IndexDocument for application/json ContentType.
type IndexDocumentParams ¶
type IndexDocumentParams struct {
// Additional action to perform
Action *IndexDocumentParamsAction `json:"action,omitempty"`
}
IndexDocumentParams defines parameters for IndexDocument.
type IndexDocumentParamsAction ¶ added in v0.4.0
type IndexDocumentParamsAction string
IndexDocumentParamsAction defines parameters for IndexDocument.
type IndexDocumentResponse ¶
type IndexDocumentResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *map[string]interface{}
JSON404 *ApiResponse
}
func ParseIndexDocumentResponse ¶
func ParseIndexDocumentResponse(rsp *http.Response) (*IndexDocumentResponse, error)
ParseIndexDocumentResponse parses an HTTP response from a IndexDocumentWithResponse call
func (IndexDocumentResponse) Status ¶
func (r IndexDocumentResponse) Status() string
Status returns HTTPResponse.Status
func (IndexDocumentResponse) StatusCode ¶
func (r IndexDocumentResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type MultiSearchCollectionParameters ¶ added in v0.4.0
type MultiSearchCollectionParameters struct {
// Embedded struct due to allOf(#/components/schemas/MultiSearchParameters)
MultiSearchParameters `yaml:",inline"`
// Embedded fields due to inline allOf schema
// The collection to search in.
Collection string `json:"collection"`
}
MultiSearchCollectionParameters defines model for MultiSearchCollectionParameters.
type MultiSearchJSONBody ¶ added in v0.4.0
type MultiSearchJSONBody MultiSearchSearchesParameter
MultiSearchJSONBody defines parameters for MultiSearch.
type MultiSearchJSONRequestBody ¶ added in v0.4.0
type MultiSearchJSONRequestBody MultiSearchJSONBody
MultiSearchJSONRequestBody defines body for MultiSearch for application/json ContentType.
type MultiSearchParameters ¶ added in v0.4.0
type MultiSearchParameters struct {
// The duration (in seconds) that determines how long the search query is cached. This value can be set on a per-query basis. Default: 60.
CacheTtl *int `json:"cache_ttl,omitempty"`
// If the number of results found for a specific query is less than this number, Typesense will attempt to drop the tokens in the query until enough results are found. Tokens that have the least individual hits are dropped first. Set to 0 to disable. Default: 10
DropTokensThreshold *int `json:"drop_tokens_threshold,omitempty"`
// If you have some overrides defined but want to disable all of them during query time, you can do that by setting this parameter to false
EnableOverrides *bool `json:"enable_overrides,omitempty"`
// List of fields from the document to exclude in the search result
ExcludeFields *string `json:"exclude_fields,omitempty"`
// Setting this to true will make Typesense consider all prefixes and typo corrections of the words in the query without stopping early when enough results are found (drop_tokens_threshold and typo_tokens_threshold configurations are ignored).
ExhaustiveSearch *bool `json:"exhaustive_search,omitempty"`
// A list of fields that will be used for faceting your results on. Separate multiple fields with a comma.
FacetBy *string `json:"facet_by,omitempty"`
// Facet values that are returned can now be filtered via this parameter. The matching facet text is also highlighted. For example, when faceting by `category`, you can set `facet_query=category:shoe` to return only facet values that contain the prefix "shoe".
FacetQuery *string `json:"facet_query,omitempty"`
// Filter conditions for refining youropen api validator search results. Separate multiple conditions with &&.
FilterBy *string `json:"filter_by,omitempty"`
// You can aggregate search results into groups or buckets by specify one or more `group_by` fields. Separate multiple fields with a comma. To group on a particular field, it must be a faceted field.
GroupBy *string `json:"group_by,omitempty"`
// Maximum number of hits to be returned for every group. If the `group_limit` is set as `K` then only the top K hits in each group are returned in the response. Default: 3
GroupLimit *int `json:"group_limit,omitempty"`
// A list of records to unconditionally hide from search results. A list of `record_id`s to hide. Eg: to hide records with IDs 123 and 456, you'd specify `123,456`.
// You could also use the Overrides feature to override search results based on rules. Overrides are applied first, followed by `pinned_hits` and finally `hidden_hits`.
HiddenHits *string `json:"hidden_hits,omitempty"`
// The number of tokens that should surround the highlighted text on each side. Default: 4
HighlightAffixNumTokens *int `json:"highlight_affix_num_tokens,omitempty"`
// The end tag used for the highlighted snippets. Default: `</mark>`
HighlightEndTag *string `json:"highlight_end_tag,omitempty"`
// A list of custom fields that must be highlighted even if you don't query for them
HighlightFields *string `json:"highlight_fields,omitempty"`
// List of fields which should be highlighted fully without snippeting
HighlightFullFields *string `json:"highlight_full_fields,omitempty"`
// The start tag used for the highlighted snippets. Default: `<mark>`
HighlightStartTag *string `json:"highlight_start_tag,omitempty"`
// List of fields from the document to include in the search result
IncludeFields *string `json:"include_fields,omitempty"`
// If infix index is enabled for this field, infix searching can be done on a per-field basis by sending a comma separated string parameter called infix to the search query. This parameter can have 3 values; `off` infix search is disabled, which is default `always` infix search is performed along with regular search `fallback` infix search is performed if regular search does not produce results
Infix *string `json:"infix,omitempty"`
// There are also 2 parameters that allow you to control the extent of infix searching max_extra_prefix and max_extra_suffix which specify the maximum number of symbols before or after the query that can be present in the token. For example query "K2100" has 2 extra symbols in "6PK2100". By default, any number of prefixes/suffixes can be present for a match.
MaxExtraPrefix *int `json:"max_extra_prefix,omitempty"`
// There are also 2 parameters that allow you to control the extent of infix searching max_extra_prefix and max_extra_suffix which specify the maximum number of symbols before or after the query that can be present in the token. For example query "K2100" has 2 extra symbols in "6PK2100". By default, any number of prefixes/suffixes can be present for a match.
MaxExtraSuffix *int `json:"max_extra_suffix,omitempty"`
// Maximum number of facet values to be returned.
MaxFacetValues *int `json:"max_facet_values,omitempty"`
// Minimum word length for 1-typo correction to be applied. The value of num_typos is still treated as the maximum allowed typos.
MinLen1typo *int `json:"min_len_1typo,omitempty"`
// Minimum word length for 2-typo correction to be applied. The value of num_typos is still treated as the maximum allowed typos.
MinLen2typo *int `json:"min_len_2typo,omitempty"`
// The number of typographical errors (1 or 2) that would be tolerated. Default: 2
NumTypos *int `json:"num_typos,omitempty"`
// Results from this specific page number would be fetched.
Page *int `json:"page,omitempty"`
// Number of results to fetch per page. Default: 10
PerPage *int `json:"per_page,omitempty"`
// A list of records to unconditionally include in the search results at specific positions. An example use case would be to feature or promote certain items on the top of search results. A list of `record_id:hit_position`. Eg: to include a record with ID 123 at Position 1 and another record with ID 456 at Position 5, you'd specify `123:1,456:5`.
// You could also use the Overrides feature to override search results based on rules. Overrides are applied first, followed by `pinned_hits` and finally `hidden_hits`.
PinnedHits *string `json:"pinned_hits,omitempty"`
// You can index content from any logographic language into Typesense if you are able to segment / split the text into space-separated words yourself before indexing and querying.
// Set this parameter to true to do the same
PreSegmentedQuery *bool `json:"pre_segmented_query,omitempty"`
// Boolean field to indicate that the last word in the query should be treated as a prefix, and not as a whole word. This is used for building autocomplete and instant search interfaces. Defaults to true.
Prefix *string `json:"prefix,omitempty"`
// Set this parameter to true to ensure that an exact match is ranked above the others
PrioritizeExactMatch *bool `json:"prioritize_exact_match,omitempty"`
// The query text to search for in the collection. Use * as the search string to return all documents. This is typically useful when used in conjunction with filter_by.
Q *string `json:"q,omitempty"`
// A list of `string` fields that should be queried against. Multiple fields are separated with a comma.
QueryBy *string `json:"query_by,omitempty"`
// The relative weight to give each `query_by` field when ranking results. This can be used to boost fields in priority, when looking for matches. Multiple fields are separated with a comma.
QueryByWeights *string `json:"query_by_weights,omitempty"`
// Typesense will attempt to return results early if the cutoff time has elapsed. This is not a strict guarantee and facet computation is not bound by this parameter.
SearchCutoffMs *int `json:"search_cutoff_ms,omitempty"`
// Field values under this length will be fully highlighted, instead of showing a snippet of relevant portion. Default: 30
SnippetThreshold *int `json:"snippet_threshold,omitempty"`
// A list of numerical fields and their corresponding sort orders that will be used for ordering your results. Up to 3 sort fields can be specified. The text similarity score is exposed as a special `_text_match` field that you can use in the list of sorting fields. If no `sort_by` parameter is specified, results are sorted by `_text_match:desc,default_sorting_field:desc`
SortBy *string `json:"sort_by,omitempty"`
// If the number of results found for a specific query is less than this number, Typesense will attempt to look for tokens with more typos until enough results are found. Default: 100
TypoTokensThreshold *int `json:"typo_tokens_threshold,omitempty"`
// Enable server side caching of search query results. By default, caching is disabled.
UseCache *bool `json:"use_cache,omitempty"`
}
Parameters for the multi search API.
type MultiSearchParams ¶ added in v0.4.0
type MultiSearchParams struct {
QueryByWeights *string `json:"query_by_weights,omitempty"`
FilterBy *string `json:"filter_by,omitempty"`
PerPage *int `json:"per_page,omitempty"`
GroupBy *string `json:"group_by,omitempty"`
DropTokensThreshold *int `json:"drop_tokens_threshold,omitempty"`
PrioritizeExactMatch *bool `json:"prioritize_exact_match,omitempty"`
CacheTtl *int `json:"cache_ttl,omitempty"`
ExhaustiveSearch *bool `json:"exhaustive_search,omitempty"`
Q *string `json:"q,omitempty"`
Infix *string `json:"infix,omitempty"`
FacetQuery *string `json:"facet_query,omitempty"`
ExcludeFields *string `json:"exclude_fields,omitempty"`
SnippetThreshold *int `json:"snippet_threshold,omitempty"`
PinnedHits *string `json:"pinned_hits,omitempty"`
PreSegmentedQuery *bool `json:"pre_segmented_query,omitempty"`
HighlightStartTag *string `json:"highlight_start_tag,omitempty"`
UseCache *bool `json:"use_cache,omitempty"`
HiddenHits *string `json:"hidden_hits,omitempty"`
MaxExtraSuffix *int `json:"max_extra_suffix,omitempty"`
SortBy *string `json:"sort_by,omitempty"`
MaxFacetValues *int `json:"max_facet_values,omitempty"`
Page *int `json:"page,omitempty"`
HighlightFullFields *string `json:"highlight_full_fields,omitempty"`
HighlightAffixNumTokens *int `json:"highlight_affix_num_tokens,omitempty"`
HighlightEndTag *string `json:"highlight_end_tag,omitempty"`
PrioritizeTokenPosition *bool `json:"prioritize_token_position,omitempty"`
MaxExtraPrefix *int `json:"max_extra_prefix,omitempty"`
NumTypos *int `json:"num_typos,omitempty"`
IncludeFields *string `json:"include_fields,omitempty"`
TypoTokensThreshold *int `json:"typo_tokens_threshold,omitempty"`
HighlightFields *string `json:"highlight_fields,omitempty"`
SplitJoinTokens *string `json:"split_join_tokens,omitempty"`
MaxCandidates *int `json:"max_candidates,omitempty"`
QueryBy *string `json:"query_by,omitempty"`
Prefix *string `json:"prefix,omitempty"`
EnableOverrides *bool `json:"enable_overrides,omitempty"`
SearchCutoffMs *int `json:"search_cutoff_ms,omitempty"`
MinLen1typo *int `json:"min_len_1typo,omitempty"`
FacetBy *string `json:"facet_by,omitempty"`
GroupLimit *int `json:"group_limit,omitempty"`
MinLen2typo *int `json:"min_len_2typo,omitempty"`
}
MultiSearchParams defines parameters for MultiSearch.
type MultiSearchResponse ¶ added in v0.4.0
type MultiSearchResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *MultiSearchResult
JSON400 *ApiResponse
}
func ParseMultiSearchResponse ¶ added in v0.4.0
func ParseMultiSearchResponse(rsp *http.Response) (*MultiSearchResponse, error)
ParseMultiSearchResponse parses an HTTP response from a MultiSearchWithResponse call
func (MultiSearchResponse) Status ¶ added in v0.4.0
func (r MultiSearchResponse) Status() string
Status returns HTTPResponse.Status
func (MultiSearchResponse) StatusCode ¶ added in v0.4.0
func (r MultiSearchResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type MultiSearchResult ¶ added in v0.4.0
type MultiSearchResult struct {
Results []SearchResult `json:"results"`
}
MultiSearchResult defines model for MultiSearchResult.
type MultiSearchSearchesParameter ¶ added in v0.4.0
type MultiSearchSearchesParameter struct {
Searches []MultiSearchCollectionParameters `json:"searches"`
}
MultiSearchSearchesParameter defines model for MultiSearchSearchesParameter.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type SearchCollectionParams ¶
type SearchCollectionParams struct {
GroupBy *string `json:"group_by,omitempty"`
DropTokensThreshold *int `json:"drop_tokens_threshold,omitempty"`
PrioritizeExactMatch *bool `json:"prioritize_exact_match,omitempty"`
CacheTtl *int `json:"cache_ttl,omitempty"`
QueryByWeights *string `json:"query_by_weights,omitempty"`
FilterBy *string `json:"filter_by,omitempty"`
PerPage *int `json:"per_page,omitempty"`
ExcludeFields *string `json:"exclude_fields,omitempty"`
SnippetThreshold *int `json:"snippet_threshold,omitempty"`
PinnedHits *string `json:"pinned_hits,omitempty"`
PreSegmentedQuery *bool `json:"pre_segmented_query,omitempty"`
ExhaustiveSearch *bool `json:"exhaustive_search,omitempty"`
Q string `json:"q"`
Infix *string `json:"infix,omitempty"`
FacetQuery *string `json:"facet_query,omitempty"`
HighlightStartTag *string `json:"highlight_start_tag,omitempty"`
UseCache *bool `json:"use_cache,omitempty"`
Page *int `json:"page,omitempty"`
HighlightFullFields *string `json:"highlight_full_fields,omitempty"`
HighlightAffixNumTokens *int `json:"highlight_affix_num_tokens,omitempty"`
HighlightEndTag *string `json:"highlight_end_tag,omitempty"`
HiddenHits *string `json:"hidden_hits,omitempty"`
MaxExtraSuffix *int `json:"max_extra_suffix,omitempty"`
SortBy *string `json:"sort_by,omitempty"`
MaxFacetValues *int `json:"max_facet_values,omitempty"`
TypoTokensThreshold *int `json:"typo_tokens_threshold,omitempty"`
HighlightFields *string `json:"highlight_fields,omitempty"`
SplitJoinTokens *string `json:"split_join_tokens,omitempty"`
MaxCandidates *int `json:"max_candidates,omitempty"`
PrioritizeTokenPosition *bool `json:"prioritize_token_position,omitempty"`
MaxExtraPrefix *int `json:"max_extra_prefix,omitempty"`
NumTypos *int `json:"num_typos,omitempty"`
IncludeFields *string `json:"include_fields,omitempty"`
SearchCutoffMs *int `json:"search_cutoff_ms,omitempty"`
MinLen1typo *int `json:"min_len_1typo,omitempty"`
QueryBy string `json:"query_by"`
Prefix *string `json:"prefix,omitempty"`
EnableOverrides *bool `json:"enable_overrides,omitempty"`
FacetBy *string `json:"facet_by,omitempty"`
GroupLimit *int `json:"group_limit,omitempty"`
MinLen2typo *int `json:"min_len_2typo,omitempty"`
}
SearchCollectionParams defines parameters for SearchCollection.
type SearchCollectionResponse ¶
type SearchCollectionResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *SearchResult
JSON400 *ApiResponse
JSON404 *ApiResponse
}
func ParseSearchCollectionResponse ¶
func ParseSearchCollectionResponse(rsp *http.Response) (*SearchCollectionResponse, error)
ParseSearchCollectionResponse parses an HTTP response from a SearchCollectionWithResponse call
func (SearchCollectionResponse) Status ¶
func (r SearchCollectionResponse) Status() string
Status returns HTTPResponse.Status
func (SearchCollectionResponse) StatusCode ¶
func (r SearchCollectionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type SearchGroupedHit ¶
type SearchGroupedHit struct {
GroupKey []string `json:"group_key"`
// The documents that matched the search query
Hits []SearchResultHit `json:"hits"`
}
SearchGroupedHit defines model for SearchGroupedHit.
type SearchHighlight ¶
type SearchHighlight struct {
Field *string `json:"field,omitempty"`
// The indices property will be present only for string[] fields and will contain the corresponding indices of the snippets in the search field
Indices *[]int `json:"indices,omitempty"`
MatchedTokens *[]interface{} `json:"matched_tokens,omitempty"`
// Present only for (non-array) string fields
Snippet *string `json:"snippet,omitempty"`
// Present only for (array) string[] fields
Snippets *[]string `json:"snippets,omitempty"`
}
SearchHighlight defines model for SearchHighlight.
type SearchOverride ¶
type SearchOverride struct {
// Embedded struct due to allOf(#/components/schemas/SearchOverrideSchema)
SearchOverrideSchema `yaml:",inline"`
// Embedded fields due to inline allOf schema
Id string `json:"id"`
}
SearchOverride defines model for SearchOverride.
type SearchOverrideExclude ¶
type SearchOverrideExclude struct {
// document id that should be excluded from the search results.
Id string `json:"id"`
}
SearchOverrideExclude defines model for SearchOverrideExclude.
type SearchOverrideInclude ¶
type SearchOverrideInclude struct {
// document id that should be included
Id string `json:"id"`
// position number where document should be included in the search results
Position int `json:"position"`
}
SearchOverrideInclude defines model for SearchOverrideInclude.
type SearchOverrideRule ¶
type SearchOverrideRule struct {
// Indicates whether the match on the query term should be `exact` or `contains`. If we want to match all queries that contained the word `apple`, we will use the `contains` match instead.
Match SearchOverrideRuleMatch `json:"match"`
// Indicates what search queries should be overridden
Query string `json:"query"`
}
SearchOverrideRule defines model for SearchOverrideRule.
type SearchOverrideRuleMatch ¶ added in v0.4.0
type SearchOverrideRuleMatch string
Indicates whether the match on the query term should be `exact` or `contains`. If we want to match all queries that contained the word `apple`, we will use the `contains` match instead.
const ( SearchOverrideRuleMatchContains SearchOverrideRuleMatch = "contains" SearchOverrideRuleMatchExact SearchOverrideRuleMatch = "exact" )
Defines values for SearchOverrideRuleMatch.
type SearchOverrideSchema ¶
type SearchOverrideSchema struct {
// List of document `id`s that should be excluded from the search results.
Excludes *[]SearchOverrideExclude `json:"excludes,omitempty"`
// A filter by clause that is applied to any search query that matches the override rule.
FilterBy *string `json:"filter_by,omitempty"`
// List of document `id`s that should be included in the search results with their corresponding `position`s.
Includes *[]SearchOverrideInclude `json:"includes,omitempty"`
// Indicates whether search query tokens that exist in the override's rule should be removed from the search query.
RemoveMatchedTokens *bool `json:"remove_matched_tokens,omitempty"`
Rule SearchOverrideRule `json:"rule"`
}
SearchOverrideSchema defines model for SearchOverrideSchema.
type SearchOverridesResponse ¶
type SearchOverridesResponse struct {
Overrides []*SearchOverride `json:"overrides"`
}
SearchOverridesResponse defines model for SearchOverridesResponse.
type SearchResult ¶
type SearchResult struct {
FacetCounts *[]FacetCounts `json:"facet_counts,omitempty"`
// The number of documents found
Found *int `json:"found,omitempty"`
GroupedHits *[]SearchGroupedHit `json:"grouped_hits,omitempty"`
// The documents that matched the search query
Hits *[]SearchResultHit `json:"hits,omitempty"`
// The total number of pages
OutOf *int `json:"out_of,omitempty"`
// The search result page number
Page *int `json:"page,omitempty"`
RequestParams *struct {
CollectionName string `json:"collection_name"`
PerPage int `json:"per_page"`
Q string `json:"q"`
} `json:"request_params,omitempty"`
// Whether the search was cut off
SearchCutoff *bool `json:"search_cutoff,omitempty"`
// The number of milliseconds the search took
SearchTimeMs *int `json:"search_time_ms,omitempty"`
}
SearchResult defines model for SearchResult.
type SearchResultHit ¶
type SearchResultHit struct {
// Can be any key-value pair
Document *map[string]interface{} `json:"document,omitempty"`
// Can be any key-value pair
GeoDistanceMeters *SearchResultHit_GeoDistanceMeters `json:"geo_distance_meters,omitempty"`
// Contains highlighted portions of the search fields
Highlights *[]SearchHighlight `json:"highlights,omitempty"`
TextMatch *int64 `json:"text_match,omitempty"`
}
SearchResultHit defines model for SearchResultHit.
type SearchResultHit_GeoDistanceMeters ¶ added in v0.4.0
Can be any key-value pair
func (SearchResultHit_GeoDistanceMeters) Get ¶ added in v0.4.0
func (a SearchResultHit_GeoDistanceMeters) Get(fieldName string) (value int, found bool)
Getter for additional properties for SearchResultHit_GeoDistanceMeters. Returns the specified element and whether it was found
func (SearchResultHit_GeoDistanceMeters) MarshalJSON ¶ added in v0.4.0
func (a SearchResultHit_GeoDistanceMeters) MarshalJSON() ([]byte, error)
Override default JSON handling for SearchResultHit_GeoDistanceMeters to handle AdditionalProperties
func (*SearchResultHit_GeoDistanceMeters) Set ¶ added in v0.4.0
func (a *SearchResultHit_GeoDistanceMeters) Set(fieldName string, value int)
Setter for additional properties for SearchResultHit_GeoDistanceMeters
func (*SearchResultHit_GeoDistanceMeters) UnmarshalJSON ¶ added in v0.4.0
func (a *SearchResultHit_GeoDistanceMeters) UnmarshalJSON(b []byte) error
Override default JSON handling for SearchResultHit_GeoDistanceMeters to handle AdditionalProperties
type SearchSynonym ¶ added in v0.2.0
type SearchSynonym struct {
// Embedded struct due to allOf(#/components/schemas/SearchSynonymSchema)
SearchSynonymSchema `yaml:",inline"`
// Embedded fields due to inline allOf schema
Id string `json:"id"`
}
SearchSynonym defines model for SearchSynonym.
type SearchSynonymSchema ¶ added in v0.2.0
type SearchSynonymSchema struct {
// For 1-way synonyms, indicates the root word that words in the `synonyms` parameter map to.
Root *string `json:"root,omitempty"`
// Array of words that should be considered as synonyms.
Synonyms []string `json:"synonyms"`
}
SearchSynonymSchema defines model for SearchSynonymSchema.
type SearchSynonymsResponse ¶ added in v0.2.0
type SearchSynonymsResponse struct {
Synonyms []*SearchSynonym `json:"synonyms"`
}
SearchSynonymsResponse defines model for SearchSynonymsResponse.
type SuccessStatus ¶ added in v0.2.0
type SuccessStatus struct {
Success bool `json:"success"`
}
SuccessStatus defines model for SuccessStatus.
type TakeSnapshotParams ¶ added in v0.2.0
type TakeSnapshotParams struct {
// The directory on the server where the snapshot should be saved.
SnapshotPath string `json:"snapshot_path"`
}
TakeSnapshotParams defines parameters for TakeSnapshot.
type TakeSnapshotResponse ¶ added in v0.2.0
type TakeSnapshotResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *SuccessStatus
}
func ParseTakeSnapshotResponse ¶ added in v0.2.0
func ParseTakeSnapshotResponse(rsp *http.Response) (*TakeSnapshotResponse, error)
ParseTakeSnapshotResponse parses an HTTP response from a TakeSnapshotWithResponse call
func (TakeSnapshotResponse) Status ¶ added in v0.2.0
func (r TakeSnapshotResponse) Status() string
Status returns HTTPResponse.Status
func (TakeSnapshotResponse) StatusCode ¶ added in v0.2.0
func (r TakeSnapshotResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UpdateCollectionJSONBody ¶ added in v0.5.0
type UpdateCollectionJSONBody CollectionUpdateSchema
UpdateCollectionJSONBody defines parameters for UpdateCollection.
type UpdateCollectionJSONRequestBody ¶ added in v0.5.0
type UpdateCollectionJSONRequestBody UpdateCollectionJSONBody
UpdateCollectionJSONRequestBody defines body for UpdateCollection for application/json ContentType.
type UpdateCollectionResponse ¶ added in v0.5.0
type UpdateCollectionResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *CollectionUpdateSchema
JSON400 *ApiResponse
JSON404 *ApiResponse
}
func ParseUpdateCollectionResponse ¶ added in v0.5.0
func ParseUpdateCollectionResponse(rsp *http.Response) (*UpdateCollectionResponse, error)
ParseUpdateCollectionResponse parses an HTTP response from a UpdateCollectionWithResponse call
func (UpdateCollectionResponse) Status ¶ added in v0.5.0
func (r UpdateCollectionResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateCollectionResponse) StatusCode ¶ added in v0.5.0
func (r UpdateCollectionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UpdateDocumentJSONBody ¶
type UpdateDocumentJSONBody interface{}
UpdateDocumentJSONBody defines parameters for UpdateDocument.
type UpdateDocumentJSONRequestBody ¶
type UpdateDocumentJSONRequestBody UpdateDocumentJSONBody
UpdateDocumentJSONRequestBody defines body for UpdateDocument for application/json ContentType.
type UpdateDocumentResponse ¶
type UpdateDocumentResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *map[string]interface{}
JSON404 *ApiResponse
}
func ParseUpdateDocumentResponse ¶
func ParseUpdateDocumentResponse(rsp *http.Response) (*UpdateDocumentResponse, error)
ParseUpdateDocumentResponse parses an HTTP response from a UpdateDocumentWithResponse call
func (UpdateDocumentResponse) Status ¶
func (r UpdateDocumentResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateDocumentResponse) StatusCode ¶
func (r UpdateDocumentResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UpsertAliasJSONBody ¶
type UpsertAliasJSONBody CollectionAliasSchema
UpsertAliasJSONBody defines parameters for UpsertAlias.
type UpsertAliasJSONRequestBody ¶
type UpsertAliasJSONRequestBody UpsertAliasJSONBody
UpsertAliasJSONRequestBody defines body for UpsertAlias for application/json ContentType.
type UpsertAliasResponse ¶
type UpsertAliasResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *CollectionAlias
JSON400 *ApiResponse
JSON404 *ApiResponse
}
func ParseUpsertAliasResponse ¶
func ParseUpsertAliasResponse(rsp *http.Response) (*UpsertAliasResponse, error)
ParseUpsertAliasResponse parses an HTTP response from a UpsertAliasWithResponse call
func (UpsertAliasResponse) Status ¶
func (r UpsertAliasResponse) Status() string
Status returns HTTPResponse.Status
func (UpsertAliasResponse) StatusCode ¶
func (r UpsertAliasResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UpsertSearchOverrideJSONBody ¶
type UpsertSearchOverrideJSONBody SearchOverrideSchema
UpsertSearchOverrideJSONBody defines parameters for UpsertSearchOverride.
type UpsertSearchOverrideJSONRequestBody ¶
type UpsertSearchOverrideJSONRequestBody UpsertSearchOverrideJSONBody
UpsertSearchOverrideJSONRequestBody defines body for UpsertSearchOverride for application/json ContentType.
type UpsertSearchOverrideResponse ¶
type UpsertSearchOverrideResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *SearchOverride
JSON404 *ApiResponse
}
func ParseUpsertSearchOverrideResponse ¶
func ParseUpsertSearchOverrideResponse(rsp *http.Response) (*UpsertSearchOverrideResponse, error)
ParseUpsertSearchOverrideResponse parses an HTTP response from a UpsertSearchOverrideWithResponse call
func (UpsertSearchOverrideResponse) Status ¶
func (r UpsertSearchOverrideResponse) Status() string
Status returns HTTPResponse.Status
func (UpsertSearchOverrideResponse) StatusCode ¶
func (r UpsertSearchOverrideResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UpsertSearchSynonymJSONBody ¶ added in v0.2.0
type UpsertSearchSynonymJSONBody SearchSynonymSchema
UpsertSearchSynonymJSONBody defines parameters for UpsertSearchSynonym.
type UpsertSearchSynonymJSONRequestBody ¶ added in v0.2.0
type UpsertSearchSynonymJSONRequestBody UpsertSearchSynonymJSONBody
UpsertSearchSynonymJSONRequestBody defines body for UpsertSearchSynonym for application/json ContentType.
type UpsertSearchSynonymResponse ¶ added in v0.2.0
type UpsertSearchSynonymResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *SearchSynonym
JSON404 *ApiResponse
}
func ParseUpsertSearchSynonymResponse ¶ added in v0.2.0
func ParseUpsertSearchSynonymResponse(rsp *http.Response) (*UpsertSearchSynonymResponse, error)
ParseUpsertSearchSynonymResponse parses an HTTP response from a UpsertSearchSynonymWithResponse call
func (UpsertSearchSynonymResponse) Status ¶ added in v0.2.0
func (r UpsertSearchSynonymResponse) Status() string
Status returns HTTPResponse.Status
func (UpsertSearchSynonymResponse) StatusCode ¶ added in v0.2.0
func (r UpsertSearchSynonymResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type VoteResponse ¶ added in v0.2.0
type VoteResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *SuccessStatus
}
func ParseVoteResponse ¶ added in v0.2.0
func ParseVoteResponse(rsp *http.Response) (*VoteResponse, error)
ParseVoteResponse parses an HTTP response from a VoteWithResponse call
func (VoteResponse) Status ¶ added in v0.2.0
func (r VoteResponse) Status() string
Status returns HTTPResponse.Status
func (VoteResponse) StatusCode ¶ added in v0.2.0
func (r VoteResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode