Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrMissingApplicationID is returned when the application id is missing ErrMissingApplicationID = errors.New("missing application id") // ErrMissingAPIKey is returned when the api key is missing ErrMissingAPIKey = errors.New("missing api key") // ErrMissingIndexName is returned when the index name is missing ErrMissingIndexName = errors.New("missing index name") // ErrMissingObjectID is returned when the object id is missing ErrMissingObjectID = errors.New("missing object id") // ErrMissingTelemetrySDK is returned when the telemetry sdk is missing ErrMissingTelemetrySDK = errors.New("missing telemetry sdk") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the handler for algolia search
type Config ¶
type Config struct {
// ApplicationID is the algolia application id
ApplicationID string
// APIKey is the algolia api key
APIKey string
// IndexName is the name of the index to use
IndexName string
// TelemetrySDK is the telemetry sdk
TelemetrySDK *instrumentation.Client
}
Config is the configuration for the algolia search handler
type IClient ¶
type IClient interface {
// Sends a piece of data to algolia search
Send(ctx context.Context, data Record) (*string, error)
// Deletes a piece of data from algolia search
Delete(ctx context.Context, objectId string) error
// Update updates a piece of data in algolia search
Update(ctx context.Context, record Record) error
// contains filtered or unexported methods
}
IClient is the interface for the algolia search handler
type Option ¶
type Option func(*Config)
Option is a function that configures the algolia search handler
func WithAlgoliaSearchAPIKey ¶
WithAlgoliaSearchAPIKey sets the api key for the algolia search handler
func WithAlgoliaSearchApplicationID ¶
WithAlgoliaSearchApplicationID sets the application id for the algolia search handler
func WithAlgoliaSearchIndexName ¶
WithAlgoliaSearchIndexName sets the index name for the algolia search handler
func WithAlgoliaSearchTelemetrySDK ¶
func WithAlgoliaSearchTelemetrySDK(sdk *instrumentation.Client) Option
WithAlgoliaSearchTelemetrySDK sets the telemetry sdk for the algolia search handler
Click to show internal directories.
Click to hide internal directories.