search added

This commit is contained in:
Krispire Admin
2026-05-10 20:41:40 +05:30
parent b58c8d00fc
commit 76a144e1ea
8 changed files with 1787 additions and 24 deletions
+19
View File
@@ -0,0 +1,19 @@
package repository
import (
"github.com/typesense/typesense-go/v2/typesense"
)
// TypesenseClient wraps the Typesense client for search operations.
type TypesenseClient struct {
Client *typesense.Client
}
// NewTypesenseClient creates a new Typesense client with the given URL and API key.
func NewTypesenseClient(url, apiKey string) *TypesenseClient {
client := typesense.NewClient(
typesense.WithServer(url),
typesense.WithAPIKey(apiKey),
)
return &TypesenseClient{Client: client}
}