From d629b50f3a6703802ac33c1662021eaa4ab20262 Mon Sep 17 00:00:00 2001 From: Hayden Date: Sat, 25 Jan 2025 18:01:43 +0700 Subject: [PATCH 1/4] Pull latest oapi changes Fixes https://github.com/typesense/typesense-go/issues/147 Fix analytics tests in typesense v27.1 Test breaking changes: - Synonym, Override, Apikey delete endpoints now return only its id. - `SearchParameters` fields `Q` and `QueryBy` are now pointers --- typesense/api/client_gen.go | 12 +- typesense/api/generator/generator.yml | 282 ++++++++++++++--------- typesense/api/generator/openapi.yml | 283 ++++++++++++++---------- typesense/api/types_gen.go | 93 +++++++- typesense/key.go | 4 +- typesense/key_test.go | 6 +- typesense/multi_search_test.go | 4 +- typesense/override.go | 4 +- typesense/override_test.go | 6 +- typesense/preset_test.go | 3 +- typesense/presets_test.go | 5 +- typesense/synonym.go | 4 +- typesense/synonym_test.go | 6 +- typesense/test/analytics_events_test.go | 3 +- typesense/test/analytics_rule_test.go | 6 +- typesense/test/analytics_rules_test.go | 8 +- typesense/test/collections_test.go | 3 +- typesense/test/dbhelpers_test.go | 16 +- typesense/test/key_test.go | 2 +- typesense/test/override_test.go | 3 +- typesense/test/search_test.go | 4 +- typesense/test/synonym_test.go | 3 +- 22 files changed, 475 insertions(+), 285 deletions(-) diff --git a/typesense/api/client_gen.go b/typesense/api/client_gen.go index d6e94d1..87c75f0 100644 --- a/typesense/api/client_gen.go +++ b/typesense/api/client_gen.go @@ -6488,7 +6488,7 @@ func (r GetSearchOverridesResponse) StatusCode() int { type DeleteSearchOverrideResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SearchOverride + JSON200 *SearchOverrideDeleteResponse JSON404 *ApiResponse } @@ -6579,7 +6579,7 @@ func (r GetSearchSynonymsResponse) StatusCode() int { type DeleteSearchSynonymResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SearchSynonym + JSON200 *SearchSynonymDeleteResponse JSON404 *ApiResponse } @@ -6851,7 +6851,7 @@ func (r CreateKeyResponse) StatusCode() int { type DeleteKeyResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ApiKey + JSON200 *ApiKeyDeleteResponse JSON400 *ApiResponse JSON404 *ApiResponse } @@ -8675,7 +8675,7 @@ func ParseDeleteSearchOverrideResponse(rsp *http.Response) (*DeleteSearchOverrid switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SearchOverride + var dest SearchOverrideDeleteResponse if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -8800,7 +8800,7 @@ func ParseDeleteSearchSynonymResponse(rsp *http.Response) (*DeleteSearchSynonymR switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SearchSynonym + var dest SearchSynonymDeleteResponse if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -9156,7 +9156,7 @@ func ParseDeleteKeyResponse(rsp *http.Response) (*DeleteKeyResponse, error) { switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ApiKey + var dest ApiKeyDeleteResponse if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } diff --git a/typesense/api/generator/generator.yml b/typesense/api/generator/generator.yml index 4abad64..2ff123c 100644 --- a/typesense/api/generator/generator.yml +++ b/typesense/api/generator/generator.yml @@ -160,6 +160,15 @@ components: readOnly: true type: string type: object + ApiKeyDeleteResponse: + properties: + id: + description: The id of the API key that was deleted + format: int64 + type: integer + required: + - id + type: object ApiKeySchema: properties: actions: @@ -468,10 +477,16 @@ components: type: string client_secret: type: string + indexing_prefix: + type: string model_name: type: string project_id: type: string + query_prefix: + type: string + refresh_token: + type: string url: type: string required: @@ -809,11 +824,23 @@ components: $ref: '#/components/schemas/SearchResultConversation' results: items: - $ref: '#/components/schemas/SearchResult' + $ref: '#/components/schemas/MultiSearchResultItem' type: array required: - results type: object + MultiSearchResultItem: + allOf: + - $ref: '#/components/schemas/SearchResult' + - properties: + code: + description: HTTP error code + format: int64 + type: integer + error: + description: Error description + type: string + type: object MultiSearchSearchesParameter: properties: searches: @@ -932,6 +959,14 @@ components: required: - id type: object + SearchOverrideDeleteResponse: + properties: + id: + description: The id of the override that was deleted + type: string + required: + - id + type: object SearchOverrideExclude: properties: id: @@ -1291,9 +1326,6 @@ components: description: | The base64 encoded audio file in 16 khz 16-bit WAV format. type: string - required: - - q - - query_by type: object SearchResult: properties: @@ -1399,6 +1431,23 @@ components: text_match: format: int64 type: integer + text_match_info: + properties: + best_field_score: + type: string + best_field_weight: + type: integer + fields_matched: + type: integer + num_tokens_dropped: + type: integer + score: + type: string + tokens_matched: + type: integer + typo_prefix_score: + type: integer + type: object vector_distance: description: Distance between the query vector and matching document's vector value format: float @@ -1414,6 +1463,14 @@ components: required: - id type: object + SearchSynonymDeleteResponse: + properties: + id: + description: The id of the synonym that was deleted + type: string + required: + - id + type: object SearchSynonymSchema: properties: locale: @@ -1533,7 +1590,7 @@ paths: description: List all aliases and the corresponding collections that they map to. operationId: getAliases responses: - 200: + "200": content: application/json: schema: @@ -1553,13 +1610,13 @@ paths: schema: type: string responses: - 200: + "200": content: application/json: schema: $ref: '#/components/schemas/CollectionAlias' description: Collection alias was deleted - 404: + "404": content: application/json: schema: @@ -1579,13 +1636,13 @@ paths: schema: type: string responses: - 200: + "200": content: application/json: schema: $ref: '#/components/schemas/CollectionAlias' description: Collection alias fetched - 404: + "404": content: application/json: schema: @@ -1611,19 +1668,19 @@ paths: $ref: '#/components/schemas/CollectionAliasSchema' description: Collection alias to be created/updated responses: - 200: + "200": content: application/json: schema: $ref: '#/components/schemas/CollectionAlias' description: The collection alias was created/updated - 400: + "400": content: application/json: schema: $ref: '#/components/schemas/ApiResponse' description: Bad request, see error message for details - 404: + "404": content: application/json: schema: @@ -1644,13 +1701,13 @@ paths: description: The Analytics event to be created required: true responses: - 201: + "201": content: application/json: schema: $ref: '#/components/schemas/AnalyticsEventCreateResponse' description: Analytics event successfully created - 400: + "400": content: application/json: schema: @@ -1664,7 +1721,7 @@ paths: description: Retrieve the details of all analytics rules operationId: retrieveAnalyticsRules responses: - 200: + "200": content: application/json: schema: @@ -1684,13 +1741,13 @@ paths: description: The Analytics rule to be created required: true responses: - 201: + "201": content: application/json: schema: $ref: '#/components/schemas/AnalyticsRuleSchema' description: Analytics rule successfully created - 400: + "400": content: application/json: schema: @@ -1711,13 +1768,13 @@ paths: schema: type: string responses: - 200: + "200": content: application/json: schema: $ref: '#/components/schemas/AnalyticsRuleDeleteResponse' description: Analytics rule deleted - 404: + "404": content: application/json: schema: @@ -1737,13 +1794,13 @@ paths: schema: type: string responses: - 200: + "200": content: application/json: schema: $ref: '#/components/schemas/AnalyticsRuleSchema' description: Analytics rule fetched - 404: + "404": content: application/json: schema: @@ -1770,13 +1827,13 @@ paths: description: The Analytics rule to be upserted required: true responses: - 200: + "200": content: application/json: schema: $ref: '#/components/schemas/AnalyticsRuleSchema' description: Analytics rule successfully upserted - 400: + "400": content: application/json: schema: @@ -1790,7 +1847,7 @@ paths: description: Returns a summary of all your collections. The collections are returned sorted by creation date, with the most recent collections appearing first. operationId: getCollections responses: - 200: + "200": content: application/json: schema: @@ -1813,19 +1870,19 @@ paths: description: The collection object to be created required: true responses: - 201: + "201": content: application/json: schema: $ref: '#/components/schemas/CollectionResponse' description: Collection successfully created - 400: + "400": content: application/json: schema: $ref: '#/components/schemas/ApiResponse' description: Bad request, see error message for details - 409: + "409": content: application/json: schema: @@ -1846,13 +1903,13 @@ paths: schema: type: string responses: - 200: + "200": content: application/json: schema: $ref: '#/components/schemas/CollectionResponse' description: Collection deleted - 404: + "404": content: application/json: schema: @@ -1872,13 +1929,13 @@ paths: schema: type: string responses: - 200: + "200": content: application/json: schema: $ref: '#/components/schemas/CollectionResponse' description: Collection fetched - 404: + "404": content: application/json: schema: @@ -1905,19 +1962,19 @@ paths: description: The document object with fields to be updated required: true responses: - 200: + "200": content: application/json: schema: $ref: '#/components/schemas/CollectionUpdateSchema' description: The updated partial collection schema - 400: + "400": content: application/json: schema: $ref: '#/components/schemas/ApiResponse' description: Bad request, see error message for details - 404: + "404": content: application/json: schema: @@ -1950,7 +2007,7 @@ paths: schema: type: boolean responses: - 200: + "200": content: application/json: schema: @@ -1961,7 +2018,7 @@ paths: - num_deleted type: object description: Documents successfully deleted - 404: + "404": content: application/json: schema: @@ -2054,14 +2111,14 @@ paths: description: The document object to be indexed required: true responses: - 201: + "201": content: application/json: schema: description: Can be any key-value pair type: object description: Document successfully created/indexed - 404: + "404": content: application/json: schema: @@ -2088,14 +2145,14 @@ paths: schema: type: string responses: - 200: + "200": content: application/json: schema: description: Can be any key-value pair type: object description: The document referenced by the ID was deleted - 404: + "404": content: application/json: schema: @@ -2121,14 +2178,14 @@ paths: schema: type: string responses: - 200: + "200": content: application/json: schema: description: Can be any key-value pair type: object description: The document referenced by the ID - 404: + "404": content: application/json: schema: @@ -2168,14 +2225,14 @@ paths: description: The document object with fields to be updated required: true responses: - 200: + "200": content: application/json: schema: description: Can be any key-value pair type: object description: The document referenced by the ID was updated - 404: + "404": content: application/json: schema: @@ -2208,7 +2265,7 @@ paths: schema: type: string responses: - 200: + "200": content: application/octet-stream: schema: @@ -2218,7 +2275,7 @@ paths: {"id": "126", "company_name": "Random Corp.", "num_employees": 531,"country": "AU"} type: string description: Exports all the documents in a given collection. - 404: + "404": content: application/json: schema: @@ -2271,7 +2328,7 @@ paths: description: The json array of documents or the JSONL file to import required: true responses: - 200: + "200": content: application/octet-stream: schema: @@ -2280,13 +2337,13 @@ paths: {"success": false, "error": "Bad JSON.", "document": "[bad doc"} type: string description: Result of the import operation. Each line of the response indicates the result of each document present in the request body (in the same order). If the import of a single document fails, it does not affect the other documents. If there is a failure, the response line will include a corresponding error message and as well as the actual document content. - 400: + "400": content: application/json: schema: $ref: '#/components/schemas/ApiResponse' description: Bad request, see error message for details - 404: + "404": content: application/json: schema: @@ -2571,19 +2628,19 @@ paths: schema: type: string responses: - 200: + "200": content: application/json: schema: $ref: '#/components/schemas/SearchResult' description: Search results - 400: + "400": content: application/json: schema: $ref: '#/components/schemas/ApiResponse' description: Bad request, see error message for details - 404: + "404": content: application/json: schema: @@ -2603,7 +2660,7 @@ paths: schema: type: string responses: - 200: + "200": content: application/json: schema: @@ -2630,13 +2687,13 @@ paths: schema: type: string responses: - 200: + "200": content: application/json: schema: - $ref: '#/components/schemas/SearchOverride' + $ref: '#/components/schemas/SearchOverrideDeleteResponse' description: The ID of the deleted search override - 404: + "404": content: application/json: schema: @@ -2663,7 +2720,7 @@ paths: schema: type: string responses: - 200: + "200": content: application/json: schema: @@ -2697,13 +2754,13 @@ paths: description: The search override object to be created/updated required: true responses: - 200: + "200": content: application/json: schema: $ref: '#/components/schemas/SearchOverride' description: Created/updated search override - 404: + "404": content: application/json: schema: @@ -2724,13 +2781,13 @@ paths: schema: type: string responses: - 200: + "200": content: application/json: schema: $ref: '#/components/schemas/SearchSynonymsResponse' description: List of all search synonyms - 404: + "404": content: application/json: schema: @@ -2738,7 +2795,7 @@ paths: description: Search synonyms was not found summary: List all collection synonyms tags: - - documents + - synonyms /collections/{collectionName}/synonyms/{synonymId}: delete: operationId: deleteSearchSynonym @@ -2756,13 +2813,13 @@ paths: schema: type: string responses: - 200: + "200": content: application/json: schema: - $ref: '#/components/schemas/SearchSynonym' + $ref: '#/components/schemas/SearchSynonymDeleteResponse' description: The ID of the deleted search synonym - 404: + "404": content: application/json: schema: @@ -2770,7 +2827,7 @@ paths: description: Search synonym not found summary: Delete a synonym associated with a collection tags: - - documents + - synonyms get: description: Retrieve the details of a search synonym, given its id. operationId: getSearchSynonym @@ -2788,13 +2845,13 @@ paths: schema: type: string responses: - 200: + "200": content: application/json: schema: $ref: '#/components/schemas/SearchSynonym' description: Search synonym fetched - 404: + "404": content: application/json: schema: @@ -2802,7 +2859,7 @@ paths: description: Search synonym was not found summary: Retrieve a single search synonym tags: - - documents + - synonyms put: description: Create or update a synonym to define search terms that should be considered equivalent. operationId: upsertSearchSynonym @@ -2827,13 +2884,13 @@ paths: description: The search synonym object to be created/updated required: true responses: - 200: + "200": content: application/json: schema: $ref: '#/components/schemas/SearchSynonym' description: Created/updated search synonym - 404: + "404": content: application/json: schema: @@ -2841,13 +2898,13 @@ paths: description: Search synonym was not found summary: Create or update a synonym tags: - - documents + - synonyms /conversations/models: get: description: Retrieve all conversation models operationId: retrieveAllConversationModels responses: - 200: + "200": content: application/json: schema: @@ -2869,13 +2926,13 @@ paths: $ref: '#/components/schemas/ConversationModelCreateSchema' required: true responses: - 200: + "200": content: application/json: schema: $ref: '#/components/schemas/ConversationModelSchema' description: Created Conversation Model - 400: + "400": content: application/json: schema: @@ -2895,7 +2952,7 @@ paths: schema: type: string responses: - 200: + "200": content: application/json: schema: @@ -2915,7 +2972,7 @@ paths: schema: type: string responses: - 200: + "200": content: application/json: schema: @@ -2941,7 +2998,7 @@ paths: $ref: '#/components/schemas/ConversationModelUpdateSchema' required: true responses: - 200: + "200": content: application/json: schema: @@ -2955,7 +3012,7 @@ paths: description: Print debugging information operationId: debug responses: - 200: + "200": content: application/json: schema: @@ -2972,7 +3029,7 @@ paths: description: Checks if Typesense server is ready to accept requests. operationId: health responses: - 200: + "200": content: application/json: schema: @@ -2985,7 +3042,7 @@ paths: get: operationId: getKeys responses: - 200: + "200": content: application/json: schema: @@ -3004,19 +3061,19 @@ paths: $ref: '#/components/schemas/ApiKeySchema' description: The object that describes API key scope responses: - 201: + "201": content: application/json: schema: $ref: '#/components/schemas/ApiKey' description: Created API key - 400: + "400": content: application/json: schema: $ref: '#/components/schemas/ApiResponse' description: Bad request, see error message for details - 409: + "409": content: application/json: schema: @@ -3037,19 +3094,19 @@ paths: format: int64 type: integer responses: - 200: + "200": content: application/json: schema: - $ref: '#/components/schemas/ApiKey' + $ref: '#/components/schemas/ApiKeyDeleteResponse' description: The key referenced by the ID - 400: + "400": content: application/json: schema: $ref: '#/components/schemas/ApiResponse' description: Bad request, see error message for details - 404: + "404": content: application/json: schema: @@ -3070,13 +3127,13 @@ paths: format: int64 type: integer responses: - 200: + "200": content: application/json: schema: $ref: '#/components/schemas/ApiKey' description: The key referenced by the ID - 404: + "404": content: application/json: schema: @@ -3090,7 +3147,7 @@ paths: description: Retrieve the metrics. operationId: retrieveMetrics responses: - 200: + "200": content: application/json: schema: @@ -3374,13 +3431,13 @@ paths: schema: $ref: '#/components/schemas/MultiSearchSearchesParameter' responses: - 200: + "200": content: application/json: schema: $ref: '#/components/schemas/MultiSearchResult' description: Search results - 400: + "400": content: application/json: schema: @@ -3401,7 +3458,7 @@ paths: schema: type: string responses: - 201: + "201": content: application/json: schema: @@ -3415,7 +3472,7 @@ paths: description: Triggers a follower node to initiate the raft voting process, which triggers leader re-election. The follower node that you run this operation against will become the new leader, once this command succeeds. operationId: vote responses: - 200: + "200": content: application/json: schema: @@ -3429,7 +3486,7 @@ paths: description: Retrieve the details of all presets operationId: retrieveAllPresets responses: - 200: + "200": content: application/json: schema: @@ -3451,13 +3508,13 @@ paths: schema: type: string responses: - 200: + "200": content: application/json: schema: $ref: '#/components/schemas/PresetDeleteSchema' description: Preset deleted. - 404: + "404": content: application/json: schema: @@ -3478,13 +3535,13 @@ paths: schema: type: string responses: - 200: + "200": content: application/json: schema: $ref: '#/components/schemas/PresetSchema' description: Preset fetched. - 404: + "404": content: application/json: schema: @@ -3512,13 +3569,13 @@ paths: description: The stopwords set to upsert. required: true responses: - 200: + "200": content: application/json: schema: $ref: '#/components/schemas/PresetSchema' description: Preset successfully upserted. - 400: + "400": content: application/json: schema: @@ -3532,7 +3589,7 @@ paths: description: Retrieve the stats about API endpoints. operationId: retrieveAPIStats responses: - 200: + "200": content: application/json: schema: @@ -3546,7 +3603,7 @@ paths: description: Retrieve the details of all stopwords sets operationId: retrieveStopwordsSets responses: - 200: + "200": content: application/json: schema: @@ -3568,7 +3625,7 @@ paths: schema: type: string responses: - 200: + "200": content: application/json: schema: @@ -3581,7 +3638,7 @@ paths: - id type: object description: Stopwords set rule deleted. - 404: + "404": content: application/json: schema: @@ -3602,13 +3659,13 @@ paths: schema: type: string responses: - 200: + "200": content: application/json: schema: $ref: '#/components/schemas/StopwordsSetRetrieveSchema' description: Stopwords set fetched. - 404: + "404": content: application/json: schema: @@ -3636,13 +3693,13 @@ paths: description: The stopwords set to upsert. required: true responses: - 200: + "200": content: application/json: schema: $ref: '#/components/schemas/StopwordsSetSchema' description: Stopwords set successfully upserted. - 400: + "400": content: application/json: schema: @@ -3701,3 +3758,8 @@ tags: description: Find out more url: https://typesense.org/docs/27.0/api/conversational-search-rag.html name: conversations + - description: Manage synonyms + externalDocs: + description: Find out more + url: https://typesense.org/docs/27.0/api/synonyms.html + name: synonyms diff --git a/typesense/api/generator/openapi.yml b/typesense/api/generator/openapi.yml index 65b0702..008c3e3 100644 --- a/typesense/api/generator/openapi.yml +++ b/typesense/api/generator/openapi.yml @@ -56,6 +56,11 @@ tags: externalDocs: description: Find out more url: https://typesense.org/docs/27.0/api/conversational-search-rag.html + - name: synonyms + description: Manage synonyms + externalDocs: + description: Find out more + url: https://typesense.org/docs/27.0/api/synonyms.html paths: /collections: get: @@ -68,7 +73,7 @@ paths: first. operationId: getCollections responses: - 200: + '200': description: List of all collections content: application/json: @@ -93,19 +98,19 @@ paths: $ref: "#/components/schemas/CollectionSchema" required: true responses: - 201: + '201': description: Collection successfully created content: application/json: schema: $ref: "#/components/schemas/CollectionResponse" - 400: + '400': description: Bad request, see error message for details content: application/json: schema: $ref: "#/components/schemas/ApiResponse" - 409: + '409': description: Collection already exists content: application/json: @@ -126,13 +131,13 @@ paths: schema: type: string responses: - 200: + '200': description: Collection fetched content: application/json: schema: $ref: "#/components/schemas/CollectionResponse" - 404: + '404': description: Collection not found content: application/json: @@ -160,19 +165,19 @@ paths: $ref: "#/components/schemas/CollectionUpdateSchema" required: true responses: - 200: + '200': description: The updated partial collection schema content: application/json: schema: $ref: "#/components/schemas/CollectionUpdateSchema" - 400: + '400': description: Bad request, see error message for details content: application/json: schema: $ref: "#/components/schemas/ApiResponse" - 404: + '404': description: The collection was not found content: application/json: @@ -194,13 +199,13 @@ paths: schema: type: string responses: - 200: + '200': description: Collection deleted content: application/json: schema: $ref: "#/components/schemas/CollectionResponse" - 404: + '404': description: Collection not found content: application/json: @@ -244,14 +249,14 @@ paths: x-go-type: "interface{}" required: true responses: - 201: + '201': description: Document successfully created/indexed content: application/json: schema: type: object description: Can be any key-value pair - 404: + '404': description: Collection not found content: application/json: @@ -353,7 +358,7 @@ paths: ignore_not_found: type: boolean responses: - 200: + '200': description: Documents successfully deleted content: application/json: @@ -364,7 +369,7 @@ paths: properties: num_deleted: type: integer - 404: + '404': description: Collection not found content: application/json: @@ -390,19 +395,19 @@ paths: schema: $ref: "#/components/schemas/SearchParameters" responses: - 200: + '200': description: Search results content: application/json: schema: $ref: "#/components/schemas/SearchResult" - 400: + '400': description: Bad request, see error message for details content: application/json: schema: $ref: "#/components/schemas/ApiResponse" - 404: + '404': description: The collection or field was not found content: application/json: @@ -423,7 +428,7 @@ paths: schema: type: string responses: - 200: + '200': description: List of all search overrides content: application/json: @@ -451,7 +456,7 @@ paths: schema: type: string responses: - 200: + '200': description: Search override fetched content: application/json: @@ -487,13 +492,13 @@ paths: $ref: "#/components/schemas/SearchOverrideSchema" required: true responses: - 200: + '200': description: Created/updated search override content: application/json: schema: $ref: "#/components/schemas/SearchOverride" - 404: + '404': description: Search override not found content: application/json: @@ -519,13 +524,13 @@ paths: schema: type: string responses: - 200: + '200': description: The ID of the deleted search override content: application/json: schema: - $ref: "#/components/schemas/SearchOverride" - 404: + $ref: "#/components/schemas/SearchOverrideDeleteResponse" + '404': description: Search override not found content: application/json: @@ -534,7 +539,7 @@ paths: /collections/{collectionName}/synonyms: get: tags: - - documents + - synonyms summary: List all collection synonyms operationId: getSearchSynonyms parameters: @@ -545,13 +550,13 @@ paths: schema: type: string responses: - 200: + '200': description: List of all search synonyms content: application/json: schema: $ref: "#/components/schemas/SearchSynonymsResponse" - 404: + '404': description: Search synonyms was not found content: application/json: @@ -560,7 +565,7 @@ paths: /collections/{collectionName}/synonyms/{synonymId}: get: tags: - - documents + - synonyms summary: Retrieve a single search synonym description: Retrieve the details of a search synonym, given its id. operationId: getSearchSynonym @@ -578,13 +583,13 @@ paths: schema: type: string responses: - 200: + '200': description: Search synonym fetched content: application/json: schema: $ref: "#/components/schemas/SearchSynonym" - 404: + '404': description: Search synonym was not found content: application/json: @@ -592,7 +597,7 @@ paths: $ref: "#/components/schemas/ApiResponse" put: tags: - - documents + - synonyms summary: Create or update a synonym description: Create or update a synonym to define search terms that should be considered equivalent. operationId: upsertSearchSynonym @@ -617,13 +622,13 @@ paths: $ref: "#/components/schemas/SearchSynonymSchema" required: true responses: - 200: + '200': description: Created/updated search synonym content: application/json: schema: $ref: "#/components/schemas/SearchSynonym" - 404: + '404': description: Search synonym was not found content: application/json: @@ -631,7 +636,7 @@ paths: $ref: "#/components/schemas/ApiResponse" delete: tags: - - documents + - synonyms summary: Delete a synonym associated with a collection operationId: deleteSearchSynonym parameters: @@ -648,13 +653,13 @@ paths: schema: type: string responses: - 200: + '200': description: The ID of the deleted search synonym content: application/json: schema: - $ref: "#/components/schemas/SearchSynonym" - 404: + $ref: "#/components/schemas/SearchSynonymDeleteResponse" + '404': description: Search synonym not found content: application/json: @@ -693,7 +698,7 @@ paths: type: string responses: - 200: + '200': description: Exports all the documents in a given collection. content: application/octet-stream: @@ -703,7 +708,7 @@ paths: {"id": "124", "company_name": "Stark Industries", "num_employees": 5215, "country": "US"} {"id": "125", "company_name": "Future Technology", "num_employees": 1232,"country": "UK"} {"id": "126", "company_name": "Random Corp.", "num_employees": 531,"country": "AU"} - 404: + '404': description: The collection was not found content: application/json: @@ -757,7 +762,7 @@ paths: description: The JSONL file to import required: true responses: - 200: + '200': description: Result of the import operation. Each line of the response indicates the result of each document present in the request body (in the same order). If the import @@ -771,13 +776,13 @@ paths: example: | {"success": true} {"success": false, "error": "Bad JSON.", "document": "[bad doc"} - 400: + '400': description: Bad request, see error message for details content: application/json: schema: $ref: "#/components/schemas/ApiResponse" - 404: + '404': description: The collection was not found content: application/json: @@ -804,14 +809,14 @@ paths: schema: type: string responses: - 200: + '200': description: The document referenced by the ID content: application/json: schema: type: object description: Can be any key-value pair - 404: + '404': description: The document or collection was not found content: application/json: @@ -853,14 +858,14 @@ paths: x-go-type: "interface{}" required: true responses: - 200: + '200': description: The document referenced by the ID was updated content: application/json: schema: type: object description: Can be any key-value pair - 404: + '404': description: The document or collection was not found content: application/json: @@ -886,14 +891,14 @@ paths: schema: type: string responses: - 200: + '200': description: The document referenced by the ID was deleted content: application/json: schema: type: object description: Can be any key-value pair - 404: + '404': description: The document or collection was not found content: application/json: @@ -904,7 +909,7 @@ paths: description: Retrieve all conversation models operationId: retrieveAllConversationModels responses: - 200: + '200': content: application/json: schema: @@ -926,13 +931,13 @@ paths: $ref: '#/components/schemas/ConversationModelCreateSchema' required: true responses: - 200: + '200': content: application/json: schema: $ref: '#/components/schemas/ConversationModelSchema' description: Created Conversation Model - 400: + '400': content: application/json: schema: @@ -952,7 +957,7 @@ paths: schema: type: string responses: - 200: + '200': content: application/json: schema: @@ -978,7 +983,7 @@ paths: schema: type: string responses: - 200: + '200': content: application/json: schema: @@ -998,7 +1003,7 @@ paths: schema: type: string responses: - 200: + '200': content: application/json: schema: @@ -1014,7 +1019,7 @@ paths: summary: Retrieve (metadata about) all keys. operationId: getKeys responses: - 200: + '200': description: List of all keys content: application/json: @@ -1037,19 +1042,19 @@ paths: schema: $ref: "#/components/schemas/ApiKeySchema" responses: - 201: + '201': description: Created API key content: application/json: schema: $ref: "#/components/schemas/ApiKey" - 400: + '400': description: Bad request, see error message for details content: application/json: schema: $ref: "#/components/schemas/ApiResponse" - 409: + '409': description: API key generation conflict content: application/json: @@ -1074,13 +1079,13 @@ paths: type: integer format: int64 responses: - 200: + '200': description: The key referenced by the ID content: application/json: schema: $ref: "#/components/schemas/ApiKey" - 404: + '404': description: The key was not found content: application/json: @@ -1100,19 +1105,19 @@ paths: type: integer format: int64 responses: - 200: + '200': description: The key referenced by the ID content: application/json: schema: - $ref: "#/components/schemas/ApiKey" - 400: + $ref: "#/components/schemas/ApiKeyDeleteResponse" + '400': description: Bad request, see error message for details content: application/json: schema: $ref: "#/components/schemas/ApiResponse" - 404: + '404': description: Key not found content: application/json: @@ -1126,7 +1131,7 @@ paths: description: List all aliases and the corresponding collections that they map to. operationId: getAliases responses: - 200: + '200': description: List of all collection aliases content: application/json: @@ -1158,19 +1163,19 @@ paths: schema: $ref: "#/components/schemas/CollectionAliasSchema" responses: - 200: + '200': description: The collection alias was created/updated content: application/json: schema: $ref: "#/components/schemas/CollectionAlias" - 400: + '400': description: Bad request, see error message for details content: application/json: schema: $ref: "#/components/schemas/ApiResponse" - 404: + '404': description: Alias not found content: application/json: @@ -1190,13 +1195,13 @@ paths: schema: type: string responses: - 200: + '200': description: Collection alias fetched content: application/json: schema: $ref: "#/components/schemas/CollectionAlias" - 404: + '404': description: The alias was not found content: application/json: @@ -1215,13 +1220,13 @@ paths: schema: type: string responses: - 200: + '200': description: Collection alias was deleted content: application/json: schema: $ref: "#/components/schemas/CollectionAlias" - 404: + '404': description: Alias not found content: application/json: @@ -1235,7 +1240,7 @@ paths: description: Print debugging information operationId: debug responses: - 200: + '200': description: Debugging information content: application/json: @@ -1252,7 +1257,7 @@ paths: description: Checks if Typesense server is ready to accept requests. operationId: health responses: - 200: + '200': description: Search service is ready for requests. content: application/json: @@ -1276,7 +1281,7 @@ paths: schema: type: string responses: - 201: + '201': description: Snapshot is created. content: application/json: @@ -1293,7 +1298,7 @@ paths: once this command succeeds. operationId: vote responses: - 200: + '200': description: Re-election is performed. content: application/json: @@ -1320,13 +1325,13 @@ paths: schema: $ref: "#/components/schemas/MultiSearchSearchesParameter" responses: - 200: + '200': description: Search results content: application/json: schema: $ref: "#/components/schemas/MultiSearchResult" - 400: + '400': description: Bad request, see error message for details content: application/json: @@ -1347,13 +1352,13 @@ paths: $ref: '#/components/schemas/AnalyticsEventCreateSchema' required: true responses: - 201: + '201': description: Analytics event successfully created content: application/json: schema: $ref: '#/components/schemas/AnalyticsEventCreateResponse' - 400: + '400': description: Bad request, see error message for details content: application/json: @@ -1375,13 +1380,13 @@ paths: $ref: "#/components/schemas/AnalyticsRuleSchema" required: true responses: - 201: + '201': description: Analytics rule successfully created content: application/json: schema: $ref: "#/components/schemas/AnalyticsRuleSchema" - 400: + '400': description: Bad request, see error message for details content: application/json: @@ -1395,7 +1400,7 @@ paths: Retrieve the details of all analytics rules operationId: retrieveAnalyticsRules responses: - 200: + '200': description: Analytics rules fetched content: application/json: @@ -1424,13 +1429,13 @@ paths: $ref: "#/components/schemas/AnalyticsRuleUpsertSchema" required: true responses: - 200: + '200': description: Analytics rule successfully upserted content: application/json: schema: $ref: "#/components/schemas/AnalyticsRuleSchema" - 400: + '400': description: Bad request, see error message for details content: application/json: @@ -1451,13 +1456,13 @@ paths: type: string required: true responses: - 200: + '200': description: Analytics rule fetched content: application/json: schema: $ref: "#/components/schemas/AnalyticsRuleSchema" - 404: + '404': description: Analytics rule not found content: application/json: @@ -1478,13 +1483,13 @@ paths: type: string required: true responses: - 200: + '200': description: Analytics rule deleted content: application/json: schema: $ref: "#/components/schemas/AnalyticsRuleDeleteResponse" - 404: + '404': description: Analytics rule not found content: application/json: @@ -1499,7 +1504,7 @@ paths: Retrieve the metrics. operationId: retrieveMetrics responses: - 200: + '200': description: Metrics fetched. content: application/json: @@ -1514,7 +1519,7 @@ paths: Retrieve the stats about API endpoints. operationId: retrieveAPIStats responses: - 200: + '200': description: Stats fetched. content: application/json: @@ -1529,7 +1534,7 @@ paths: Retrieve the details of all stopwords sets operationId: retrieveStopwordsSets responses: - 200: + '200': description: Stopwords sets fetched. content: application/json: @@ -1559,13 +1564,13 @@ paths: $ref: "#/components/schemas/StopwordsSetUpsertSchema" required: true responses: - 200: + '200': description: Stopwords set successfully upserted. content: application/json: schema: $ref: "#/components/schemas/StopwordsSetSchema" - 400: + '400': description: Bad request, see error message for details. content: application/json: @@ -1587,13 +1592,13 @@ paths: required: true example: countries responses: - 200: + '200': description: Stopwords set fetched. content: application/json: schema: $ref: "#/components/schemas/StopwordsSetRetrieveSchema" - 404: + '404': description: Stopwords set not found. content: application/json: @@ -1615,7 +1620,7 @@ paths: required: true example: countries responses: - 200: + '200': description: Stopwords set rule deleted. content: application/json: @@ -1628,7 +1633,7 @@ paths: - id example: | {"id": "countries"} - 404: + '404': description: Stopwords set not found. content: application/json: @@ -1642,7 +1647,7 @@ paths: description: Retrieve the details of all presets operationId: retrieveAllPresets responses: - 200: + '200': description: Presets fetched. content: application/json: @@ -1664,13 +1669,13 @@ paths: required: true example: listing_view responses: - 200: + '200': description: Preset fetched. content: application/json: schema: $ref: '#/components/schemas/PresetSchema' - 404: + '404': description: Preset not found. content: application/json: @@ -1698,13 +1703,13 @@ paths: $ref: '#/components/schemas/PresetUpsertSchema' required: true responses: - 200: + '200': description: Preset successfully upserted. content: application/json: schema: $ref: '#/components/schemas/PresetSchema' - 400: + '400': description: Bad request, see error message for details. content: application/json: @@ -1725,13 +1730,13 @@ paths: required: true example: listing_view responses: - 200: + '200': description: Preset deleted. content: application/json: schema: $ref: '#/components/schemas/PresetDeleteSchema' - 404: + '404': description: Preset not found. content: application/json: @@ -1924,12 +1929,18 @@ components: type: string access_token: type: string + refresh_token: + type: string client_id: type: string client_secret: type: string project_id: type: string + indexing_prefix: + type: string + query_prefix: + type: string VoiceQueryModelCollectionConfig: type: object description: > @@ -2076,6 +2087,23 @@ components: text_match: type: integer format: int64 + text_match_info: + type: object + properties: + best_field_score: + type: string + best_field_weight: + type: integer + fields_matched: + type: integer + num_tokens_dropped: + type: integer + score: + type: string + tokens_matched: + type: integer + typo_prefix_score: + type: integer geo_distance_meters: type: object description: Can be any key-value pair @@ -2207,6 +2235,14 @@ components: id: type: string readOnly: true + SearchOverrideDeleteResponse: + type: object + required: + - id + properties: + id: + type: string + description: The id of the override that was deleted SearchOverrideRule: type: object properties: @@ -2292,6 +2328,14 @@ components: id: type: string readOnly: true + SearchSynonymDeleteResponse: + type: object + required: + - id + properties: + id: + type: string + description: The id of the synonym that was deleted SearchSynonymsResponse: type: object required: @@ -2357,6 +2401,15 @@ components: value_prefix: type: string readOnly: true + ApiKeyDeleteResponse: + type: object + required: + - id + properties: + id: + type: integer + format: int64 + description: The id of the API key that was deleted ApiKeysResponse: type: object required: @@ -2393,15 +2446,23 @@ components: results: type: array items: - $ref: "#/components/schemas/SearchResult" + $ref: "#/components/schemas/MultiSearchResultItem" conversation: $ref: "#/components/schemas/SearchResultConversation" + MultiSearchResultItem: + allOf: + - $ref: "#/components/schemas/SearchResult" + - type: object + properties: + code: + type: integer + description: HTTP error code + format: int64 + error: + type: string + description: Error description SearchParameters: type: object - required: - - q - - query_by - properties: q: description: The query text to search for in the collection. diff --git a/typesense/api/types_gen.go b/typesense/api/types_gen.go index 5993c83..a190615 100644 --- a/typesense/api/types_gen.go +++ b/typesense/api/types_gen.go @@ -149,6 +149,12 @@ type ApiKey struct { ValuePrefix *string `json:"value_prefix,omitempty"` } +// ApiKeyDeleteResponse defines model for ApiKeyDeleteResponse. +type ApiKeyDeleteResponse struct { + // Id The id of the API key that was deleted + Id int64 `json:"id"` +} + // ApiKeySchema defines model for ApiKeySchema. type ApiKeySchema struct { Actions []string `json:"actions"` @@ -368,13 +374,16 @@ type Field struct { Embed *struct { From []string `json:"from"` ModelConfig struct { - AccessToken *string `json:"access_token,omitempty"` - ApiKey *string `json:"api_key,omitempty"` - ClientId *string `json:"client_id,omitempty"` - ClientSecret *string `json:"client_secret,omitempty"` - ModelName string `json:"model_name"` - ProjectId *string `json:"project_id,omitempty"` - Url *string `json:"url,omitempty"` + AccessToken *string `json:"access_token,omitempty"` + ApiKey *string `json:"api_key,omitempty"` + ClientId *string `json:"client_id,omitempty"` + ClientSecret *string `json:"client_secret,omitempty"` + IndexingPrefix *string `json:"indexing_prefix,omitempty"` + ModelName string `json:"model_name"` + ProjectId *string `json:"project_id,omitempty"` + QueryPrefix *string `json:"query_prefix,omitempty"` + RefreshToken *string `json:"refresh_token,omitempty"` + Url *string `json:"url,omitempty"` } `json:"model_config"` } `json:"embed,omitempty"` Facet *bool `json:"facet,omitempty"` @@ -807,7 +816,46 @@ type MultiSearchParameters struct { // MultiSearchResult defines model for MultiSearchResult. type MultiSearchResult struct { Conversation *SearchResultConversation `json:"conversation,omitempty"` - Results []SearchResult `json:"results"` + Results []MultiSearchResultItem `json:"results"` +} + +// MultiSearchResultItem defines model for MultiSearchResultItem. +type MultiSearchResultItem struct { + // Code HTTP error code + Code *int64 `json:"code,omitempty"` + Conversation *SearchResultConversation `json:"conversation,omitempty"` + + // Error Error description + Error *string `json:"error,omitempty"` + FacetCounts *[]FacetCounts `json:"facet_counts,omitempty"` + + // Found The number of documents found + Found *int `json:"found,omitempty"` + FoundDocs *int `json:"found_docs,omitempty"` + GroupedHits *[]SearchGroupedHit `json:"grouped_hits,omitempty"` + + // Hits The documents that matched the search query + Hits *[]SearchResultHit `json:"hits,omitempty"` + + // OutOf The total number of documents in the collection + OutOf *int `json:"out_of,omitempty"` + + // Page 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"` + VoiceQuery *struct { + TranscribedQuery *string `json:"transcribed_query,omitempty"` + } `json:"voice_query,omitempty"` + } `json:"request_params,omitempty"` + + // SearchCutoff Whether the search was cut off + SearchCutoff *bool `json:"search_cutoff,omitempty"` + + // SearchTimeMs The number of milliseconds the search took + SearchTimeMs *int `json:"search_time_ms,omitempty"` } // MultiSearchSearchesParameter defines model for MultiSearchSearchesParameter. @@ -914,6 +962,12 @@ type SearchOverride struct { StopProcessing *bool `json:"stop_processing,omitempty"` } +// SearchOverrideDeleteResponse defines model for SearchOverrideDeleteResponse. +type SearchOverrideDeleteResponse struct { + // Id The id of the override that was deleted + Id string `json:"id"` +} + // SearchOverrideExclude defines model for SearchOverrideExclude. type SearchOverrideExclude struct { // Id document id that should be excluded from the search results. @@ -1142,10 +1196,10 @@ type SearchParameters struct { PrioritizeTokenPosition *bool `json:"prioritize_token_position,omitempty"` // Q 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"` + Q *string `json:"q,omitempty"` // QueryBy A list of `string` fields that should be queried against. Multiple fields are separated with a comma. - QueryBy string `json:"query_by"` + QueryBy *string `json:"query_by,omitempty"` // QueryByWeights 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"` @@ -1247,8 +1301,17 @@ type SearchResultHit struct { Highlight *map[string]interface{} `json:"highlight,omitempty"` // Highlights (Deprecated) Contains highlighted portions of the search fields - Highlights *[]SearchHighlight `json:"highlights,omitempty"` - TextMatch *int64 `json:"text_match,omitempty"` + Highlights *[]SearchHighlight `json:"highlights,omitempty"` + TextMatch *int64 `json:"text_match,omitempty"` + TextMatchInfo *struct { + BestFieldScore *string `json:"best_field_score,omitempty"` + BestFieldWeight *int `json:"best_field_weight,omitempty"` + FieldsMatched *int `json:"fields_matched,omitempty"` + NumTokensDropped *int `json:"num_tokens_dropped,omitempty"` + Score *string `json:"score,omitempty"` + TokensMatched *int `json:"tokens_matched,omitempty"` + TypoPrefixScore *int `json:"typo_prefix_score,omitempty"` + } `json:"text_match_info,omitempty"` // VectorDistance Distance between the query vector and matching document's vector value VectorDistance *float32 `json:"vector_distance,omitempty"` @@ -1271,6 +1334,12 @@ type SearchSynonym struct { Synonyms []string `json:"synonyms"` } +// SearchSynonymDeleteResponse defines model for SearchSynonymDeleteResponse. +type SearchSynonymDeleteResponse struct { + // Id The id of the synonym that was deleted + Id string `json:"id"` +} + // SearchSynonymSchema defines model for SearchSynonymSchema. type SearchSynonymSchema struct { // Locale Locale for the synonym, leave blank to use the standard tokenizer. diff --git a/typesense/key.go b/typesense/key.go index f1037db..0c8a888 100644 --- a/typesense/key.go +++ b/typesense/key.go @@ -8,7 +8,7 @@ import ( type KeyInterface interface { Retrieve(ctx context.Context) (*api.ApiKey, error) - Delete(ctx context.Context) (*api.ApiKey, error) + Delete(ctx context.Context) (*api.ApiKeyDeleteResponse, error) } type key struct { @@ -27,7 +27,7 @@ func (k *key) Retrieve(ctx context.Context) (*api.ApiKey, error) { return response.JSON200, nil } -func (k *key) Delete(ctx context.Context) (*api.ApiKey, error) { +func (k *key) Delete(ctx context.Context) (*api.ApiKeyDeleteResponse, error) { response, err := k.apiClient.DeleteKeyWithResponse(ctx, k.keyID) if err != nil { return nil, err diff --git a/typesense/key_test.go b/typesense/key_test.go index 8d369ec..1426364 100644 --- a/typesense/key_test.go +++ b/typesense/key_test.go @@ -6,8 +6,6 @@ import ( "net/http" "testing" - "github.com/typesense/typesense-go/v2/typesense/api/pointer" - "github.com/stretchr/testify/assert" "github.com/typesense/typesense-go/v2/typesense/api" "github.com/typesense/typesense-go/v2/typesense/mocks" @@ -74,12 +72,12 @@ func TestKeyRetrieveOnHttpStatusErrorCodeReturnsError(t *testing.T) { } func TestKeyDelete(t *testing.T) { - expectedResult := &api.ApiKey{Id: pointer.Int64(1)} + expectedResult := &api.ApiKeyDeleteResponse{Id: 1} ctrl := gomock.NewController(t) defer ctrl.Finish() mockAPIClient := mocks.NewMockAPIClientInterface(ctrl) - mockedResult := &api.ApiKey{Id: pointer.Int64(1)} + mockedResult := &api.ApiKeyDeleteResponse{Id: 1} mockAPIClient.EXPECT(). DeleteKeyWithResponse(gomock.Not(gomock.Nil()), int64(1)). diff --git a/typesense/multi_search_test.go b/typesense/multi_search_test.go index 08a7afc..e861e64 100644 --- a/typesense/multi_search_test.go +++ b/typesense/multi_search_test.go @@ -54,7 +54,7 @@ func newMultiSearchBodyParams() api.MultiSearchSearchesParameter { func newMultiSearchResult() *api.MultiSearchResult { return &api.MultiSearchResult{ - Results: []api.SearchResult{ + Results: []api.MultiSearchResultItem{ { Found: pointer.Int(1), SearchTimeMs: pointer.Int(1), @@ -153,7 +153,7 @@ func TestMultiSearchResultDeserialization(t *testing.T) { ] }` expected := &api.MultiSearchResult{ - Results: []api.SearchResult{ + Results: []api.MultiSearchResultItem{ { Found: pointer.Int(1), SearchTimeMs: pointer.Int(1), diff --git a/typesense/override.go b/typesense/override.go index a44d8d6..80000f5 100644 --- a/typesense/override.go +++ b/typesense/override.go @@ -9,7 +9,7 @@ import ( // OverrideInterface is a type for Search Override API operations type OverrideInterface interface { Retrieve(ctx context.Context) (*api.SearchOverride, error) - Delete(ctx context.Context) (*api.SearchOverride, error) + Delete(ctx context.Context) (*api.SearchOverrideDeleteResponse, error) } // override is internal implementation of OverrideInterface @@ -31,7 +31,7 @@ func (o *override) Retrieve(ctx context.Context) (*api.SearchOverride, error) { return response.JSON200, nil } -func (o *override) Delete(ctx context.Context) (*api.SearchOverride, error) { +func (o *override) Delete(ctx context.Context) (*api.SearchOverrideDeleteResponse, error) { response, err := o.apiClient.DeleteSearchOverrideWithResponse(ctx, o.collectionName, o.overrideID) if err != nil { diff --git a/typesense/override_test.go b/typesense/override_test.go index fc3b7c0..f231134 100644 --- a/typesense/override_test.go +++ b/typesense/override_test.go @@ -6,8 +6,6 @@ import ( "net/http" "testing" - "github.com/typesense/typesense-go/v2/typesense/api/pointer" - "github.com/stretchr/testify/assert" "github.com/typesense/typesense-go/v2/typesense/api" "github.com/typesense/typesense-go/v2/typesense/mocks" @@ -74,12 +72,12 @@ func TestSearchOverrideRetrieveOnHttpStatusErrorCodeReturnsError(t *testing.T) { } func TestSearchOverrideDelete(t *testing.T) { - expectedResult := &api.SearchOverride{Id: pointer.String("customize-apple")} + expectedResult := &api.SearchOverrideDeleteResponse{Id: "customize-apple"} ctrl := gomock.NewController(t) defer ctrl.Finish() mockAPIClient := mocks.NewMockAPIClientInterface(ctrl) - mockedResult := &api.SearchOverride{Id: pointer.String("customize-apple")} + mockedResult := &api.SearchOverrideDeleteResponse{Id: "customize-apple"} mockAPIClient.EXPECT(). DeleteSearchOverrideWithResponse(gomock.Not(gomock.Nil()), "companies", "customize-apple"). diff --git a/typesense/preset_test.go b/typesense/preset_test.go index 7eb3757..de7343e 100644 --- a/typesense/preset_test.go +++ b/typesense/preset_test.go @@ -7,13 +7,14 @@ import ( "github.com/stretchr/testify/assert" "github.com/typesense/typesense-go/v2/typesense/api" + "github.com/typesense/typesense-go/v2/typesense/api/pointer" ) func TestPresetRetrieveAsSearchParameters(t *testing.T) { expectedData := &api.PresetSchema{ Name: "test", } - presetValue := api.SearchParameters{Q: "Hello"} + presetValue := api.SearchParameters{Q: pointer.Any("Hello")} expectedData.Value.FromSearchParameters(presetValue) diff --git a/typesense/presets_test.go b/typesense/presets_test.go index 6bc8352..0cafc8b 100644 --- a/typesense/presets_test.go +++ b/typesense/presets_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/typesense/typesense-go/v2/typesense/api" + "github.com/typesense/typesense-go/v2/typesense/api/pointer" ) func TestPresetsRetrieveAsSearchParameters(t *testing.T) { @@ -17,7 +18,7 @@ func TestPresetsRetrieveAsSearchParameters(t *testing.T) { }, } - presetValue := api.SearchParameters{Q: "Hello"} + presetValue := api.SearchParameters{Q: pointer.Any("Hello")} expectedData[0].Value.FromSearchParameters(presetValue) @@ -105,7 +106,7 @@ func TestPresetsRetrieveOnHttpStatusErrorCodeReturnsError(t *testing.T) { func TestPresetsFromSearchParametersUpsert(t *testing.T) { expectedData := &api.PresetUpsertSchema{} - presetValue := api.SearchParameters{Q: "Xin chao"} + presetValue := api.SearchParameters{Q: pointer.Any("Xin chao")} expectedData.Value.FromSearchParameters(presetValue) diff --git a/typesense/synonym.go b/typesense/synonym.go index 9c5287a..98d5eeb 100644 --- a/typesense/synonym.go +++ b/typesense/synonym.go @@ -11,7 +11,7 @@ type SynonymInterface interface { // Retrieve a single search synonym Retrieve(ctx context.Context) (*api.SearchSynonym, error) // Delete a synonym associated with a collection - Delete(ctx context.Context) (*api.SearchSynonym, error) + Delete(ctx context.Context) (*api.SearchSynonymDeleteResponse, error) } // synonym is internal implementation of SynonymInterface @@ -33,7 +33,7 @@ func (s *synonym) Retrieve(ctx context.Context) (*api.SearchSynonym, error) { return response.JSON200, nil } -func (s *synonym) Delete(ctx context.Context) (*api.SearchSynonym, error) { +func (s *synonym) Delete(ctx context.Context) (*api.SearchSynonymDeleteResponse, error) { response, err := s.apiClient.DeleteSearchSynonymWithResponse(ctx, s.collectionName, s.synonymID) if err != nil { diff --git a/typesense/synonym_test.go b/typesense/synonym_test.go index 1b6db43..b5bb61a 100644 --- a/typesense/synonym_test.go +++ b/typesense/synonym_test.go @@ -6,8 +6,6 @@ import ( "net/http" "testing" - "github.com/typesense/typesense-go/v2/typesense/api/pointer" - "github.com/stretchr/testify/assert" "github.com/typesense/typesense-go/v2/typesense/api" "github.com/typesense/typesense-go/v2/typesense/mocks" @@ -74,12 +72,12 @@ func TestSearchSynonymRetrieveOnHttpStatusErrorCodeReturnsError(t *testing.T) { } func TestSearchSynonymDelete(t *testing.T) { - expectedResult := &api.SearchSynonym{Id: pointer.String("customize-apple")} + expectedResult := &api.SearchSynonymDeleteResponse{Id: "customize-apple"} ctrl := gomock.NewController(t) defer ctrl.Finish() mockAPIClient := mocks.NewMockAPIClientInterface(ctrl) - mockedResult := &api.SearchSynonym{Id: pointer.String("customize-apple")} + mockedResult := &api.SearchSynonymDeleteResponse{Id: "customize-apple"} mockAPIClient.EXPECT(). DeleteSearchSynonymWithResponse(gomock.Not(gomock.Nil()), "products", "customize-apple"). diff --git a/typesense/test/analytics_events_test.go b/typesense/test/analytics_events_test.go index 2757338..905501b 100644 --- a/typesense/test/analytics_events_test.go +++ b/typesense/test/analytics_events_test.go @@ -14,7 +14,8 @@ import ( func TestAnalyticsEventsCreate(t *testing.T) { eventName := newUUIDName("event") collectionName := createNewCollection(t, "analytics-rules-collection") - createNewAnalyticsRule(t, collectionName, eventName) + sourceCollectionName := createNewCollection(t, "analytics-rules-source-collection") + createNewAnalyticsRule(t, collectionName, sourceCollectionName, eventName) result, err := typesenseClient.Analytics().Events().Create(context.Background(), &api.AnalyticsEventCreateSchema{ Type: "click", diff --git a/typesense/test/analytics_rule_test.go b/typesense/test/analytics_rule_test.go index b948012..1ef43f7 100644 --- a/typesense/test/analytics_rule_test.go +++ b/typesense/test/analytics_rule_test.go @@ -13,7 +13,8 @@ import ( func TestAnalyticsRuleRetrieve(t *testing.T) { eventName := newUUIDName("event") collectionName := createNewCollection(t, "analytics-rules-collection") - expectedRule := createNewAnalyticsRule(t, collectionName, eventName) + sourceCollectionName := createNewCollection(t, "analytics-rules-source-collection") + expectedRule := createNewAnalyticsRule(t, collectionName, sourceCollectionName, eventName) result, err := typesenseClient.Analytics().Rule(expectedRule.Name).Retrieve(context.Background()) @@ -24,7 +25,8 @@ func TestAnalyticsRuleRetrieve(t *testing.T) { func TestAnalyticsRuleDelete(t *testing.T) { eventName := newUUIDName("event") collectionName := createNewCollection(t, "analytics-rules-collection") - expectedRule := createNewAnalyticsRule(t, collectionName, eventName) + sourceCollectionName := createNewCollection(t, "analytics-rules-source-collection") + expectedRule := createNewAnalyticsRule(t, collectionName, sourceCollectionName, eventName) result, err := typesenseClient.Analytics().Rule(expectedRule.Name).Delete(context.Background()) diff --git a/typesense/test/analytics_rules_test.go b/typesense/test/analytics_rules_test.go index 6606b8d..7f25cda 100644 --- a/typesense/test/analytics_rules_test.go +++ b/typesense/test/analytics_rules_test.go @@ -13,10 +13,11 @@ import ( func TestAnalyticsRulesUpsert(t *testing.T) { collectionName := createNewCollection(t, "analytics-rules-collection") + sourceCollectionName := createNewCollection(t, "analytics-rules-source-collection") eventName := newUUIDName("event") - ruleSchema := newAnalyticsRuleUpsertSchema(collectionName, eventName) + ruleSchema := newAnalyticsRuleUpsertSchema(collectionName, sourceCollectionName, eventName) ruleName := newUUIDName("test-rule") - expectedData := newAnalyticsRule(ruleName, collectionName, eventName) + expectedData := newAnalyticsRule(ruleName, collectionName, sourceCollectionName, eventName) result, err := typesenseClient.Analytics().Rules().Upsert(context.Background(), ruleName, ruleSchema) @@ -26,8 +27,9 @@ func TestAnalyticsRulesUpsert(t *testing.T) { func TestAnalyticsRulesRetrieve(t *testing.T) { collectionName := createNewCollection(t, "analytics-rules-collection") + sourceCollectionName := createNewCollection(t, "analytics-rules-source-collection") eventName := newUUIDName("event") - expectedRule := createNewAnalyticsRule(t, collectionName, eventName) + expectedRule := createNewAnalyticsRule(t, collectionName, sourceCollectionName, eventName) results, err := typesenseClient.Analytics().Rules().Retrieve(context.Background()) diff --git a/typesense/test/collections_test.go b/typesense/test/collections_test.go index cbc664e..4d63fda 100644 --- a/typesense/test/collections_test.go +++ b/typesense/test/collections_test.go @@ -19,9 +19,8 @@ func TestCollectionCreate(t *testing.T) { expectedResult := expectedNewCollection(collectionName) result, err := typesenseClient.Collections().Create(context.Background(), schema) - result.CreatedAt = pointer.Int64(0) - require.NoError(t, err) + result.CreatedAt = pointer.Int64(0) require.Equal(t, expectedResult, result) } diff --git a/typesense/test/dbhelpers_test.go b/typesense/test/dbhelpers_test.go index dde658b..62e7812 100644 --- a/typesense/test/dbhelpers_test.go +++ b/typesense/test/dbhelpers_test.go @@ -285,7 +285,7 @@ func newCollectionAlias(collectionName string, name string) *api.CollectionAlias func newPresetFromSearchParametersUpsertSchema() *api.PresetUpsertSchema { preset := &api.PresetUpsertSchema{} preset.Value.FromSearchParameters(api.SearchParameters{ - Q: "hello", + Q: pointer.Any("hello"), }) return preset } @@ -295,7 +295,7 @@ func newPresetFromSearchParameters(presetName string) *api.PresetSchema { Name: presetName, } preset.Value.FromSearchParameters(api.SearchParameters{ - Q: "hello", + Q: pointer.Any("hello"), }) return preset } @@ -326,12 +326,12 @@ func newPresetFromMultiSearchSearchesParameter(presetName string) *api.PresetSch return preset } -func newAnalyticsRuleUpsertSchema(collectionName string, eventName string) *api.AnalyticsRuleUpsertSchema { +func newAnalyticsRuleUpsertSchema(collectionName string, sourceCollectionName string, eventName string) *api.AnalyticsRuleUpsertSchema { return &api.AnalyticsRuleUpsertSchema{ Type: "counter", Params: api.AnalyticsRuleParameters{ Source: api.AnalyticsRuleParametersSource{ - Collections: []string{"products"}, + Collections: []string{sourceCollectionName}, Events: &[]struct { Name string "json:\"name\"" Type string "json:\"type\"" @@ -349,13 +349,13 @@ func newAnalyticsRuleUpsertSchema(collectionName string, eventName string) *api. } } -func newAnalyticsRule(ruleName string, collectionName string, eventName string) *api.AnalyticsRuleSchema { +func newAnalyticsRule(ruleName string, collectionName string, sourceCollectionName string, eventName string) *api.AnalyticsRuleSchema { return &api.AnalyticsRuleSchema{ Name: ruleName, Type: "counter", Params: api.AnalyticsRuleParameters{ Source: api.AnalyticsRuleParametersSource{ - Collections: []string{"products"}, + Collections: []string{sourceCollectionName}, Events: &[]struct { Name string "json:\"name\"" Type string "json:\"type\"" @@ -414,9 +414,9 @@ func createNewPreset(t *testing.T, presetValueIsFromSearchParameters ...bool) (s return presetName, result } -func createNewAnalyticsRule(t *testing.T, collectionName string, eventName string) *api.AnalyticsRuleSchema { +func createNewAnalyticsRule(t *testing.T, collectionName string, sourceCollectionName string, eventName string) *api.AnalyticsRuleSchema { t.Helper() - ruleSchema := newAnalyticsRuleUpsertSchema(collectionName, eventName) + ruleSchema := newAnalyticsRuleUpsertSchema(collectionName, sourceCollectionName, eventName) ruleName := newUUIDName("test-rule") result, err := typesenseClient.Analytics().Rules().Upsert(context.Background(), ruleName, ruleSchema) diff --git a/typesense/test/key_test.go b/typesense/test/key_test.go index 5c29d7f..1da5763 100644 --- a/typesense/test/key_test.go +++ b/typesense/test/key_test.go @@ -31,7 +31,7 @@ func TestKeyDelete(t *testing.T) { result, err := typesenseClient.Key(*expectedKey.Id).Delete(context.Background()) require.NoError(t, err) - require.Equal(t, expectedKey.Id, result.Id) + require.Equal(t, *expectedKey.Id, result.Id) _, err = typesenseClient.Key(*expectedKey.Id).Retrieve(context.Background()) require.Error(t, err) diff --git a/typesense/test/override_test.go b/typesense/test/override_test.go index 04b6ce1..fd73170 100644 --- a/typesense/test/override_test.go +++ b/typesense/test/override_test.go @@ -28,7 +28,6 @@ func TestSearchOverrideRetrieve(t *testing.T) { func TestSearchOverrideDelete(t *testing.T) { collectionName := createNewCollection(t, "companies") overrideID := newUUIDName("customize-apple") - expectedResult := newSearchOverride(overrideID) body := newSearchOverrideSchema() _, err := typesenseClient.Collection(collectionName).Overrides().Upsert(context.Background(), overrideID, body) @@ -37,7 +36,7 @@ func TestSearchOverrideDelete(t *testing.T) { result, err := typesenseClient.Collection(collectionName).Override(overrideID).Delete(context.Background()) require.NoError(t, err) - require.Equal(t, expectedResult.Id, result.Id) + require.Equal(t, overrideID, result.Id) _, err = typesenseClient.Collection(collectionName).Override(overrideID).Retrieve(context.Background()) require.Error(t, err) diff --git a/typesense/test/search_test.go b/typesense/test/search_test.go index 1c13d33..65aa3a4 100644 --- a/typesense/test/search_test.go +++ b/typesense/test/search_test.go @@ -165,8 +165,8 @@ func TestCollectionSearchWithPreset(t *testing.T) { require.NoError(t, err) searchParams := api.SearchParameters{ - Q: "Company", - QueryBy: "company_name, company_name", + Q: pointer.Any("Company"), + QueryBy: pointer.Any("company_name, company_name"), QueryByWeights: pointer.String("2, 1"), FilterBy: pointer.String("num_employees:>=100"), SortBy: pointer.String("num_employees:desc"), diff --git a/typesense/test/synonym_test.go b/typesense/test/synonym_test.go index f03acc3..15da56a 100644 --- a/typesense/test/synonym_test.go +++ b/typesense/test/synonym_test.go @@ -30,7 +30,6 @@ func TestSearchSynonymRetrieve(t *testing.T) { func TestSearchSynonymDelete(t *testing.T) { collectionName := createNewCollection(t, "products") synonymID := newUUIDName("customize-apple") - expectedResult := newSearchSynonym(synonymID) body := newSearchSynonymSchema() _, err := typesenseClient.Collection(collectionName).Synonyms().Upsert(context.Background(), synonymID, body) @@ -39,7 +38,7 @@ func TestSearchSynonymDelete(t *testing.T) { result, err := typesenseClient.Collection(collectionName).Synonym(synonymID).Delete(context.Background()) require.NoError(t, err) - require.Equal(t, expectedResult.Id, result.Id) + require.Equal(t, synonymID, result.Id) _, err = typesenseClient.Collection(collectionName).Synonym(synonymID).Retrieve(context.Background()) require.Error(t, err) From fa792eafa781946aebf5c781ff7811b210a4264e Mon Sep 17 00:00:00 2001 From: Hayden Date: Sat, 25 Jan 2025 21:41:25 +0700 Subject: [PATCH 2/4] use Typesense 28.0.rc35 --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b8847b1..daea23e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest services: typesense: - image: typesense/typesense:27.0 + image: typesense/typesense:28.0.rc35 ports: - 8108:8108/tcp volumes: From 0cde9b677bee3939e95db57fa0cf081a322eb6e0 Mon Sep 17 00:00:00 2001 From: Hayden Date: Mon, 27 Jan 2025 12:50:49 +0700 Subject: [PATCH 3/4] Pull changes from oapi-spec - Fixed https://github.com/typesense/typesense-go/issues/168 - Allow embedding of separate api key for each search in multi-search --- typesense/api/generator/generator.yml | 5 +++-- typesense/api/generator/openapi.yml | 5 +++-- typesense/api/types_gen.go | 5 ++++- typesense/multi_search_test.go | 4 ++-- typesense/preset_test.go | 2 +- typesense/presets_test.go | 4 ++-- typesense/test/dbhelpers_test.go | 4 ++-- typesense/test/multi_search_test.go | 20 ++++++++++---------- 8 files changed, 27 insertions(+), 22 deletions(-) diff --git a/typesense/api/generator/generator.yml b/typesense/api/generator/generator.yml index 2ff123c..b7dfd96 100644 --- a/typesense/api/generator/generator.yml +++ b/typesense/api/generator/generator.yml @@ -571,8 +571,9 @@ components: description: | The collection to search in. type: string - required: - - collection + x-typesense-api-key: + description: A separate search API key for each search within a multi_search request + type: string type: object MultiSearchParameters: description: | diff --git a/typesense/api/generator/openapi.yml b/typesense/api/generator/openapi.yml index 008c3e3..f4a1555 100644 --- a/typesense/api/generator/openapi.yml +++ b/typesense/api/generator/openapi.yml @@ -3226,13 +3226,14 @@ components: allOf: - $ref: "#/components/schemas/MultiSearchParameters" - type: object - required: - - collection properties: collection: type: string description: > The collection to search in. + x-typesense-api-key: + type: string + description: A separate search API key for each search within a multi_search request FacetCounts: type: object properties: diff --git a/typesense/api/types_gen.go b/typesense/api/types_gen.go index a190615..7a739cc 100644 --- a/typesense/api/types_gen.go +++ b/typesense/api/types_gen.go @@ -426,7 +426,7 @@ type MultiSearchCollectionParameters struct { CacheTtl *int `json:"cache_ttl,omitempty"` // Collection The collection to search in. - Collection string `json:"collection"` + Collection *string `json:"collection,omitempty"` // Conversation Enable conversational search. Conversation *bool `json:"conversation,omitempty"` @@ -616,6 +616,9 @@ type MultiSearchCollectionParameters struct { // VoiceQuery The base64 encoded audio file in 16 khz 16-bit WAV format. VoiceQuery *string `json:"voice_query,omitempty"` + + // XTypesenseApiKey A separate search API key for each search within a multi_search request + XTypesenseApiKey *string `json:"x-typesense-api-key,omitempty"` } // MultiSearchParameters Parameters for the multi search API. diff --git a/typesense/multi_search_test.go b/typesense/multi_search_test.go index e861e64..222262f 100644 --- a/typesense/multi_search_test.go +++ b/typesense/multi_search_test.go @@ -39,12 +39,12 @@ func newMultiSearchBodyParams() api.MultiSearchSearchesParameter { return api.MultiSearchSearchesParameter{ Searches: []api.MultiSearchCollectionParameters{ { - Collection: "companies", + Collection: pointer.String("companies"), Q: pointer.String("text"), QueryBy: pointer.String("company_name"), }, { - Collection: "companies", + Collection: pointer.String("companies"), Q: pointer.String("text"), QueryBy: pointer.String("company_name"), }, diff --git a/typesense/preset_test.go b/typesense/preset_test.go index de7343e..bf3189d 100644 --- a/typesense/preset_test.go +++ b/typesense/preset_test.go @@ -49,7 +49,7 @@ func TestPresetRetrieveAsMultiSearchSearchesParameter(t *testing.T) { presetValue := api.MultiSearchSearchesParameter{ Searches: []api.MultiSearchCollectionParameters{ { - Collection: "test", + Collection: pointer.String("test"), }, }, } diff --git a/typesense/presets_test.go b/typesense/presets_test.go index 0cafc8b..98e3cb7 100644 --- a/typesense/presets_test.go +++ b/typesense/presets_test.go @@ -58,7 +58,7 @@ func TestPresetsRetrieveAsMultiSearchSearchesParameter(t *testing.T) { presetValue := api.MultiSearchSearchesParameter{ Searches: []api.MultiSearchCollectionParameters{ { - Collection: "test", + Collection: pointer.String("test"), }, }, } @@ -150,7 +150,7 @@ func TestPresetsFromMultiSearchSearchesParameterUpsert(t *testing.T) { presetValue := api.MultiSearchSearchesParameter{ Searches: []api.MultiSearchCollectionParameters{ { - Collection: "test", + Collection: pointer.String("test"), }, }, } diff --git a/typesense/test/dbhelpers_test.go b/typesense/test/dbhelpers_test.go index 62e7812..790118c 100644 --- a/typesense/test/dbhelpers_test.go +++ b/typesense/test/dbhelpers_test.go @@ -305,7 +305,7 @@ func newPresetFromMultiSearchSearchesParameterUpsertSchema() *api.PresetUpsertSc preset.Value.FromMultiSearchSearchesParameter(api.MultiSearchSearchesParameter{ Searches: []api.MultiSearchCollectionParameters{ { - Collection: "test", + Collection: pointer.Any("test"), }, }, }) @@ -319,7 +319,7 @@ func newPresetFromMultiSearchSearchesParameter(presetName string) *api.PresetSch preset.Value.FromMultiSearchSearchesParameter(api.MultiSearchSearchesParameter{ Searches: []api.MultiSearchCollectionParameters{ { - Collection: "test", + Collection: pointer.Any("test"), }, }, }) diff --git a/typesense/test/multi_search_test.go b/typesense/test/multi_search_test.go index de17e96..bcc0811 100644 --- a/typesense/test/multi_search_test.go +++ b/typesense/test/multi_search_test.go @@ -39,17 +39,17 @@ func TestMultiSearch(t *testing.T) { Searches: []api.MultiSearchCollectionParameters{ { Q: pointer.String("Company"), - Collection: collectionName1, + Collection: pointer.Any(collectionName1), FilterBy: pointer.String("num_employees:>100"), SortBy: pointer.String("num_employees:desc"), }, { Q: pointer.String("Company"), - Collection: collectionName1, + Collection: pointer.Any(collectionName1), FilterBy: pointer.String("num_employees:>1000"), }, { - Collection: collectionName2, + Collection: pointer.String(collectionName2), Q: pointer.String("Stark"), FilterBy: pointer.String("num_employees:>=1000"), }, @@ -108,7 +108,7 @@ func TestMultiSearchGroupBy(t *testing.T) { searches := api.MultiSearchSearchesParameter{ Searches: []api.MultiSearchCollectionParameters{ { - Collection: collectionName1, + Collection: pointer.Any(collectionName1), SortBy: pointer.String("num_employees:desc"), }, }, @@ -181,7 +181,7 @@ func TestMultiSearchVectorQuery(t *testing.T) { searches := api.MultiSearchSearchesParameter{ Searches: []api.MultiSearchCollectionParameters{ { - Collection: "embeddings", + Collection: pointer.String("embeddings"), Q: pointer.String("*"), VectorQuery: pointer.String("vec:([0.96826,0.94,0.39557,0.306488], k: 10)"), }, @@ -218,17 +218,17 @@ func TestMultiSearchWithPreset(t *testing.T) { Searches: []api.MultiSearchCollectionParameters{ { Q: pointer.String("Company"), - Collection: collectionName1, + Collection: pointer.Any(collectionName1), FilterBy: pointer.String("num_employees:>100"), SortBy: pointer.String("num_employees:desc"), }, { Q: pointer.String("Company"), - Collection: collectionName1, + Collection: pointer.Any(collectionName1), FilterBy: pointer.String("num_employees:>1000"), }, { - Collection: collectionName2, + Collection: pointer.String(collectionName2), Q: pointer.String("Stark"), FilterBy: pointer.String("num_employees:>=1000"), }, @@ -313,12 +313,12 @@ func TestMultiSearchWithStopwords(t *testing.T) { Searches: []api.MultiSearchCollectionParameters{ { Q: pointer.String("Company Stark"), - Collection: collectionName1, + Collection: pointer.Any(collectionName1), SortBy: pointer.String("num_employees:desc"), }, { Q: pointer.String("Stark"), - Collection: collectionName2, + Collection: pointer.String(collectionName2), }, }, } From 25d985c387ffebea9a50548251da53047bb71a15 Mon Sep 17 00:00:00 2001 From: Hayden Date: Mon, 27 Jan 2025 13:59:36 +0700 Subject: [PATCH 4/4] Bump to v3, update dependencies Fixed https://github.com/typesense/typesense-go/issues/189 --- go.mod | 36 ++++--- go.sum | 100 ++++++++++++++------ typesense/alias.go | 2 +- typesense/alias_test.go | 4 +- typesense/aliases.go | 2 +- typesense/aliases_test.go | 6 +- typesense/analytics_events.go | 2 +- typesense/analytics_events_test.go | 2 +- typesense/analytics_rule.go | 2 +- typesense/analytics_rule_test.go | 4 +- typesense/analytics_rules.go | 2 +- typesense/analytics_rules_test.go | 4 +- typesense/api/circuit/http_client.go | 2 +- typesense/api/circuit/http_client_test.go | 2 +- typesense/api/circuit/mocks/mock_circuit.go | 2 + typesense/api/client_gen.go | 2 +- typesense/api/types_gen.go | 2 +- typesense/api_call.go | 2 +- typesense/client.go | 4 +- typesense/client_test.go | 4 +- typesense/collection.go | 2 +- typesense/collection_test.go | 6 +- typesense/collections.go | 2 +- typesense/collections_test.go | 6 +- typesense/conversation_model.go | 2 +- typesense/conversation_model_test.go | 4 +- typesense/conversation_models.go | 2 +- typesense/conversation_models_test.go | 4 +- typesense/document.go | 2 +- typesense/document_test.go | 6 +- typesense/documents.go | 4 +- typesense/documents_test.go | 6 +- typesense/health_test.go | 4 +- typesense/import_test.go | 6 +- typesense/key.go | 2 +- typesense/key_test.go | 4 +- typesense/keys.go | 2 +- typesense/keys_test.go | 6 +- typesense/mocks/mock_client.go | 3 +- typesense/multi_search.go | 2 +- typesense/multi_search_test.go | 6 +- typesense/operations.go | 2 +- typesense/operations_test.go | 4 +- typesense/override.go | 2 +- typesense/override_test.go | 4 +- typesense/overrides.go | 2 +- typesense/overrides_test.go | 6 +- typesense/preset.go | 2 +- typesense/preset_test.go | 4 +- typesense/presets.go | 2 +- typesense/presets_test.go | 4 +- typesense/search_test.go | 6 +- typesense/stats.go | 2 +- typesense/stats_test.go | 4 +- typesense/stopword.go | 2 +- typesense/stopword_test.go | 4 +- typesense/stopwords.go | 2 +- typesense/stopwords_test.go | 4 +- typesense/synonym.go | 2 +- typesense/synonym_test.go | 4 +- typesense/synonyms.go | 2 +- typesense/synonyms_test.go | 6 +- typesense/test/alias_test.go | 2 +- typesense/test/aliases_test.go | 2 +- typesense/test/analytics_events_test.go | 2 +- typesense/test/analytics_rules_test.go | 2 +- typesense/test/collection_test.go | 4 +- typesense/test/collections_test.go | 4 +- typesense/test/dbhelpers_test.go | 4 +- typesense/test/doc.go | 2 +- typesense/test/document_test.go | 4 +- typesense/test/documents_test.go | 4 +- typesense/test/import_test.go | 4 +- typesense/test/keys_test.go | 2 +- typesense/test/main_test.go | 2 +- typesense/test/multi_search_test.go | 4 +- typesense/test/overrides_test.go | 4 +- typesense/test/presets_test.go | 2 +- typesense/test/search_test.go | 4 +- typesense/test/setupdb_docker_test.go | 4 +- typesense/test/setupdb_test.go | 2 +- typesense/test/stopword_test.go | 4 +- typesense/test/stopwords_test.go | 4 +- typesense/test/synonym_test.go | 2 +- typesense/test/synonyms_test.go | 4 +- 85 files changed, 230 insertions(+), 179 deletions(-) diff --git a/go.mod b/go.mod index 259741a..b896374 100644 --- a/go.mod +++ b/go.mod @@ -1,16 +1,18 @@ -module github.com/typesense/typesense-go/v2 +module github.com/typesense/typesense-go/v3 -go 1.18 +go 1.22 + +toolchain go1.23.5 require ( - github.com/google/uuid v1.5.0 + github.com/google/uuid v1.6.0 github.com/jinzhu/copier v0.3.4 - github.com/oapi-codegen/oapi-codegen/v2 v2.3.0 + github.com/oapi-codegen/oapi-codegen/v2 v2.4.1 github.com/oapi-codegen/runtime v1.1.1 - github.com/sony/gobreaker v0.5.0 + github.com/sony/gobreaker v1.0.0 github.com/stretchr/testify v1.9.0 github.com/testcontainers/testcontainers-go v0.12.0 - go.uber.org/mock v0.4.0 + go.uber.org/mock v0.5.0 gopkg.in/yaml.v3 v3.0.1 ) @@ -27,13 +29,14 @@ require ( github.com/docker/docker v20.10.12+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect - github.com/getkin/kin-openapi v0.124.0 // indirect - github.com/go-openapi/jsonpointer v0.20.2 // indirect - github.com/go-openapi/swag v0.22.8 // indirect + github.com/dprotaso/go-yit v0.0.0-20220510233725-9ba8df137936 // indirect + github.com/getkin/kin-openapi v0.127.0 // indirect + github.com/go-openapi/jsonpointer v0.21.0 // indirect + github.com/go-openapi/swag v0.23.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.2 // indirect - github.com/invopop/yaml v0.2.0 // indirect + github.com/invopop/yaml v0.3.1 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/magiconair/properties v1.8.5 // indirect github.com/mailru/easyjson v0.7.7 // indirect @@ -49,13 +52,16 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/sirupsen/logrus v1.8.1 // indirect + github.com/speakeasy-api/openapi-overlay v0.9.0 // indirect github.com/ugorji/go/codec v1.2.12 // indirect + github.com/vmware-labs/yaml-jsonpath v0.3.2 // indirect go.opencensus.io v0.23.0 // indirect - golang.org/x/mod v0.17.0 // indirect - golang.org/x/net v0.25.0 // indirect - golang.org/x/sys v0.20.0 // indirect - golang.org/x/text v0.15.0 // indirect - golang.org/x/tools v0.21.0 // indirect + golang.org/x/mod v0.18.0 // indirect + golang.org/x/net v0.26.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.21.0 // indirect + golang.org/x/text v0.18.0 // indirect + golang.org/x/tools v0.22.0 // indirect google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa // indirect google.golang.org/grpc v1.43.0 // indirect google.golang.org/protobuf v1.31.0 // indirect diff --git a/go.sum b/go.sum index d040c88..10961cf 100644 --- a/go.sum +++ b/go.sum @@ -269,6 +269,9 @@ github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDD github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/dprotaso/go-yit v0.0.0-20191028211022-135eb7262960/go.mod h1:9HQzr9D/0PGwMEbC3d5AB7oi67+h4TsQqItC1GVYG58= +github.com/dprotaso/go-yit v0.0.0-20220510233725-9ba8df137936 h1:PRxIJD8XjimM5aTknUK9w6DHLDox2r2M3DI4i2pnd3w= +github.com/dprotaso/go-yit v0.0.0-20220510233725-9ba8df137936/go.mod h1:ttYvX5qlB+mlV1okblJqcSMtR4c52UKxDiX9GRBS8+Q= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= @@ -286,11 +289,12 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= -github.com/getkin/kin-openapi v0.124.0 h1:VSFNMB9C9rTKBnQ/fpyDU8ytMTr4dWI9QovSKj9kz/M= -github.com/getkin/kin-openapi v0.124.0/go.mod h1:wb1aSZA/iWmorQP9KTAS/phLj/t17B5jT7+fS8ed9NM= +github.com/getkin/kin-openapi v0.127.0 h1:Mghqi3Dhryf3F8vR370nN67pAERW+3a95vomb3MAREY= +github.com/getkin/kin-openapi v0.127.0/go.mod h1:OZrfXzUfGrNbsKj+xmFBx6E5c6yH3At/tAKSc2UszXM= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= @@ -306,8 +310,8 @@ github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTg github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.20.2 h1:mQc3nmndL8ZBzStEo3JYF8wzmeWffDH4VbXz58sAx6Q= -github.com/go-openapi/jsonpointer v0.20.2/go.mod h1:bHen+N0u1KEO3YlmqOjTT9Adn1RfD91Ar825/PuiRVs= +github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= +github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= @@ -316,14 +320,16 @@ github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8 github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.22.8 h1:/9RjDSQ0vbFR+NyjGMkFTsA1IA0fmhKSThmfGZjicbw= -github.com/go-openapi/swag v0.22.8/go.mod h1:6QT22icPLEqAM/z/TChgb4WAveCHF92+2gF0CNjHpPI= +github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= +github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= github.com/go-redis/redis v6.15.9+incompatible h1:K0pv1D7EQUjfyoMql+r/jZqCLizCGKFlFgcHWWmHQjg= github.com/go-redis/redis v6.15.9+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= +github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= @@ -384,6 +390,7 @@ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-containerregistry v0.5.1/go.mod h1:Ct15B4yir3PLOP5jsy0GNeYVaIZs/MK/Jz5any1wFW0= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -394,14 +401,15 @@ github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU= -github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= @@ -409,7 +417,8 @@ github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORR github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= +github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= @@ -429,14 +438,15 @@ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/invopop/yaml v0.2.0 h1:7zky/qH+O0DwAyoobXUqvVBwgBFRxKoQ/3FjcVpjTMY= -github.com/invopop/yaml v0.2.0/go.mod h1:2XuRLgs/ouIrW3XNzuNj7J3Nvu/Dig5MXvbCEdiBN3Q= +github.com/invopop/yaml v0.3.1 h1:f0+ZpmhfBSS4MhG+4HYseMdJhoeeopbSKbq5Rpeelso= +github.com/invopop/yaml v0.3.1/go.mod h1:PMOp3nn4/12yEZUFfmOuNHJsZToEEOwoWsT+D81KkeA= github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA= github.com/jinzhu/copier v0.3.4 h1:mfU6jI9PtCeUjkjQ322dlff9ELjGDu975C2p/nrubVI= github.com/jinzhu/copier v0.3.4/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg= @@ -468,6 +478,7 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= @@ -527,8 +538,10 @@ github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+ github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/oapi-codegen/oapi-codegen/v2 v2.3.0 h1:rICjNsHbPP1LttefanBPnwsSwl09SqhCO7Ee623qR84= -github.com/oapi-codegen/oapi-codegen/v2 v2.3.0/go.mod h1:4k+cJeSq5ntkwlcpQSxLxICCxQzCL772o30PxdibRt4= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/oapi-codegen/oapi-codegen/v2 v2.4.1 h1:ykgG34472DWey7TSjd8vIfNykXgjOgYJZoQbKfEeY/Q= +github.com/oapi-codegen/oapi-codegen/v2 v2.4.1/go.mod h1:N5+lY1tiTDV3V1BeHtOxeWXHoPVeApvsvjJqegfoaz8= github.com/oapi-codegen/runtime v1.1.1 h1:EXLHh0DXIJnWhdRPN2w4MXAzFyE4CskzhNLUmtpMYro= github.com/oapi-codegen/runtime v1.1.1/go.mod h1:SK9X900oXmPWilYR5/WKPzt3Kqxn/uS/+lbpREv+eCg= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= @@ -538,17 +551,26 @@ github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.2/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= +github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE= +github.com/onsi/gomega v1.27.6/go.mod h1:PIQNjfQwkP3aQAH7lf7j87O/5FiNr+ZR8+ipb+qQlhg= github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= @@ -623,11 +645,14 @@ github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6So github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sclevine/spec v1.2.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U= github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= +github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= +github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= @@ -641,9 +666,11 @@ github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/sony/gobreaker v0.5.0 h1:dRCvqm0P490vZPmy7ppEk2qCnCieBooFJ+YoXGYB+yg= -github.com/sony/gobreaker v0.5.0/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/sony/gobreaker v1.0.0 h1:feX5fGGXSl3dYd4aHZItw+FpHLvvoaqkawKjVNiFMNQ= +github.com/sony/gobreaker v1.0.0/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/speakeasy-api/openapi-overlay v0.9.0 h1:Wrz6NO02cNlLzx1fB093lBlYxSI54VRhy1aSutx0PQg= +github.com/speakeasy-api/openapi-overlay v0.9.0/go.mod h1:f5FloQrHA7MsxYg9djzMD5h6dxrHjVVByWKh7an8TRc= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= @@ -694,6 +721,8 @@ github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852/go.mod h1:tw github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc/go.mod h1:ZjcWmFBXmLKZu9Nxj3WKYEafiSqer2rnvPr0en9UNpI= github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= +github.com/vmware-labs/yaml-jsonpath v0.3.2 h1:/5QKeCBGdsInyDCyVNLbXyilb61MXGi9NP674f9Hobk= +github.com/vmware-labs/yaml-jsonpath v0.3.2/go.mod h1:U6whw1z03QyqgWdgXxvVnQ90zN1BWz5V+51Ewf8k+rQ= github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/willf/bitset v1.1.11/go.mod h1:83CECat5yLh5zVOf4P1ErAgKA5UDvKtgyUABdr3+MjI= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= @@ -722,8 +751,8 @@ go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= -go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= +go.uber.org/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU= +go.uber.org/mock v0.5.0/go.mod h1:ge71pBPLYDk7QIi1LupWxdAykm7KIEFchiOqd6z7qMM= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -770,8 +799,8 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= +golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -802,6 +831,7 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= @@ -810,10 +840,12 @@ golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211108170745-6635138e15ea/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= -golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= +golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -830,7 +862,8 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -892,18 +925,22 @@ golang.org/x/sys v0.0.0-20201117170446-d9b008d0a637/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201202213521-69691e467435/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211109184856-51b60fd695b3/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= -golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= +golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -912,8 +949,9 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= -golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= +golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -921,6 +959,7 @@ golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -963,10 +1002,11 @@ golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200616133436-c1934b75d054/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200916195026-c9a70fc28ce3/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.21.0 h1:qc0xYgIbsSDt9EyWz05J5wfa7LOVW0YTLOXrqdLAWIw= -golang.org/x/tools v0.21.0/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA= +golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1060,6 +1100,7 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= @@ -1070,6 +1111,7 @@ gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -1081,8 +1123,8 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20191026110619-0b21df46bc1d/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= diff --git a/typesense/alias.go b/typesense/alias.go index 92dd25f..4c65250 100644 --- a/typesense/alias.go +++ b/typesense/alias.go @@ -3,7 +3,7 @@ package typesense import ( "context" - "github.com/typesense/typesense-go/v2/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api" ) // AliasInterface is a type for Alias API operations diff --git a/typesense/alias_test.go b/typesense/alias_test.go index 5c5c54e..efa9000 100644 --- a/typesense/alias_test.go +++ b/typesense/alias_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/typesense/typesense-go/v2/typesense/api" - "github.com/typesense/typesense-go/v2/typesense/mocks" + "github.com/typesense/typesense-go/v3/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/mocks" "go.uber.org/mock/gomock" ) diff --git a/typesense/aliases.go b/typesense/aliases.go index cd8b33a..ae33130 100644 --- a/typesense/aliases.go +++ b/typesense/aliases.go @@ -3,7 +3,7 @@ package typesense import ( "context" - "github.com/typesense/typesense-go/v2/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api" ) // AliasesInterface is a type for Aliases API operations diff --git a/typesense/aliases_test.go b/typesense/aliases_test.go index 2925efa..cf2ccdc 100644 --- a/typesense/aliases_test.go +++ b/typesense/aliases_test.go @@ -6,12 +6,12 @@ import ( "net/http" "testing" - "github.com/typesense/typesense-go/v2/typesense/api/pointer" + "github.com/typesense/typesense-go/v3/typesense/api/pointer" "github.com/jinzhu/copier" "github.com/stretchr/testify/assert" - "github.com/typesense/typesense-go/v2/typesense/api" - "github.com/typesense/typesense-go/v2/typesense/mocks" + "github.com/typesense/typesense-go/v3/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/mocks" "go.uber.org/mock/gomock" ) diff --git a/typesense/analytics_events.go b/typesense/analytics_events.go index 34f2386..7e834a3 100644 --- a/typesense/analytics_events.go +++ b/typesense/analytics_events.go @@ -3,7 +3,7 @@ package typesense import ( "context" - "github.com/typesense/typesense-go/v2/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api" ) type AnalyticsEventsInterface interface { diff --git a/typesense/analytics_events_test.go b/typesense/analytics_events_test.go index f1ef194..3ca6400 100644 --- a/typesense/analytics_events_test.go +++ b/typesense/analytics_events_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/typesense/typesense-go/v2/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api" ) func TestAnalyticsEventsCreate(t *testing.T) { diff --git a/typesense/analytics_rule.go b/typesense/analytics_rule.go index 6a66313..675ea29 100644 --- a/typesense/analytics_rule.go +++ b/typesense/analytics_rule.go @@ -3,7 +3,7 @@ package typesense import ( "context" - "github.com/typesense/typesense-go/v2/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api" ) type AnalyticsRuleInterface interface { diff --git a/typesense/analytics_rule_test.go b/typesense/analytics_rule_test.go index 0a41738..23600a5 100644 --- a/typesense/analytics_rule_test.go +++ b/typesense/analytics_rule_test.go @@ -6,8 +6,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/typesense/typesense-go/v2/typesense/api" - "github.com/typesense/typesense-go/v2/typesense/api/pointer" + "github.com/typesense/typesense-go/v3/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api/pointer" ) func TestAnalyticsRuleRetrieve(t *testing.T) { diff --git a/typesense/analytics_rules.go b/typesense/analytics_rules.go index 58c3d76..975ab05 100644 --- a/typesense/analytics_rules.go +++ b/typesense/analytics_rules.go @@ -3,7 +3,7 @@ package typesense import ( "context" - "github.com/typesense/typesense-go/v2/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api" ) type AnalyticsRulesInterface interface { diff --git a/typesense/analytics_rules_test.go b/typesense/analytics_rules_test.go index 28f7b96..c985d94 100644 --- a/typesense/analytics_rules_test.go +++ b/typesense/analytics_rules_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/typesense/typesense-go/v2/typesense/api" - "github.com/typesense/typesense-go/v2/typesense/api/pointer" + "github.com/typesense/typesense-go/v3/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api/pointer" ) func TestAnalyticsRulesRetrieve(t *testing.T) { diff --git a/typesense/api/circuit/http_client.go b/typesense/api/circuit/http_client.go index c393422..251edb6 100644 --- a/typesense/api/circuit/http_client.go +++ b/typesense/api/circuit/http_client.go @@ -5,7 +5,7 @@ package circuit import ( "net/http" - "github.com/typesense/typesense-go/v2/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api" ) type HTTPRequestDoer interface { diff --git a/typesense/api/circuit/http_client_test.go b/typesense/api/circuit/http_client_test.go index c6ecc2b..6075560 100644 --- a/typesense/api/circuit/http_client_test.go +++ b/typesense/api/circuit/http_client_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/typesense/typesense-go/v2/typesense/api/circuit/mocks" + "github.com/typesense/typesense-go/v3/typesense/api/circuit/mocks" "go.uber.org/mock/gomock" ) diff --git a/typesense/api/circuit/mocks/mock_circuit.go b/typesense/api/circuit/mocks/mock_circuit.go index ca34587..1281fdf 100644 --- a/typesense/api/circuit/mocks/mock_circuit.go +++ b/typesense/api/circuit/mocks/mock_circuit.go @@ -20,6 +20,7 @@ import ( type MockHTTPRequestDoer struct { ctrl *gomock.Controller recorder *MockHTTPRequestDoerMockRecorder + isgomock struct{} } // MockHTTPRequestDoerMockRecorder is the mock recorder for MockHTTPRequestDoer. @@ -58,6 +59,7 @@ func (mr *MockHTTPRequestDoerMockRecorder) Do(req any) *gomock.Call { type MockBreaker struct { ctrl *gomock.Controller recorder *MockBreakerMockRecorder + isgomock struct{} } // MockBreakerMockRecorder is the mock recorder for MockBreaker. diff --git a/typesense/api/client_gen.go b/typesense/api/client_gen.go index 87c75f0..baca19a 100644 --- a/typesense/api/client_gen.go +++ b/typesense/api/client_gen.go @@ -1,6 +1,6 @@ // Package api provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT. +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT. package api import ( diff --git a/typesense/api/types_gen.go b/typesense/api/types_gen.go index 7a739cc..14dad6a 100644 --- a/typesense/api/types_gen.go +++ b/typesense/api/types_gen.go @@ -1,6 +1,6 @@ // Package api provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT. +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT. package api import ( diff --git a/typesense/api_call.go b/typesense/api_call.go index 9ebba0a..9302ad3 100644 --- a/typesense/api_call.go +++ b/typesense/api_call.go @@ -7,7 +7,7 @@ import ( "net/url" "time" - "github.com/typesense/typesense-go/v2/typesense/api/circuit" + "github.com/typesense/typesense-go/v3/typesense/api/circuit" ) type APICall struct { diff --git a/typesense/client.go b/typesense/client.go index 9b35eff..c1389b7 100644 --- a/typesense/client.go +++ b/typesense/client.go @@ -7,8 +7,8 @@ import ( "net/http" "time" - "github.com/typesense/typesense-go/v2/typesense/api" - "github.com/typesense/typesense-go/v2/typesense/api/circuit" + "github.com/typesense/typesense-go/v3/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api/circuit" ) type APIClientInterface interface { diff --git a/typesense/client_test.go b/typesense/client_test.go index 6fc634a..09cb820 100644 --- a/typesense/client_test.go +++ b/typesense/client_test.go @@ -7,8 +7,8 @@ import ( "github.com/sony/gobreaker" "github.com/stretchr/testify/assert" - "github.com/typesense/typesense-go/v2/typesense/api" - "github.com/typesense/typesense-go/v2/typesense/api/circuit" + "github.com/typesense/typesense-go/v3/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api/circuit" ) func TestHttpError(t *testing.T) { diff --git a/typesense/collection.go b/typesense/collection.go index 68ef5cc..d912d21 100644 --- a/typesense/collection.go +++ b/typesense/collection.go @@ -3,7 +3,7 @@ package typesense import ( "context" - "github.com/typesense/typesense-go/v2/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api" ) // CollectionInterface is a type for Collection API operations diff --git a/typesense/collection_test.go b/typesense/collection_test.go index e19e96a..e676a33 100644 --- a/typesense/collection_test.go +++ b/typesense/collection_test.go @@ -7,9 +7,9 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/typesense/typesense-go/v2/typesense/api" - "github.com/typesense/typesense-go/v2/typesense/api/pointer" - "github.com/typesense/typesense-go/v2/typesense/mocks" + "github.com/typesense/typesense-go/v3/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api/pointer" + "github.com/typesense/typesense-go/v3/typesense/mocks" "go.uber.org/mock/gomock" ) diff --git a/typesense/collections.go b/typesense/collections.go index 3b0227a..f3a1741 100644 --- a/typesense/collections.go +++ b/typesense/collections.go @@ -3,7 +3,7 @@ package typesense import ( "context" - "github.com/typesense/typesense-go/v2/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api" ) // CollectionsInterface is a type for Collections API operations diff --git a/typesense/collections_test.go b/typesense/collections_test.go index a4bd469..1984abb 100644 --- a/typesense/collections_test.go +++ b/typesense/collections_test.go @@ -8,9 +8,9 @@ import ( "github.com/jinzhu/copier" "github.com/stretchr/testify/assert" - "github.com/typesense/typesense-go/v2/typesense/api" - "github.com/typesense/typesense-go/v2/typesense/api/pointer" - "github.com/typesense/typesense-go/v2/typesense/mocks" + "github.com/typesense/typesense-go/v3/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api/pointer" + "github.com/typesense/typesense-go/v3/typesense/mocks" "go.uber.org/mock/gomock" ) diff --git a/typesense/conversation_model.go b/typesense/conversation_model.go index ce888b6..292323e 100644 --- a/typesense/conversation_model.go +++ b/typesense/conversation_model.go @@ -3,7 +3,7 @@ package typesense import ( "context" - "github.com/typesense/typesense-go/v2/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api" ) type ConversationModelInterface interface { diff --git a/typesense/conversation_model_test.go b/typesense/conversation_model_test.go index 278f6d4..586640b 100644 --- a/typesense/conversation_model_test.go +++ b/typesense/conversation_model_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/typesense/typesense-go/v2/typesense/api" - "github.com/typesense/typesense-go/v2/typesense/api/pointer" + "github.com/typesense/typesense-go/v3/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api/pointer" ) func TestConversationModelRetrieve(t *testing.T) { diff --git a/typesense/conversation_models.go b/typesense/conversation_models.go index bda1d89..4350264 100644 --- a/typesense/conversation_models.go +++ b/typesense/conversation_models.go @@ -3,7 +3,7 @@ package typesense import ( "context" - "github.com/typesense/typesense-go/v2/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api" ) // ConversationModelsInterface is a type for ConversationModels API operations diff --git a/typesense/conversation_models_test.go b/typesense/conversation_models_test.go index 41f9236..579f380 100644 --- a/typesense/conversation_models_test.go +++ b/typesense/conversation_models_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/typesense/typesense-go/v2/typesense/api" - "github.com/typesense/typesense-go/v2/typesense/api/pointer" + "github.com/typesense/typesense-go/v3/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api/pointer" ) func TestConversationModelsRetrieve(t *testing.T) { diff --git a/typesense/document.go b/typesense/document.go index e244d0f..c5c7902 100644 --- a/typesense/document.go +++ b/typesense/document.go @@ -6,7 +6,7 @@ import ( "io" "strings" - "github.com/typesense/typesense-go/v2/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api" ) type DocumentInterface[T any] interface { diff --git a/typesense/document_test.go b/typesense/document_test.go index c968fb3..f75ef5b 100644 --- a/typesense/document_test.go +++ b/typesense/document_test.go @@ -6,9 +6,9 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/typesense/typesense-go/v2/typesense/api" - "github.com/typesense/typesense-go/v2/typesense/api/pointer" - "github.com/typesense/typesense-go/v2/typesense/mocks" + "github.com/typesense/typesense-go/v3/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api/pointer" + "github.com/typesense/typesense-go/v3/typesense/mocks" "go.uber.org/mock/gomock" ) diff --git a/typesense/documents.go b/typesense/documents.go index 8bfd56c..6a0eb12 100644 --- a/typesense/documents.go +++ b/typesense/documents.go @@ -8,8 +8,8 @@ import ( "io" "net/http" - "github.com/typesense/typesense-go/v2/typesense/api" - "github.com/typesense/typesense-go/v2/typesense/api/pointer" + "github.com/typesense/typesense-go/v3/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api/pointer" ) const ( diff --git a/typesense/documents_test.go b/typesense/documents_test.go index dbd6150..a155f75 100644 --- a/typesense/documents_test.go +++ b/typesense/documents_test.go @@ -9,9 +9,9 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/typesense/typesense-go/v2/typesense/api" - "github.com/typesense/typesense-go/v2/typesense/api/pointer" - "github.com/typesense/typesense-go/v2/typesense/mocks" + "github.com/typesense/typesense-go/v3/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api/pointer" + "github.com/typesense/typesense-go/v3/typesense/mocks" "go.uber.org/mock/gomock" ) diff --git a/typesense/health_test.go b/typesense/health_test.go index 25f6caf..83d902e 100644 --- a/typesense/health_test.go +++ b/typesense/health_test.go @@ -8,8 +8,8 @@ import ( "time" "github.com/stretchr/testify/assert" - "github.com/typesense/typesense-go/v2/typesense/api" - "github.com/typesense/typesense-go/v2/typesense/mocks" + "github.com/typesense/typesense-go/v3/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/mocks" "go.uber.org/mock/gomock" ) diff --git a/typesense/import_test.go b/typesense/import_test.go index 4459f2a..1526991 100644 --- a/typesense/import_test.go +++ b/typesense/import_test.go @@ -11,9 +11,9 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/typesense/typesense-go/v2/typesense/api" - "github.com/typesense/typesense-go/v2/typesense/api/pointer" - "github.com/typesense/typesense-go/v2/typesense/mocks" + "github.com/typesense/typesense-go/v3/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api/pointer" + "github.com/typesense/typesense-go/v3/typesense/mocks" "go.uber.org/mock/gomock" ) diff --git a/typesense/key.go b/typesense/key.go index 0c8a888..5edcd03 100644 --- a/typesense/key.go +++ b/typesense/key.go @@ -3,7 +3,7 @@ package typesense import ( "context" - "github.com/typesense/typesense-go/v2/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api" ) type KeyInterface interface { diff --git a/typesense/key_test.go b/typesense/key_test.go index 1426364..4cdc933 100644 --- a/typesense/key_test.go +++ b/typesense/key_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/typesense/typesense-go/v2/typesense/api" - "github.com/typesense/typesense-go/v2/typesense/mocks" + "github.com/typesense/typesense-go/v3/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/mocks" "go.uber.org/mock/gomock" ) diff --git a/typesense/keys.go b/typesense/keys.go index f5cfb4b..ca2bf90 100644 --- a/typesense/keys.go +++ b/typesense/keys.go @@ -8,7 +8,7 @@ import ( "encoding/json" "fmt" - "github.com/typesense/typesense-go/v2/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api" ) type KeysInterface interface { diff --git a/typesense/keys_test.go b/typesense/keys_test.go index 5e3585d..03f4e12 100644 --- a/typesense/keys_test.go +++ b/typesense/keys_test.go @@ -9,9 +9,9 @@ import ( "github.com/jinzhu/copier" "github.com/stretchr/testify/assert" - "github.com/typesense/typesense-go/v2/typesense/api" - "github.com/typesense/typesense-go/v2/typesense/api/pointer" - "github.com/typesense/typesense-go/v2/typesense/mocks" + "github.com/typesense/typesense-go/v3/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api/pointer" + "github.com/typesense/typesense-go/v3/typesense/mocks" "go.uber.org/mock/gomock" ) diff --git a/typesense/mocks/mock_client.go b/typesense/mocks/mock_client.go index d24b223..67d8aa7 100644 --- a/typesense/mocks/mock_client.go +++ b/typesense/mocks/mock_client.go @@ -15,7 +15,7 @@ import ( http "net/http" reflect "reflect" - api "github.com/typesense/typesense-go/v2/typesense/api" + api "github.com/typesense/typesense-go/v3/typesense/api" gomock "go.uber.org/mock/gomock" ) @@ -23,6 +23,7 @@ import ( type MockAPIClientInterface struct { ctrl *gomock.Controller recorder *MockAPIClientInterfaceMockRecorder + isgomock struct{} } // MockAPIClientInterfaceMockRecorder is the mock recorder for MockAPIClientInterface. diff --git a/typesense/multi_search.go b/typesense/multi_search.go index 580afcd..2d8e0d9 100644 --- a/typesense/multi_search.go +++ b/typesense/multi_search.go @@ -6,7 +6,7 @@ import ( "encoding/json" "io" - "github.com/typesense/typesense-go/v2/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api" ) type MultiSearchInterface interface { diff --git a/typesense/multi_search_test.go b/typesense/multi_search_test.go index 222262f..f65e59c 100644 --- a/typesense/multi_search_test.go +++ b/typesense/multi_search_test.go @@ -10,9 +10,9 @@ import ( "bytes" "github.com/stretchr/testify/assert" - "github.com/typesense/typesense-go/v2/typesense/api" - "github.com/typesense/typesense-go/v2/typesense/api/pointer" - "github.com/typesense/typesense-go/v2/typesense/mocks" + "github.com/typesense/typesense-go/v3/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api/pointer" + "github.com/typesense/typesense-go/v3/typesense/mocks" "go.uber.org/mock/gomock" ) diff --git a/typesense/operations.go b/typesense/operations.go index 810c276..0ef9756 100644 --- a/typesense/operations.go +++ b/typesense/operations.go @@ -3,7 +3,7 @@ package typesense import ( "context" - "github.com/typesense/typesense-go/v2/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api" ) type OperationsInterface interface { diff --git a/typesense/operations_test.go b/typesense/operations_test.go index f5ed504..2608d89 100644 --- a/typesense/operations_test.go +++ b/typesense/operations_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/typesense/typesense-go/v2/typesense/api" - "github.com/typesense/typesense-go/v2/typesense/mocks" + "github.com/typesense/typesense-go/v3/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/mocks" "go.uber.org/mock/gomock" ) diff --git a/typesense/override.go b/typesense/override.go index 80000f5..8768200 100644 --- a/typesense/override.go +++ b/typesense/override.go @@ -3,7 +3,7 @@ package typesense import ( "context" - "github.com/typesense/typesense-go/v2/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api" ) // OverrideInterface is a type for Search Override API operations diff --git a/typesense/override_test.go b/typesense/override_test.go index f231134..aafbaff 100644 --- a/typesense/override_test.go +++ b/typesense/override_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/typesense/typesense-go/v2/typesense/api" - "github.com/typesense/typesense-go/v2/typesense/mocks" + "github.com/typesense/typesense-go/v3/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/mocks" "go.uber.org/mock/gomock" ) diff --git a/typesense/overrides.go b/typesense/overrides.go index 2eadddb..a63aa00 100644 --- a/typesense/overrides.go +++ b/typesense/overrides.go @@ -3,7 +3,7 @@ package typesense import ( "context" - "github.com/typesense/typesense-go/v2/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api" ) // OverridesInterface is a type for Search Overrides API operations diff --git a/typesense/overrides_test.go b/typesense/overrides_test.go index 14318a0..649841a 100644 --- a/typesense/overrides_test.go +++ b/typesense/overrides_test.go @@ -6,12 +6,12 @@ import ( "net/http" "testing" - "github.com/typesense/typesense-go/v2/typesense/api/pointer" + "github.com/typesense/typesense-go/v3/typesense/api/pointer" "github.com/jinzhu/copier" "github.com/stretchr/testify/assert" - "github.com/typesense/typesense-go/v2/typesense/api" - "github.com/typesense/typesense-go/v2/typesense/mocks" + "github.com/typesense/typesense-go/v3/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/mocks" "go.uber.org/mock/gomock" ) diff --git a/typesense/preset.go b/typesense/preset.go index ecc519e..45c23ed 100644 --- a/typesense/preset.go +++ b/typesense/preset.go @@ -3,7 +3,7 @@ package typesense import ( "context" - "github.com/typesense/typesense-go/v2/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api" ) type PresetInterface interface { diff --git a/typesense/preset_test.go b/typesense/preset_test.go index bf3189d..f776559 100644 --- a/typesense/preset_test.go +++ b/typesense/preset_test.go @@ -6,8 +6,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/typesense/typesense-go/v2/typesense/api" - "github.com/typesense/typesense-go/v2/typesense/api/pointer" + "github.com/typesense/typesense-go/v3/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api/pointer" ) func TestPresetRetrieveAsSearchParameters(t *testing.T) { diff --git a/typesense/presets.go b/typesense/presets.go index b2d1074..df6f701 100644 --- a/typesense/presets.go +++ b/typesense/presets.go @@ -3,7 +3,7 @@ package typesense import ( "context" - "github.com/typesense/typesense-go/v2/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api" ) type PresetsInterface interface { diff --git a/typesense/presets_test.go b/typesense/presets_test.go index 98e3cb7..eab30ce 100644 --- a/typesense/presets_test.go +++ b/typesense/presets_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/typesense/typesense-go/v2/typesense/api" - "github.com/typesense/typesense-go/v2/typesense/api/pointer" + "github.com/typesense/typesense-go/v3/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api/pointer" ) func TestPresetsRetrieveAsSearchParameters(t *testing.T) { diff --git a/typesense/search_test.go b/typesense/search_test.go index de9ea65..bac406b 100644 --- a/typesense/search_test.go +++ b/typesense/search_test.go @@ -8,9 +8,9 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/typesense/typesense-go/v2/typesense/api" - "github.com/typesense/typesense-go/v2/typesense/api/pointer" - "github.com/typesense/typesense-go/v2/typesense/mocks" + "github.com/typesense/typesense-go/v3/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api/pointer" + "github.com/typesense/typesense-go/v3/typesense/mocks" "go.uber.org/mock/gomock" ) diff --git a/typesense/stats.go b/typesense/stats.go index 6a75412..61de910 100644 --- a/typesense/stats.go +++ b/typesense/stats.go @@ -3,7 +3,7 @@ package typesense import ( "context" - "github.com/typesense/typesense-go/v2/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api" ) type StatsInterface interface { diff --git a/typesense/stats_test.go b/typesense/stats_test.go index 2bf2409..bddb65d 100644 --- a/typesense/stats_test.go +++ b/typesense/stats_test.go @@ -6,8 +6,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/typesense/typesense-go/v2/typesense/api" - "github.com/typesense/typesense-go/v2/typesense/api/pointer" + "github.com/typesense/typesense-go/v3/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api/pointer" ) func TestStatsRetrieve(t *testing.T) { diff --git a/typesense/stopword.go b/typesense/stopword.go index b4e5a04..8c729a0 100644 --- a/typesense/stopword.go +++ b/typesense/stopword.go @@ -3,7 +3,7 @@ package typesense import ( "context" - "github.com/typesense/typesense-go/v2/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api" ) type StopwordInterface interface { diff --git a/typesense/stopword_test.go b/typesense/stopword_test.go index 73305f7..8716b58 100644 --- a/typesense/stopword_test.go +++ b/typesense/stopword_test.go @@ -6,8 +6,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/typesense/typesense-go/v2/typesense/api" - "github.com/typesense/typesense-go/v2/typesense/api/pointer" + "github.com/typesense/typesense-go/v3/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api/pointer" ) func TestStopwordRetrieve(t *testing.T) { diff --git a/typesense/stopwords.go b/typesense/stopwords.go index a687002..e10409e 100644 --- a/typesense/stopwords.go +++ b/typesense/stopwords.go @@ -3,7 +3,7 @@ package typesense import ( "context" - "github.com/typesense/typesense-go/v2/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api" ) type StopwordsInterface interface { diff --git a/typesense/stopwords_test.go b/typesense/stopwords_test.go index a835e6e..9e7a252 100644 --- a/typesense/stopwords_test.go +++ b/typesense/stopwords_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/typesense/typesense-go/v2/typesense/api" - "github.com/typesense/typesense-go/v2/typesense/api/pointer" + "github.com/typesense/typesense-go/v3/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api/pointer" ) func TestStopwordsRetrieve(t *testing.T) { diff --git a/typesense/synonym.go b/typesense/synonym.go index 98d5eeb..3236bd0 100644 --- a/typesense/synonym.go +++ b/typesense/synonym.go @@ -3,7 +3,7 @@ package typesense import ( "context" - "github.com/typesense/typesense-go/v2/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api" ) // SynonymInterface is a type for Search Synonym API operations diff --git a/typesense/synonym_test.go b/typesense/synonym_test.go index b5bb61a..eb591bb 100644 --- a/typesense/synonym_test.go +++ b/typesense/synonym_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/typesense/typesense-go/v2/typesense/api" - "github.com/typesense/typesense-go/v2/typesense/mocks" + "github.com/typesense/typesense-go/v3/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/mocks" "go.uber.org/mock/gomock" ) diff --git a/typesense/synonyms.go b/typesense/synonyms.go index 1e2bc8d..3d416ca 100644 --- a/typesense/synonyms.go +++ b/typesense/synonyms.go @@ -3,7 +3,7 @@ package typesense import ( "context" - "github.com/typesense/typesense-go/v2/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api" ) // SynonymsInterface is a type for Search Synonyms API operations diff --git a/typesense/synonyms_test.go b/typesense/synonyms_test.go index 7e98613..143a99b 100644 --- a/typesense/synonyms_test.go +++ b/typesense/synonyms_test.go @@ -6,12 +6,12 @@ import ( "net/http" "testing" - "github.com/typesense/typesense-go/v2/typesense/api/pointer" + "github.com/typesense/typesense-go/v3/typesense/api/pointer" "github.com/jinzhu/copier" "github.com/stretchr/testify/assert" - "github.com/typesense/typesense-go/v2/typesense/api" - "github.com/typesense/typesense-go/v2/typesense/mocks" + "github.com/typesense/typesense-go/v3/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/mocks" "go.uber.org/mock/gomock" ) diff --git a/typesense/test/alias_test.go b/typesense/test/alias_test.go index 6d4775e..f845733 100644 --- a/typesense/test/alias_test.go +++ b/typesense/test/alias_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/typesense/typesense-go/v2/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api" ) func TestCollectionAliasRetrieve(t *testing.T) { diff --git a/typesense/test/aliases_test.go b/typesense/test/aliases_test.go index bb25106..3e8e195 100644 --- a/typesense/test/aliases_test.go +++ b/typesense/test/aliases_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/typesense/typesense-go/v2/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api" ) func TestCollectionAliasUpsertNewAlias(t *testing.T) { diff --git a/typesense/test/analytics_events_test.go b/typesense/test/analytics_events_test.go index 905501b..26c84ec 100644 --- a/typesense/test/analytics_events_test.go +++ b/typesense/test/analytics_events_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/typesense/typesense-go/v2/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api" ) func TestAnalyticsEventsCreate(t *testing.T) { diff --git a/typesense/test/analytics_rules_test.go b/typesense/test/analytics_rules_test.go index 7f25cda..315ed8c 100644 --- a/typesense/test/analytics_rules_test.go +++ b/typesense/test/analytics_rules_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/typesense/typesense-go/v2/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api" ) func TestAnalyticsRulesUpsert(t *testing.T) { diff --git a/typesense/test/collection_test.go b/typesense/test/collection_test.go index 1e8f043..99f0bd6 100644 --- a/typesense/test/collection_test.go +++ b/typesense/test/collection_test.go @@ -8,8 +8,8 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/typesense/typesense-go/v2/typesense/api" - "github.com/typesense/typesense-go/v2/typesense/api/pointer" + "github.com/typesense/typesense-go/v3/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api/pointer" ) func TestCollectionRetrieve(t *testing.T) { diff --git a/typesense/test/collections_test.go b/typesense/test/collections_test.go index 4d63fda..4c23e4f 100644 --- a/typesense/test/collections_test.go +++ b/typesense/test/collections_test.go @@ -9,8 +9,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/typesense/typesense-go/v2/typesense/api" - "github.com/typesense/typesense-go/v2/typesense/api/pointer" + "github.com/typesense/typesense-go/v3/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api/pointer" ) func TestCollectionCreate(t *testing.T) { diff --git a/typesense/test/dbhelpers_test.go b/typesense/test/dbhelpers_test.go index 790118c..9ae860d 100644 --- a/typesense/test/dbhelpers_test.go +++ b/typesense/test/dbhelpers_test.go @@ -11,8 +11,8 @@ import ( "github.com/google/uuid" "github.com/stretchr/testify/require" - "github.com/typesense/typesense-go/v2/typesense/api" - "github.com/typesense/typesense-go/v2/typesense/api/pointer" + "github.com/typesense/typesense-go/v3/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api/pointer" ) func newUUIDName(namePrefix string) string { diff --git a/typesense/test/doc.go b/typesense/test/doc.go index 87b454a..db787a6 100644 --- a/typesense/test/doc.go +++ b/typesense/test/doc.go @@ -1,3 +1,3 @@ // Package test contains integration tests for the -// github.com/typesense/typesense-go/v2/typesense package. +// github.com/typesense/typesense-go/v3/typesense package. package test diff --git a/typesense/test/document_test.go b/typesense/test/document_test.go index 77516b9..4e09b26 100644 --- a/typesense/test/document_test.go +++ b/typesense/test/document_test.go @@ -8,8 +8,8 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/typesense/typesense-go/v2/typesense" - "github.com/typesense/typesense-go/v2/typesense/api" + "github.com/typesense/typesense-go/v3/typesense" + "github.com/typesense/typesense-go/v3/typesense/api" ) func TestDocumentRetrieveGeneric(t *testing.T) { diff --git a/typesense/test/documents_test.go b/typesense/test/documents_test.go index 53cb3e2..42ac622 100644 --- a/typesense/test/documents_test.go +++ b/typesense/test/documents_test.go @@ -10,8 +10,8 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/typesense/typesense-go/v2/typesense/api" - "github.com/typesense/typesense-go/v2/typesense/api/pointer" + "github.com/typesense/typesense-go/v3/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api/pointer" ) func TestDocumentCreate(t *testing.T) { diff --git a/typesense/test/import_test.go b/typesense/test/import_test.go index 9cb5d91..105ac77 100644 --- a/typesense/test/import_test.go +++ b/typesense/test/import_test.go @@ -10,8 +10,8 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/typesense/typesense-go/v2/typesense/api" - "github.com/typesense/typesense-go/v2/typesense/api/pointer" + "github.com/typesense/typesense-go/v3/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api/pointer" ) func TestDocumentsImport(t *testing.T) { diff --git a/typesense/test/keys_test.go b/typesense/test/keys_test.go index 0d12ba7..01aea62 100644 --- a/typesense/test/keys_test.go +++ b/typesense/test/keys_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/typesense/typesense-go/v2/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api" ) func TestKeyCreate(t *testing.T) { diff --git a/typesense/test/main_test.go b/typesense/test/main_test.go index b7dedd8..7098b2f 100644 --- a/typesense/test/main_test.go +++ b/typesense/test/main_test.go @@ -8,7 +8,7 @@ import ( "os" "testing" - "github.com/typesense/typesense-go/v2/typesense" + "github.com/typesense/typesense-go/v3/typesense" ) var typesenseClient *typesense.Client diff --git a/typesense/test/multi_search_test.go b/typesense/test/multi_search_test.go index bcc0811..d54f1eb 100644 --- a/typesense/test/multi_search_test.go +++ b/typesense/test/multi_search_test.go @@ -8,8 +8,8 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/typesense/typesense-go/v2/typesense/api" - "github.com/typesense/typesense-go/v2/typesense/api/pointer" + "github.com/typesense/typesense-go/v3/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api/pointer" ) func TestMultiSearch(t *testing.T) { diff --git a/typesense/test/overrides_test.go b/typesense/test/overrides_test.go index 54cb7a0..5749e93 100644 --- a/typesense/test/overrides_test.go +++ b/typesense/test/overrides_test.go @@ -9,8 +9,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/typesense/typesense-go/v2/typesense/api" - "github.com/typesense/typesense-go/v2/typesense/api/pointer" + "github.com/typesense/typesense-go/v3/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api/pointer" ) func TestSearchOverrideUpsertNewOverride(t *testing.T) { diff --git a/typesense/test/presets_test.go b/typesense/test/presets_test.go index ac999bb..e7a94d2 100644 --- a/typesense/test/presets_test.go +++ b/typesense/test/presets_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/typesense/typesense-go/v2/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api" ) func presetsCleanUp() { diff --git a/typesense/test/search_test.go b/typesense/test/search_test.go index 65aa3a4..5296844 100644 --- a/typesense/test/search_test.go +++ b/typesense/test/search_test.go @@ -8,8 +8,8 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/typesense/typesense-go/v2/typesense/api" - "github.com/typesense/typesense-go/v2/typesense/api/pointer" + "github.com/typesense/typesense-go/v3/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api/pointer" ) func TestCollectionSearch(t *testing.T) { diff --git a/typesense/test/setupdb_docker_test.go b/typesense/test/setupdb_docker_test.go index fd4118f..f1ad07f 100644 --- a/typesense/test/setupdb_docker_test.go +++ b/typesense/test/setupdb_docker_test.go @@ -13,8 +13,8 @@ import ( "github.com/testcontainers/testcontainers-go" "github.com/testcontainers/testcontainers-go/wait" - "github.com/typesense/typesense-go/v2/typesense" - "github.com/typesense/typesense-go/v2/typesense/api" + "github.com/typesense/typesense-go/v3/typesense" + "github.com/typesense/typesense-go/v3/typesense/api" ) var typesenseC testcontainers.Container diff --git a/typesense/test/setupdb_test.go b/typesense/test/setupdb_test.go index bb32089..d25e9f7 100644 --- a/typesense/test/setupdb_test.go +++ b/typesense/test/setupdb_test.go @@ -9,7 +9,7 @@ import ( "os" "time" - "github.com/typesense/typesense-go/v2/typesense" + "github.com/typesense/typesense-go/v3/typesense" ) func waitHealthyStatus(client *typesense.Client, timeout time.Duration) error { diff --git a/typesense/test/stopword_test.go b/typesense/test/stopword_test.go index b3cc382..ed28520 100644 --- a/typesense/test/stopword_test.go +++ b/typesense/test/stopword_test.go @@ -8,8 +8,8 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/typesense/typesense-go/v2/typesense/api" - "github.com/typesense/typesense-go/v2/typesense/api/pointer" + "github.com/typesense/typesense-go/v3/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api/pointer" ) func TestStopwordRetrieve(t *testing.T) { diff --git a/typesense/test/stopwords_test.go b/typesense/test/stopwords_test.go index adfec1e..0736aef 100644 --- a/typesense/test/stopwords_test.go +++ b/typesense/test/stopwords_test.go @@ -9,8 +9,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/typesense/typesense-go/v2/typesense/api" - "github.com/typesense/typesense-go/v2/typesense/api/pointer" + "github.com/typesense/typesense-go/v3/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api/pointer" ) func TestStopwordsUpsert(t *testing.T) { diff --git a/typesense/test/synonym_test.go b/typesense/test/synonym_test.go index 15da56a..173901d 100644 --- a/typesense/test/synonym_test.go +++ b/typesense/test/synonym_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/typesense/typesense-go/v2/typesense/api/pointer" + "github.com/typesense/typesense-go/v3/typesense/api/pointer" ) func TestSearchSynonymRetrieve(t *testing.T) { diff --git a/typesense/test/synonyms_test.go b/typesense/test/synonyms_test.go index 7e3a2e1..4230173 100644 --- a/typesense/test/synonyms_test.go +++ b/typesense/test/synonyms_test.go @@ -9,8 +9,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/typesense/typesense-go/v2/typesense/api" - "github.com/typesense/typesense-go/v2/typesense/api/pointer" + "github.com/typesense/typesense-go/v3/typesense/api" + "github.com/typesense/typesense-go/v3/typesense/api/pointer" ) func TestSearchSynonymUpsertNewSynonym(t *testing.T) {