fix(deps): update module github.com/typesense/typesense-go to v1 #1675
4
go.mod
4
go.mod
|
@ -61,7 +61,7 @@ require (
|
|||
github.com/stretchr/testify v1.8.4
|
||||
github.com/swaggo/swag v1.16.2
|
||||
github.com/tkuchiki/go-timezone v0.2.2
|
||||
github.com/typesense/typesense-go v0.9.0
|
||||
github.com/typesense/typesense-go v1.0.0
|
||||
github.com/ulule/limiter/v3 v3.11.2
|
||||
github.com/wneessen/go-mail v0.4.0
|
||||
github.com/yuin/goldmark v1.6.0
|
||||
|
@ -74,6 +74,7 @@ require (
|
|||
golang.org/x/text v0.14.0
|
||||
gopkg.in/d4l3k/messagediff.v1 v1.2.1
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
mvdan.cc/xurls/v2 v2.5.0
|
||||
src.techknowlogick.com/xgo v1.7.1-0.20231205202227-c7ed78300ce9
|
||||
src.techknowlogick.com/xormigrate v1.7.1
|
||||
xorm.io/builder v0.3.13
|
||||
|
@ -178,7 +179,6 @@ require (
|
|||
google.golang.org/protobuf v1.31.0 // indirect
|
||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
mvdan.cc/xurls/v2 v2.5.0 // indirect
|
||||
sigs.k8s.io/yaml v1.3.0 // indirect
|
||||
)
|
||||
|
||||
|
|
2
go.sum
2
go.sum
|
@ -493,6 +493,8 @@ github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS
|
|||
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
|
||||
github.com/typesense/typesense-go v0.9.0 h1:V1sk0QN6jHevHHiV3GZyL6aIb6Oa8QsmyXRUYJj2Zfg=
|
||||
github.com/typesense/typesense-go v0.9.0/go.mod h1:4mq4FYHzU7csU/KHaZoyG2bCSKl7GrCeyAr2YhXT1/0=
|
||||
github.com/typesense/typesense-go v1.0.0 h1:/8Lr1yf9YjmUKdn/xbTNy+OhwOvBd0noBTRkcB22Uhw=
|
||||
github.com/typesense/typesense-go v1.0.0/go.mod h1:4mq4FYHzU7csU/KHaZoyG2bCSKl7GrCeyAr2YhXT1/0=
|
||||
github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU=
|
||||
github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
|
||||
github.com/ulule/limiter/v3 v3.11.2 h1:P4yOrxoEMJbOTfRJR2OzjL90oflzYPPmWg+dvwN2tHA=
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
package models
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"strconv"
|
||||
"time"
|
||||
|
@ -526,7 +527,7 @@ func (s *RemoveTaskFromTypesense) Handle(msg *message.Message) (err error) {
|
|||
_, err = typesenseClient.
|
||||
Collection("tasks").
|
||||
Document(strconv.FormatInt(event.Task.ID, 10)).
|
||||
Delete()
|
||||
Delete(context.Background())
|
||||
return err
|
||||
}
|
||||
|
||||
|
@ -558,7 +559,7 @@ func (l *AddTaskToTypesense) Handle(msg *message.Message) (err error) {
|
|||
|
||||
_, err = typesenseClient.Collection("tasks").
|
||||
Documents().
|
||||
Create(ttask)
|
||||
Create(context.Background(), ttask)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
package models
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
@ -411,7 +412,7 @@ func (t *typesenseTaskSearcher) Search(opts *taskSearchOptions) (tasks []*Task,
|
|||
|
||||
result, err := typesenseClient.Collection("tasks").
|
||||
Documents().
|
||||
Search(params)
|
||||
Search(context.Background(), params)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
package models
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
|
@ -195,9 +196,9 @@ func CreateTypesenseCollections() error {
|
|||
}
|
||||
|
||||
// delete any collection which might exist
|
||||
_, _ = typesenseClient.Collection("tasks").Delete()
|
||||
_, _ = typesenseClient.Collection("tasks").Delete(context.Background())
|
||||
|
||||
_, err := typesenseClient.Collections().Create(taskSchema)
|
||||
_, err := typesenseClient.Collections().Create(context.Background(), taskSchema)
|
||||
return err
|
||||
}
|
||||
|
||||
|
@ -304,7 +305,7 @@ func reindexTasks(s *xorm.Session, tasks map[int64]*Task) (err error) {
|
|||
|
||||
_, err = typesenseClient.Collection("tasks").
|
||||
Documents().
|
||||
Import(typesenseTasks, &api.ImportDocumentsParams{
|
||||
Import(context.Background(), typesenseTasks, &api.ImportDocumentsParams{
|
||||
Action: pointer.String("upsert"),
|
||||
BatchSize: pointer.Int(100),
|
||||
})
|
||||
|
@ -381,14 +382,14 @@ func indexDummyTask() (err error) {
|
|||
|
||||
_, err = typesenseClient.Collection("tasks").
|
||||
Documents().
|
||||
Create(dummyTask)
|
||||
Create(context.Background(), dummyTask)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
_, err = typesenseClient.Collection("tasks").
|
||||
Document(dummyTask.ID).
|
||||
Delete()
|
||||
Delete(context.Background())
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue