Documentation
¶
Overview ¶
Package search answers the command palette (review 2026-11 FE-1): one call searches campaigns, contacts, automations, lists, segments, signup forms and website pages by name, five of a kind. A kind the caller's role can't open is never searched, so results never show what they can't open.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type SearchGroup ¶
type SearchGroup struct {
Kind string `json:"kind" enum:"campaigns,contacts,automations,lists,segments,forms,pages"`
Items []SearchHit `json:"items"`
}
SearchGroup is one kind's results.
type SearchHit ¶
type SearchHit struct {
ID string `json:"id"`
Title string `json:"title"`
// Status is the item's own status word (sent, draft, live…), for the
// web app to phrase.
Status string `json:"status,omitempty"`
// Detail is a secondary line that needs no translating: a contact's
// name, a form's kind.
Detail string `json:"detail,omitempty"`
// Channel is a campaign's channel (email, sms, push, whatsapp).
Channel string `json:"channel,omitempty"`
// Count is a campaign's recipients, a list's subscribed contacts or a
// segment's last count.
Count *int64 `json:"count,omitempty"`
At *time.Time `json:"at,omitempty" doc:"A campaign's start, or its scheduled time"`
// Slug is a page's address.
Slug string `json:"slug,omitempty"`
}
SearchHit is one result.
type SearchResults ¶
type SearchResults struct {
Query string `json:"query"`
Groups []SearchGroup `json:"groups"`
}
SearchResults is a search's answer, kinds in a fixed order, empty kinds left out.
Click to show internal directories.
Click to hide internal directories.