Versions in this module Expand all Collapse all v0 v0.1.1 Nov 12, 2026 v0.1.0 Oct 14, 2026 Changes in this version + const ColAcceptanceAt + const ColAcceptanceUserID + const ColAcceptanceVer + const ColAcceptedAt + const ColVersion + const EndpointAccept + const PluginName + const TableAliasAcceptance + const TableNameAcceptance + const TermsHeader + var AcceptanceAt = sqlb.Col[time.Time](TableAcceptance, ColAcceptanceAt) + var AcceptanceUserID = sqlb.Col[string](TableAcceptance, ColAcceptanceUserID) + var AcceptanceVersion = sqlb.Col[string](TableAcceptance, ColAcceptanceVer) + var AcceptedAt = sqlb.Col[*time.Time](auth.TableUser, ColAcceptedAt) + var ErrNoVersion = errors.New("terms: pass terms.Current with the version users must accept") + var ErrNotAccepted = auth.NewError("terms.not_accepted", http.StatusForbidden, ...) + var ErrStale = auth.NewError("terms.stale_version", http.StatusConflict, ...) + var TableAcceptance = sqlb.Table + var Version = sqlb.Col[string](auth.TableUser, ColVersion) + func Bindings(c *TermsColumns) []sqlb.Binding + func Current(version string) func(*Plugin) + type AcceptRequest struct + Version string + type Acceptance struct + AcceptedAt time.Time + Version string + type Plugin struct + func New(opts ...func(*Plugin)) *Plugin + func (p *Plugin) Accept(ctx context.Context, version string) error + func (p *Plugin) Accepted(ctx context.Context, userID string) (bool, error) + func (p *Plugin) Columns() []auth.ColumnExtension + func (p *Plugin) DataHooks() auth.DataHooks + func (p *Plugin) History(ctx context.Context, userID string) ([]Acceptance, error) + func (p *Plugin) Init(a *auth.Auth) error + func (p *Plugin) Name() string + func (p *Plugin) Operations() []auth.Operation + func (p *Plugin) RequireCurrent() func(http.Handler) http.Handler + func (p *Plugin) Tables() []sqlb.Table + func (p *Plugin) TypedMigrations(engine string, t auth.SQLTypes) ([]auth.Migration, error) + func (p *Plugin) UserTables() []auth.UserTable + func (p *Plugin) Validate(*auth.Config) error + func (p *Plugin) Version() string + type TermsColumns struct + TermsAcceptedAt *time.Time + TermsVersion string