Versions in this module Expand all Collapse all v1 v1.6.0 Nov 11, 2026 v1.5.0 Nov 10, 2026 v1.4.0 Nov 4, 2026 v1.3.1 Nov 3, 2026 v1.3.0 Nov 3, 2026 v1.2.0 Oct 30, 2026 v1.1.0 Oct 25, 2026 v1.0.1 Oct 24, 2026 v1.0.0 Oct 24, 2026 Changes in this version + const ArchivePageSize + const FieldCompany + const FieldEmail + const FieldFirstName + const FieldLastName + const KindEmbedded + const KindHosted + const KindPopup + const MaxLogoBytes + const OutcomeChallenge + const OutcomeClosed + const OutcomeConfirm + const OutcomeError + const OutcomeInvalid + const OutcomeRateLimited + const OutcomeRejected + const OutcomeSubscribed + const StatusDraft + const StatusLive + const StatusPaused + const TurnstileOrigin + const TurnstileScript + var EmbedCSSVersion = func() string { ... }() + var SiteverifyURL = "https://challenges.cloudflare.com/turnstile/v0/siteverify" + func ConfirmationEmail(b Branding, firstName string, lists []string, link string, reminder bool) mailer.Message + func Contrast(a, b rgb) float64 + func DefaultConsentText(publisher string) string + func EmbedCSS() []byte + func EmbedScript(c Config, links PageLinks, b Branding, lists []audience.PublicList, ...) []byte + func Excerpt(text string, n int) string + func FieldLabel(f fieldDoc, customs []store.CustomField) string + func FieldName(key string) string + func IsNoSystemMail(err error) bool + func IssueLabel(name string) string + func NormalizeOrigin(raw string) (string, bool) + func OriginAllowed(host string, allowed, own []string) bool + func OriginHost(origin, referer string) string + func ParseColor(s string) (rgb, bool) + func PlainHTML(c Config, links PageLinks, lists []audience.PublicList, ...) string + func PrivacyPolicyIndex(text string) int + func Register(h huma.API, s *Service) + func RegisterJobs(reg *jobs.Registry, s *Service) + func RenderTitle(subject string) string + func Slugify(name string, max int) string + type ArchiveEntry struct + CampaignID uuid.UUID + Excerpt string + ExcerptOverride string + Hidden bool + Label string + ListID *uuid.UUID + ListName string + SentAt time.Time + Slug string + Subject string + Title string + TitleOverride string + UpdatedAt time.Time + type ArchiveIssueInput struct + Excerpt string + Hidden bool + Label string + ListID string + Title string + type ArchiveIssueItem struct + CampaignID string + Excerpt string + ExcerptOverride string + Hidden bool + Label string + ListID string + ListName string + SentAt time.Time + Slug string + Subject string + Title string + TitleOverride string + URL string + type ArchiveIssuePage struct + Issues []ArchiveIssueItem + Lists []ArchiveListCount + Page int + PageSize int + Published int64 + Total int64 + type ArchiveListCount struct + Issues int64 + ListID string + Name string + type ArchivePage struct + Enabled bool + Index bool + Lists []string + SubscribeBox bool + type ArchiveQuery struct + IncludeHidden bool + List *uuid.UUID + Page int + PageSize int + Search string + type Branding struct + CustomFontFamily string + CustomFontURL string + Font string + Logo *logoMeta + Palette Palette + PoweredBy bool + PrivacyURL string + PublisherName string + func (b Branding) FontFace() string + func (b Branding) FontOrigin() string + func (b Branding) FontStack() string + func (b Branding) Initial() string + type ChallengeForm func(ctx context.Context, formID string, builtin bool) (Config, error) + type Config struct + AfterSubmit string + AllowedOrigins []string + Builtin bool + ConsentText string + ConsentVersion int + Content contentDoc + DefaultLists []uuid.UUID + DoubleOptIn bool + Fields []fieldDoc + ID uuid.UUID + Kind string + ListChoice bool + Lists []uuid.UUID + Name string + PublicID string + RedirectURL string + Slug string + Spam spamDoc + Status string + WorkspaceID uuid.UUID + func BuiltinForm(ws *store.Workspace, publisher string, lists []audience.PublicList) Config + func ConfigOf(f store.Form) Config + func (c Config) ConsentVersionLabel() string + func (c Config) Field(key string) (fieldDoc, bool) + func (c Config) HasField(key string) bool + func (c Config) Source() string + type ConfirmPage struct + InboxTip bool + ListText map[string]string + OfferText map[string]string + type ConfirmationsArgs struct + func (ConfirmationsArgs) InsertOpts() river.InsertOpts + func (ConfirmationsArgs) Kind() string + type ConfirmationsWorker struct + S *Service + func (w *ConfirmationsWorker) Work(ctx context.Context, _ *river.Job[ConfirmationsArgs]) error + type DomainsArgs struct + func (DomainsArgs) InsertOpts() river.InsertOpts + func (DomainsArgs) Kind() string + type DomainsWorker struct + S *Service + func (w *DomainsWorker) Work(ctx context.Context, _ *river.Job[DomainsArgs]) error + type FormPath struct + Form string + type Outcome struct + ChallengeID string + Email string + Errors map[string]string + FirstName string + Lists []uuid.UUID + Message string + RedirectURL string + Status string + type PageLinks struct + Custom bool + func LinksOn(origin, slug string, custom bool) PageLinks + func (l PageLinks) Archive() string + func (l PageLinks) Challenge() string + func (l PageLinks) Confirm(token string) string + func (l PageLinks) Feed() string + func (l PageLinks) FormSession(publicID string) string + func (l PageLinks) Home() string + func (l PageLinks) Issue(slug string) string + func (l PageLinks) Logo(version string) string + func (l PageLinks) Origin() string + func (l PageLinks) PlainAction(slug string) string + func (l PageLinks) Preferences(token string) string + func (l PageLinks) PreferencesRequest() string + func (l PageLinks) Script(publicID string) string + func (l PageLinks) Sitemap() string + func (l PageLinks) Static(file string) string + func (l PageLinks) Submit(publicID string) string + func (l PageLinks) Subscribe(form string) string + func (l PageLinks) Theme(version string) string + func (l PageLinks) TurnstileError() string + func (l PageLinks) Unsubscribe(token string) string + func (l PageLinks) View(token string) string + type Pages struct + Archive ArchivePage + Confirm ConfirmPage + Preferences PreferencesPage + PreviewEmail string + Subscribe SubscribePage + Unsubscribe UnsubscribePage + type Palette struct + Accent string + Background string + Hover string + Notes []string + OnAccent string + Soft string + Text string + func DerivePalette(accent, background string) (Palette, error) + type PreferencesPage struct + FirstName bool + Frequency bool + ListText map[string]string + Lists []string + Pause bool + type PublicBranding struct + Accent string + AccentHover string + AccentSoft string + AccentText string + Background string + CustomFontFamily string + CustomFontURL string + Font string + Initial string + Logo *PublicBrandingLogo + Notes []string + OnAccent string + PoweredBy bool + PrivacyURL string + PublisherName string + type PublicBrandingInput struct + Accent string + Background string + CustomFontFamily string + CustomFontURL string + Font string + PoweredBy bool + PrivacyURL string + PublisherName string + type PublicBrandingLogo struct + Name string + Type string + URL string + type PublicCustomDomain struct + CheckedAt *time.Time + Detail string + Domain string + Status string + TXTName string + TXTValue string + Target string + VerifiedAt *time.Time + type PublicDomainInput struct + Domain string + type PublicPageInput struct + Archive *ArchivePage + Confirm *ConfirmPage + HostedFormID *string + Preferences *PreferencesPage + PreviewEmail *string + Subscribe *SubscribePage + Unsubscribe *UnsubscribePage + type PublicPageList struct + Description string + ID string + Name string + Public bool + Subscribed int64 + type PublicPageURLs struct + Archive string + Feed string + Preferences string + Sitemap string + Subscribe string + type PublicPagesSettings struct + Branding PublicBranding + Domain PublicCustomDomain + Forms []SignupFormSummary + HostedFormID string + Lists []PublicPageList + Pages Pages + SenderEmail string + Turnstile PublicTurnstile + URLs PublicPageURLs + UpdatedAt time.Time + type PublicTurnstile struct + CheckedAt *time.Time + Error string + HasSecret bool + SiteKey string + Status string + type PublicTurnstileInput struct + Secret string + SiteKey string + type Service struct + Audience *audience.Service + Audit *audit.Logger + Box *secrets.Box + DNS dnscheck.Resolver + Log *slog.Logger + Mail func() mailer.Sender + Now func() time.Time + Pool *pgxpool.Pool + Q *store.Queries + Tokens *linktoken.Signer + Turnstile *Turnstile + URLs publicurl.Builder + func (s *Service) Allow(key string, every time.Duration) bool + func (s *Service) AllowOrigin(ctx context.Context, ws *store.Workspace, id string, in SignupFormOriginInput) (SignupForm, error) + func (s *Service) AllowPerMinute(key string, n int) bool + func (s *Service) Archive(ctx context.Context, ws *store.Workspace, set *Settings, aq ArchiveQuery) ([]ArchiveEntry, int64, error) + func (s *Service) ArchiveIssues(ctx context.Context, ws *store.Workspace, search, list string, page int) (ArchiveIssuePage, error) + func (s *Service) ArchiveLists(ctx context.Context, q *store.Queries, ws *store.Workspace, set *Settings) ([]uuid.UUID, error) + func (s *Service) CheckDomain(ctx context.Context, ws *store.Workspace) (PublicPagesSettings, error) + func (s *Service) Confirm(ctx context.Context, ws *store.Workspace, contactID uuid.UUID, ...) (audience.ConfirmResult, error) + func (s *Service) ConfirmURL(ws *store.Workspace, contactID uuid.UUID) string + func (s *Service) Create(ctx context.Context, ws *store.Workspace, in SignupFormCreateInput) (SignupForm, error) + func (s *Service) Delete(ctx context.Context, ws *store.Workspace, id string) error + func (s *Service) FormToken(formKey string, at time.Time) string + func (s *Service) Get(ctx context.Context, ws *store.Workspace, id string) (SignupForm, error) + func (s *Service) HostVerified(ctx context.Context, host string) bool + func (s *Service) KeepBlocked(ctx context.Context, ws *store.Workspace, id string, in SignupFormOriginInput) (SignupForm, error) + func (s *Service) Links(ws *store.Workspace, set *Settings) PageLinks + func (s *Service) LoadSettings(ctx context.Context, ws *store.Workspace) (*Settings, error) + func (s *Service) Logo(ctx context.Context, ws *store.Workspace) ([]byte, string, time.Time, error) + func (s *Service) Overview(ctx context.Context, ws *store.Workspace) (SignupFormsOverview, error) + func (s *Service) OwnOrigins(set *Settings) []string + func (s *Service) PublicPages(ctx context.Context, ws *store.Workspace) (PublicPagesSettings, error) + func (s *Service) RecordView(ctx context.Context, ws *store.Workspace, c Config, userAgent string) + func (s *Service) RemoveLogo(ctx context.Context, ws *store.Workspace) (PublicPagesSettings, error) + func (s *Service) RemoveTurnstile(ctx context.Context, ws *store.Workspace) (PublicPagesSettings, error) + func (s *Service) Rename(ctx context.Context, ws *store.Workspace, id string, in SignupFormRenameInput) (SignupForm, error) + func (s *Service) ReportTurnstileError(ctx context.Context, ws *store.Workspace, challengeID, code string) error + func (s *Service) RunConfirmations(ctx context.Context) error + func (s *Service) SaveBranding(ctx context.Context, ws *store.Workspace, in PublicBrandingInput) (PublicPagesSettings, error) + func (s *Service) SavePage(ctx context.Context, ws *store.Workspace, in PublicPageInput) (PublicPagesSettings, error) + func (s *Service) SaveTurnstile(ctx context.Context, ws *store.Workspace, in PublicTurnstileInput) (PublicPagesSettings, error) + func (s *Service) SendPreferenceLink(ctx context.Context, ws *store.Workspace, set *Settings, contactID uuid.UUID) error + func (s *Service) SetDomain(ctx context.Context, ws *store.Workspace, in PublicDomainInput) (PublicPagesSettings, error) + func (s *Service) SetStatus(ctx context.Context, ws *store.Workspace, id string, in SignupFormStatusInput) (SignupForm, error) + func (s *Service) SolveChallenge(ctx context.Context, ws *store.Workspace, set *Settings, ...) Outcome + func (s *Service) Submit(ctx context.Context, ws *store.Workspace, set *Settings, c Config, ...) Outcome + func (s *Service) SyncArchive(ctx context.Context, ws *store.Workspace, set *Settings) error + func (s *Service) SystemMailAvailable(ctx context.Context, ws *store.Workspace) bool + func (s *Service) UnsubscribeNumbers(ctx context.Context, ws *store.Workspace) (UnsubscribeStats, error) + func (s *Service) Update(ctx context.Context, ws *store.Workspace, id string, in SignupFormInput) (SignupForm, error) + func (s *Service) UpdateArchiveIssue(ctx context.Context, ws *store.Workspace, campaignID string, ...) (ArchiveIssueItem, error) + func (s *Service) UploadLogo(ctx context.Context, ws *store.Workspace, name string, data []byte) (PublicPagesSettings, error) + func (s *Service) Waiting(ctx context.Context, ws *store.Workspace, id string) (SignupFormWaiting, error) + func (s *Service) WaitingLink(ctx context.Context, ws *store.Workspace, formID, submissionID string) (SignupFormConfirmLink, error) + func (s *Service) WithDraft(ctx context.Context, set *Settings, in PublicPageInput) (*Settings, error) + func (s *Service) WorkspaceForHost(ctx context.Context, host string) string + type Settings struct + Branding Branding + Pages Pages + Workspace *store.Workspace + func (s *Settings) CustomDomain() string + func (s *Settings) HostedFormID() *uuid.UUID + func (s *Settings) LogoVersion() string + func (s *Settings) TurnstileSiteKey() string + func (s *Settings) UpdatedAt() time.Time + type SignupForm struct + AfterSubmit string + AllowedOrigins []string + BlockedOrigins []SignupFormBlockedOrigin + ConsentText string + ConsentVersion int + Content SignupFormContent + DefaultListIDs []string + DoubleOptIn bool + Fields []SignupFormField + ListChoice bool + ListIDs []string + PlainHTML string + PublishedAt *time.Time + RedirectURL string + Spam SignupFormSpam + Stats SignupFormStats + URLs SignupFormURLs + UpdatedAt time.Time + Waiting int64 + type SignupFormBlockedOrigin struct + Count int64 + LastAt time.Time + Origin string + type SignupFormConfirmLink struct + Email string + URL string + type SignupFormContent struct + Button string + Description string + EmailPlaceholder string + Footnote string + Heading string + ListsLabel string + NamePlaceholder string + PopupDelay int + PopupRepeatDays int + PopupScroll int + type SignupFormCreateInput struct + Kind string + Name string + type SignupFormCustomField struct + Key string + Label string + Options []string + Type string + type SignupFormField struct + Key string + Label string + Required bool + type SignupFormInput struct + AfterSubmit string + AllowedOrigins []string + ConsentText string + Content SignupFormContent + DefaultListIDs []string + DoubleOptIn bool + Fields []SignupFormField + Kind string + ListChoice bool + ListIDs []string + Name string + Publish bool + RedirectURL string + Spam SignupFormSpam + type SignupFormList struct + Description string + ID string + Name string + Public bool + Subscribed int64 + type SignupFormOriginInput struct + Origin string + type SignupFormRenameInput struct + Name string + type SignupFormSpam struct + BlockDisposable bool + Honeypot bool + MinSeconds int + RateLimitPerIP int + Turnstile bool + type SignupFormStats struct + Blocked int64 + Confirmed int64 + ConfirmedRate float64 + Days int + Pending int64 + SubmissionRate float64 + Submissions int64 + Views int64 + type SignupFormStatusInput struct + Status string + type SignupFormSummary struct + HostedPage bool + HostedURL string + ID string + Kind string + Name string + PublicID string + Slug string + Status string + type SignupFormURLs struct + Hosted string + Script string + ScriptKB int + Submit string + type SignupFormWaiting struct + Items []SignupFormWaitingItem + SystemMail bool + Total int64 + type SignupFormWaitingItem struct + Attempts int + CreatedAt time.Time + Email string + FirstName string + ID string + Lists []string + type SignupFormsOverview struct + Branding PublicBranding + CustomFields []SignupFormCustomField + Domain PublicCustomDomain + Forms []SignupFormSummary + HostedFormID string + HostedURL string + Lists []SignupFormList + OwnOrigins []string + SystemMail bool + SystemProvider string + Turnstile PublicTurnstile + type Submission struct + Company string + Consent bool + Email string + Fields map[string]string + FirstName string + Honeypot string + IP *netip.Addr + LastName string + Lists []string + Origin string + Plain bool + Token string + UserAgent string + type SubscribePage struct + Description string + Footnote string + Heading string + Index bool + ListText map[string]string + type Turnstile struct + Client *http.Client + VerifyURL string + func (t *Turnstile) Verify(ctx context.Context, secret, response, remoteIP, idempotencyKey string) (TurnstileResult, error) + type TurnstileResult struct + Action string + Codes []string + Hostname string + Success bool + func (r TurnstileResult) SecretRejected() bool + type UnsubscribePage struct + Fewer bool + FewerButton string + FewerText string + FewerTitle string + Reasons bool + type UnsubscribeStats struct + Answered int64 + ChoseFewer int64 + Days int + OneClick int64 + Unsubscribed int64