Documentation
¶
Index ¶
- type Client
- func (c *Client) Close() error
- func (c *Client) DeleteSkill(ctx context.Context, id string) error
- func (c *Client) EnsureIndex(ctx context.Context) error
- func (c *Client) Healthy(ctx context.Context) bool
- func (c *Client) IndexSkill(ctx context.Context, doc *SkillDocument) error
- func (c *Client) Search(ctx context.Context, query string, limit, offset int, sort []string, ...) (*SearchResult, error)
- type SearchResult
- type SkillDocument
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) DeleteSkill ¶
DeleteSkill removes a skill from the search index.
func (*Client) EnsureIndex ¶
EnsureIndex is a no-op for Bleve (index is created on New).
func (*Client) IndexSkill ¶
func (c *Client) IndexSkill(ctx context.Context, doc *SkillDocument) error
IndexSkill adds or updates a skill in the search index.
type SearchResult ¶
type SkillDocument ¶
type SkillDocument struct {
ID string `json:"id"`
Slug string `json:"slug"`
DisplayName string `json:"displayName"`
Summary string `json:"summary"`
SkillMdContent string `json:"skillMdContent"`
Tags []string `json:"tags"`
OwnerHandle string `json:"ownerHandle"`
OwnerHandleExact string `json:"ownerHandleExact"`
ModerationStatus string `json:"moderationStatus"`
IsSuspicious bool `json:"isSuspicious"`
IsDeleted bool `json:"isDeleted"`
Downloads int64 `json:"downloads"`
Stars int `json:"stars"`
UpdatedAt int64 `json:"updatedAt"`
CreatedAt int64 `json:"createdAt"`
}
Click to show internal directories.
Click to hide internal directories.