Documentation
¶
Overview ¶
Package bindutil holds the mechanics every typed resource binder (db.Bind, cache.Bind, mail.Bind, storage.Bind) shares: discovering the embedded manager field on the marker type, constructing the holder, and the dashboard-registration option set. Each binder keeps only what genuinely differs — how its manager is built and how its resource registers.
Before this package the four binders carried verbatim copies, and they had already diverged: db evaluated its options lazily (so BindFromConfig works under nexus.Boot, which parses nexus.toml after option construction) while the other three applied them eagerly. Sharing the plumbing makes the lazy semantics uniform by construction.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EmbeddedField ¶
EmbeddedField returns the index of T's embedded field of exact type want (a *Manager pointer type). A T that doesn't match panics here, at wiring time, with pkg-qualified guidance — never at request time.
Types ¶
type Option ¶
type Option func(*Options)
Option mutates an Options. The binder packages alias their public BindOption to this type, so options remain interchangeable with the pre-consolidation API (the config struct was unexported everywhere, so no caller could have depended on its shape).