Help us shape the future of Go! Take the 2026 Go Developer Survey

abusewatch

package
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package abusewatch is the read seam between the /site API and the Enterprise abuse detector (ADR 0026): core knows only this interface and ee implements it, so neither imports the other. A nil Watch, or an unlicensed instance, shows no warning.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Warning

type Warning struct {
	Domain string
	// Metric is "complaint" or "bounce".
	Metric string
	// Rate is 0–1.
	Rate float64
}

Warning is a Sending domain in the detector's warning tier.

type Watch

type Watch interface {
	// Warning is the Workspace's warning at now, or nil when it is in no warning tier
	// (exempt and suspended Workspaces are never in one).
	Warning(ctx context.Context, s *ent.Scoped, ws *ent.Workspace, now time.Time) (*Warning, error)
}

Watch reads a Workspace's standing with the detector.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL