Documentation
¶
Overview ¶
Package search 基于 meilisearch 提供搜索功能
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { Handler OnSubjectUpdate(ctx context.Context, id model.SubjectID) error Close() OnSubjectDelete(ctx context.Context, id model.SubjectID) error }
func New ¶
func New( cfg config.AppConfig, subjectRepo subject.Repo, log *zap.Logger, query *query.Query, registerer prometheus.Registerer, ) (Client, error)
New provide a search app is AppConfig.MeiliSearchURL is empty string, return nope search client.
see `MeiliSearchURL` and `MeiliSearchKey` in config.AppConfig.
type NoopClient ¶
type NoopClient struct { }
func (NoopClient) Close ¶ added in v0.29.10
func (n NoopClient) Close()
func (NoopClient) Handle ¶
func (n NoopClient) Handle(ctx *fiber.Ctx, auth *accessor.Accessor) error
func (NoopClient) OnSubjectDelete ¶
func (NoopClient) OnSubjectUpdate ¶
Click to show internal directories.
Click to hide internal directories.