search added
This commit is contained in:
@@ -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}
|
||||
}
|
||||
Reference in New Issue
Block a user