Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module github.com/typesense/typesense-go/v4

go 1.22

toolchain go1.23.5
go 1.24.0

require (
github.com/google/uuid v1.6.0
Expand Down Expand Up @@ -56,12 +54,12 @@ require (
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.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
golang.org/x/mod v0.31.0 // indirect
golang.org/x/net v0.48.0 // indirect
golang.org/x/sync v0.19.0 // indirect
golang.org/x/sys v0.39.0 // indirect
golang.org/x/text v0.32.0 // indirect
golang.org/x/tools v0.40.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
Expand Down
12 changes: 12 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,8 @@ 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.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0=
golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.31.0 h1:HaW9xtz0+kOcWKwli0ZXy79Ix+UW/vOfmWI5QVd2tgI=
golang.org/x/mod v0.31.0/go.mod h1:43JraMp9cGx1Rx3AqioxrbrhNsLl2l/iNAvuBkrezpg=
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=
Expand Down Expand Up @@ -846,6 +848,8 @@ golang.org/x/net v0.0.0-20211108170745-6635138e15ea/go.mod h1:9nx3DQGgdP8bBQD5qx
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/net v0.48.0 h1:zyQRTTrjc33Lhh0fBgT/H3oZq9WuvRR5gPC70xpDiQU=
golang.org/x/net v0.48.0/go.mod h1:+ndRgGjkh8FGtu1w1FGbEC31if4VrNVMuKTgcAAnQRY=
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=
Expand All @@ -864,6 +868,8 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4=
golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
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=
Expand Down Expand Up @@ -939,6 +945,8 @@ golang.org/x/sys v0.0.0-20211109184856-51b60fd695b3/go.mod h1:oPkhp1MJrh7nUepCBc
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/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk=
golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
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=
Expand All @@ -952,6 +960,8 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
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/text v0.32.0 h1:ZD01bjUt1FQ9WJ0ClOL5vxgxOI/sVCNgX1YtKwcY0mU=
golang.org/x/text v0.32.0/go.mod h1:o/rUWzghvpD5TXrTIBuJU77MTaN0ljMWE47kxGJQ7jY=
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=
Expand Down Expand Up @@ -1007,6 +1017,8 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f
golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
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/tools v0.40.0 h1:yLkxfA+Qnul4cs9QA3KnlFu0lVmd8JJfoq+E41uSutA=
golang.org/x/tools v0.40.0/go.mod h1:Ik/tzLRlbscWpqqMRjyWYDisX8bG13FrdXp3o4Sr9lc=
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=
Expand Down
2 changes: 1 addition & 1 deletion typesense/analytics_rule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
func TestAnalyticsRuleRetrieve(t *testing.T) {
expectedData := &api.AnalyticsRule{
Name: "test_rule",
Type: api.AnalyticsRuleTypeCounter,
Type: api.Counter,
Collection: "test_collection",
EventType: "click",
Params: &api.AnalyticsRuleCreateParams{
Expand Down
6 changes: 3 additions & 3 deletions typesense/analytics_rules_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func TestAnalyticsRulesRetrieve(t *testing.T) {
expectedData := []*api.AnalyticsRule{
{
Name: "test_rule_1",
Type: api.AnalyticsRuleTypeCounter,
Type: api.Counter,
Collection: "test_collection",
EventType: "click",
Params: &api.AnalyticsRuleCreateParams{
Expand Down Expand Up @@ -54,7 +54,7 @@ func TestAnalyticsRulesCreate(t *testing.T) {
createData := []*api.AnalyticsRuleCreate{
{
Name: "test_rule",
Type: api.AnalyticsRuleCreateTypeCounter,
Type: api.Counter,
Collection: "test_collection",
EventType: "click",
Params: &api.AnalyticsRuleCreateParams{
Expand All @@ -67,7 +67,7 @@ func TestAnalyticsRulesCreate(t *testing.T) {
expectedData := []*api.AnalyticsRule{
{
Name: "test_rule",
Type: api.AnalyticsRuleTypeCounter,
Type: api.Counter,
Collection: "test_collection",
EventType: "click",
Params: &api.AnalyticsRuleCreateParams{
Expand Down
8 changes: 4 additions & 4 deletions typesense/api/client_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

87 changes: 66 additions & 21 deletions typesense/api/generator/generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,7 @@ components:
rule_tag:
type: string
type:
enum:
- popular_queries
- nohits_queries
- counter
- log
type: string
$ref: '#/components/schemas/AnalyticsRuleType'
required:
- name
- type
Expand All @@ -157,6 +152,13 @@ components:
weight:
type: integer
type: object
AnalyticsRuleType:
enum:
- popular_queries
- nohits_queries
- counter
- log
type: string
AnalyticsRuleUpdate:
description: Fields allowed to update on an analytics rule
properties:
Expand Down Expand Up @@ -607,8 +609,6 @@ components:
required:
- name
type: object
CurationSetRetrieveSchema:
$ref: '#/components/schemas/CurationSetCreateSchema'
CurationSetSchema:
allOf:
- $ref: '#/components/schemas/CurationSetCreateSchema'
Expand Down Expand Up @@ -672,6 +672,10 @@ components:
type: object
Field:
properties:
async_reference:
description: |
Allow documents to be indexed successfully even when the referenced document doesn't exist yet.
type: boolean
drop:
example: true
type: boolean
Expand Down Expand Up @@ -1071,14 +1075,51 @@ components:
properties:
conversation:
$ref: '#/components/schemas/SearchResultConversation'
results:
facet_counts:
items:
$ref: '#/components/schemas/MultiSearchResultItem'
$ref: '#/components/schemas/FacetCounts'
type: array
found:
description: The number of documents found
type: integer
found_docs:
type: integer
grouped_hits:
items:
$ref: '#/components/schemas/SearchGroupedHit'
type: array
hits:
description: The documents that matched the search query
items:
$ref: '#/components/schemas/SearchResultHit'
type: array
metadata:
additionalProperties: true
description: Custom JSON object that can be returned in the search response
type: object
out_of:
description: The total number of documents in the collection
type: integer
page:
description: The search result page number
type: integer
request_params:
$ref: '#/components/schemas/SearchRequestParams'
results:
items:
$ref: '#/components/schemas/MultiSearchResultItem'
type: array
search_cutoff:
description: Whether the search was cut off
type: boolean
search_time_ms:
description: The number of milliseconds the search took
type: integer
union_request_params:
description: Returned only for union query response.
items:
$ref: '#/components/schemas/SearchRequestParams'
type: array
required:
- results
type: object
Expand Down Expand Up @@ -1867,10 +1908,17 @@ components:
- id
type: object
SynonymItemSchema:
allOf:
- properties:
id:
description: Unique identifier for the synonym item
type: string
required:
- id
type: object
- $ref: '#/components/schemas/SynonymItemUpsertSchema'
SynonymItemUpsertSchema:
properties:
id:
description: Unique identifier for the synonym item
type: string
locale:
description: Locale for the synonym, leave blank to use the standard tokenizer
type: string
Expand All @@ -1888,7 +1936,6 @@ components:
type: string
type: array
required:
- id
- synonyms
type: object
SynonymSetCreateSchema:
Expand All @@ -1909,8 +1956,6 @@ components:
required:
- name
type: object
SynonymSetRetrieveSchema:
$ref: '#/components/schemas/SynonymSetCreateSchema'
SynonymSetSchema:
allOf:
- $ref: '#/components/schemas/SynonymSetCreateSchema'
Expand Down Expand Up @@ -2183,7 +2228,7 @@ paths:
oneOf:
- $ref: '#/components/schemas/AnalyticsRule'
- items:
anyOf:
oneOf:
- $ref: '#/components/schemas/AnalyticsRule'
- properties:
error:
Expand Down Expand Up @@ -3166,7 +3211,7 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/SuccessStatus'
description: Compacting the on-disk database succeeded.
description: Toggle Slow Request Log database succeeded.
summary: Toggle Slow Request Log
tags:
- operations
Expand Down Expand Up @@ -3337,7 +3382,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/CurationSetRetrieveSchema'
$ref: '#/components/schemas/CurationSetSchema'
description: Curation set fetched
"404":
content:
Expand Down Expand Up @@ -4561,7 +4606,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/SynonymSetRetrieveSchema'
$ref: '#/components/schemas/SynonymSetSchema'
description: Synonym set fetched
"404":
content:
Expand Down Expand Up @@ -4719,7 +4764,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/SynonymItemSchema'
$ref: '#/components/schemas/SynonymItemUpsertSchema'
description: The synonym item to be created/updated
required: true
responses:
Expand Down
Loading