Documentation
¶
Overview ¶
Package dependents finds what uses a custom field or a segment before it is deleted (review 2026-11 AU-11): segments, forms, scoring rules, automations, campaigns not sent yet (with their SMS, push and WhatsApp content), digests, saved views, transactional templates and Liquid in their content (AU-18). A form's confirmation email is built from its branding and the contact's first name only, so it names no custom field. It reads each kind once and matches in memory, so a page listing every field asks a handful of queries. It also finds the campaigns, automation emails and templates that show a discount code pool's codes (Coupon, M59).
Index ¶
Constants ¶
const ( KindSegment = "segment" KindForm = "form" KindScoring = "scoring" KindAutomation = "automation" KindCampaign = "campaign" KindDigest = "digest" KindView = "view" // KindTransactional is a transactional template, its draft or live // version (review 2026-11 AU-18). KindTransactional = "transactional" // KindTemplate is a saved template or section: only Coupon lists them // (the discount code pool's page has its own kinds). KindTemplate = "template" )
Kinds of users.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Index ¶
type Index struct {
// contains filtered or unexported fields
}
Index holds a workspace's candidates.
func Load ¶
Load reads the workspace's segments, forms, scoring rules, automations, unsent campaigns, digests, saved views and transactional templates. A row's deleted_at, where the table has one, leaves it out.
type Use ¶
type Use struct {
Kind string `json:"kind" enum:"segment,form,scoring,automation,campaign,digest,view,transactional"`
ID string `json:"id"`
Name string `json:"name"`
}
Use is one thing that would stop working without the field or segment.