Documentation
¶
Overview ¶
Package unsubscribe derives opaque, stable identifiers for managed unsubscribe scopes and their database lookup keys.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Derive ¶
Derive returns a deterministic opaque token bound to one user, sending agent, and recipient. Email identifiers use the same lowercase, trimmed lookup form used elsewhere in the service.
func Hash ¶
Hash returns the fixed-width key used to resolve a token without storing the bearer token itself.
func ValidToken ¶
ValidToken reports whether token has the public wire format emitted by Derive. It validates shape only; authority still requires resolving Hash.
Types ¶
type Issuer ¶
type Issuer struct {
// contains filtered or unexported fields
}
Issuer derives and stores a recipient-scoped bearer token before returning the absolute public unsubscribe URL. It is safe to call repeatedly.
func NewIssuer ¶
func NewIssuer(secret, apiURL string, production bool, store TokenStore) (*Issuer, error)